Commit 888d76a2 authored by Albert Astals Cid's avatar Albert Astals Cid

* poppler/Page.cc: Ignore cropBox if it seems incorrect

parent bcc5e3af
2005-12-12 Albert Astals Cid <aacid@kde.org>
* poppler/Page.cc: Ignore cropBox if it seems incorrect
2005-12-12 Kristian Høgsberg <krh@redhat.com>
* Makefile.am:
......
......@@ -67,6 +67,13 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
if (!haveCropBox) {
cropBox = mediaBox;
}
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;
}
// other boxes
bleedBox = cropBox;
......
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