summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2006-02-28 18:31:59 +0000
committerKristian Høgsberg <krh@redhat.com>2006-02-28 18:31:59 +0000
commit46db73a142d65a0c944910388d5971debc06ecbf (patch)
tree213b16253e3d11efe95a7c48f14a5aef18c849d0 /poppler
parent0f7f2182b2abe965b382937f5569b65a8828fc93 (diff)
2006-02-28 Kristian Høgsberg <krh@redhat.com>
* poppler/PSOutputDev.cc: Make PSOutputDev constructor respect passed in paper size (#5946, #5749).
Diffstat (limited to 'poppler')
-rw-r--r--poppler/PSOutputDev.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index b37a5948..5ecd68a6 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -994,9 +994,6 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA,
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 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA,
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) {