[poppler] poppler/poppler: Page.cc,1.7,1.8

Albert Astals Cid aacid at freedesktop.org
Mon Dec 12 12:21:10 PST 2005


Update of /cvs/poppler/poppler/poppler
In directory gabe:/tmp/cvs-serv22833/poppler

Modified Files:
	Page.cc 
Log Message:
* poppler/Page.cc: Ignore cropBox if it seems incorrect


Index: Page.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Page.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Page.cc	30 Oct 2005 20:29:05 -0000	1.7
+++ Page.cc	12 Dec 2005 20:21:08 -0000	1.8
@@ -67,6 +67,13 @@
   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;



More information about the poppler mailing list