[Poppler-bugs] [Bug 30692] New: pdftops does not crop
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Oct 7 15:30:47 PDT 2010
https://bugs.freedesktop.org/show_bug.cgi?id=30692
Summary: pdftops does not crop
Product: poppler
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: general
AssignedTo: poppler-bugs at lists.freedesktop.org
ReportedBy: williambader at hotmail.com
Created an attachment (id=39271)
--> (https://bugs.freedesktop.org/attachment.cgi?id=39271)
proposed patch
pdftops sets the bounding box but does not crop anything outside the bounding
box. I have a pdf with a block of descriptive text outside the crop box, and
the text gets into the eps (i.e. is not clipped out), whether or not I specify
-nocrop. With pdftops from xpdf-3.02pl4, the text gets in only if I specify
-nocrop. The pdf has a crop box that is smaller than the media box, and the
text is in the space above the crop box but inside the media box.
It looks like Page::makeBox() sets *crop to gFALSE if useMediaBox is false.
pdftops calls doc->displayPages() with noCrop for the useMediaBox (because
cropping should use the crop box, so noCrop should use the media box).
Since noCrop defaults to gFalse (which means that pdftops crops by default),
useMediaBox is false, and makeBox() sets *crop = gFalse.
xpdf-3.02 has the same assignment of *crop = gFalse in Page.cc, but it stores
the crop flag in GlobalParams (poppler does not), and it has a separate
pageCrop flag (poppler reuses noCrop for pageCrop).
--- poppler-30sep10/poppler/Page.cc- 2010-09-30 22:48:46.463386325 +0200
+++ poppler-30sep10/poppler/Page.cc 2010-10-08 00:02:27.034792873 +0200
@@ -678,7 +678,7 @@
*box = *mediaBox;
} else {
*box = *cropBox;
- *crop = gFalse;
+ /* *crop = gFalse; */
}
}
--
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