1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-09-29 16:10:11 +02:00

Resolve split sections

This commit is contained in:
Anthony Stirling 2024-01-13 01:05:43 +00:00
parent d8cf7e81b9
commit c8acddb251

View File

@ -118,13 +118,12 @@ public class SplitPdfBySectionsController {
try (PDPageContentStream contentStream = try (PDPageContentStream contentStream =
new PDPageContentStream( new PDPageContentStream(
subDoc, subPage, AppendMode.OVERWRITE, true, true)) { subDoc, subPage, AppendMode.APPEND, true, true)) {
// Set clipping area and position // Set clipping area and position
float translateX = -subPageWidth * i; float translateX = -subPageWidth * i;
float translateY = height - subPageHeight * (verticalDivisions - j);
//float translateY = height - subPageHeight * (verticalDivisions - j);
// Code for google Docs pdfs.. float translateY = -subPageHeight * (verticalDivisions - 1 - j);
// float translateY = -subPageHeight * (verticalDivisions - 1 - j);
contentStream.saveGraphicsState(); contentStream.saveGraphicsState();
contentStream.addRect(0, 0, subPageWidth, subPageHeight); contentStream.addRect(0, 0, subPageWidth, subPageHeight);