From 9795c682204a8df81ab3b4c894ee0a3d17c1d7f8 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Mon, 1 Jan 2024 19:30:43 +0000 Subject: [PATCH] revert --- .../SPDF/controller/api/SplitPdfBySectionsController.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java index c50285b1..bc4e2cce 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java @@ -118,8 +118,12 @@ public class SplitPdfBySectionsController { new PDPageContentStream(subDoc, subPage)) { // Set clipping area and position 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.addRect(0, 0, subPageWidth, subPageHeight); contentStream.clip();