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();