This commit is contained in:
Anthony Stirling 2024-01-01 19:30:43 +00:00
parent 7ffa447cbc
commit 9795c68220

View file

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