[Poppler-bugs] [Bug 30692] pdftops does not crop

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 13 10:49:12 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=30692

--- Comment #3 from William Bader <williambader at hotmail.com> 2010-10-13 10:49:12 PDT ---
The patch to Page::makeBox() works.  You can test it with the PDF attachment
that I sent along with the patch.
PSOutputDev::checkPageSlice() is not the only place that calls Page::makeBox().
Page::createGfx() also calls Page::makeBox() and then calls new Gfx() with
"crop ? cropBox : (PDFRectangle *)NULL".
The alternate patch below to Page::createGfx() also works for that PDF.

--- poppler-30sep10-alt/poppler/Page.cc-        2010-09-30 22:48:46.463386325
+0200
+++ poppler-30sep10-alt/poppler/Page.cc 2010-10-13 19:29:46.109048269 +0200
@@ -427,8 +427,9 @@
     rotate += 360;
   }

+  GBool tempCrop = crop;
   makeBox(hDPI, vDPI, rotate, useMediaBox, out->upsideDown(),
-         sliceX, sliceY, sliceW, sliceH, &box, &crop);
+         sliceX, sliceY, sliceW, sliceH, &box, &tempCrop);
   cropBox = getCropBox();
   mediaBox = getMediaBox();

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list