[poppler] poppler/poppler: PSOutputDev.cc,1.9,1.10

Kristian Høgsberg krh at kemper.freedesktop.org
Tue Feb 28 10:32:01 PST 2006


Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv20121/poppler

Modified Files:
	PSOutputDev.cc 
Log Message:
2006-02-28  Kristian Høgsberg  <krh at redhat.com>

        * poppler/PSOutputDev.cc: Make PSOutputDev constructor respect
        passed in paper size (#5946, #5749).



Index: PSOutputDev.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/PSOutputDev.cc,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- PSOutputDev.cc	13 Feb 2006 22:38:44 -0000	1.9
+++ PSOutputDev.cc	28 Feb 2006 18:31:59 -0000	1.10
@@ -994,9 +994,6 @@
   imgLLY = imgLLYA;
   imgURX = imgURXA;
   imgURY = imgURYA;
-  if (imgLLX == 0 && imgURX == 0 && imgLLY == 0 && imgURY == 0) {
-    globalParams->getPSImageableArea(&imgLLX, &imgLLY, &imgURX, &imgURY);
-  }
   if (paperWidth < 0 || paperHeight < 0) {
     // this check is needed in case the document has zero pages
     if (firstPage > 0 && firstPage <= catalog->getNumPages()) {
@@ -1007,9 +1004,14 @@
       paperWidth = 1;
       paperHeight = 1;
     }
-    imgLLX = imgLLY = 0;
-    imgURX = paperWidth;
-    imgURY = paperHeight;
+  }
+  if (imgLLX == 0 && imgURX == 0 && imgLLY == 0 && imgURY == 0) {
+    globalParams->getPSImageableArea(&imgLLX, &imgLLY, &imgURX, &imgURY);
+    if (imgURX <= 0 || imgURY <= 0) {
+      imgLLX = imgLLY = 0;
+      imgURX = paperWidth;
+      imgURY = paperHeight;
+    }
   }
   manualCtrl = manualCtrlA;
   if (mode == psModeForm) {



More information about the poppler mailing list