Commit cf887a9a authored by Albert Astals Cid's avatar Albert Astals Cid

* poppler/Page.cc: Only discard cropbox sizes one by one and not

       completely. Jeff and Martin were right
parent 495890b9
......@@ -4,6 +4,8 @@
* utils/Makefile.am: Add fontconfig cflags to utils as not always is
on /usr/include Fixes build problems on Slackware. Patch adapted from
a Giovanni Venturi patch
* poppler/Page.cc: Only discard cropbox sizes one by one and not
completely. Jeff and Martin were right
2005-12-12 Albert Astals Cid <aacid@kde.org>
......
......@@ -70,9 +70,16 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
else
{
// cropBox can not be bigger than mediaBox
if (cropBox.x2 - cropBox.x1 > mediaBox.x2 - mediaBox.x1 ||
cropBox.y2 - cropBox.y1 > mediaBox.y2 - mediaBox.y1)
cropBox = mediaBox;
if (cropBox.x2 - cropBox.x1 > mediaBox.x2 - mediaBox.x1)
{
cropBox.x1 = mediaBox.x1;
cropBox.x2 = mediaBox.x2;
}
if (cropBox.y2 - cropBox.y1 > mediaBox.y2 - mediaBox.y1)
{
cropBox.y1 = mediaBox.y1;
cropBox.y2 = mediaBox.y2;
}
}
// other boxes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment