[poppler] cropBox can not be bigger than mediaBox
Jeff Muizelaar
jeff at infidigm.net
Tue Dec 13 22:54:31 PST 2005
On Mon, Dec 12, 2005 at 07:30:37PM +0100, Albert Astals Cid wrote:
> A Dilluns 12 Desembre 2005 02:30, Martin Schr?der va escriure:
> > On 2005-12-11 21:17:37 +0100, Albert Astals Cid wrote:
> > > Agree to commit?
> >
> > + if (cropBox.x2 - cropBox.x1 > mediaBox.x2 - mediaBox.x1 ||
> > + cropBox.y2 - cropBox.y1 > mediaBox.y2 - mediaBox.y1)
> > + cropBox = mediaBox;
> >
> > Btw: The || is probably false, as you loose both dimensions when
> > at least one is false -- and the other might be right.
>
> Not imho, if one dimension is bad means the generator did something completely
> wrong so i prefer not to trust cropBox at all.
Acrobat only discards the dimensions that are invalid. i.e. pagesize =
min(cropBox, mediaBox). So with this change we get the wrong pagesize
for documents like http://infidigm.net/~jeff/page-size.pdf
-Jeff
More information about the poppler
mailing list