Bug 5946

Summary: Poppler produces broken postscript
Product: poppler Reporter: Nickolay V. Shmyrev <nshmyrev>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: high CC: johan
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed patch

Description Nickolay V. Shmyrev 2006-02-19 12:29:36 UTC
When you print with scale, it produces postscript with something like:

%%Page: 1 1
%%BeginPageSetup
%%PageOrientation: Portrait
pdfStartPage
-2.77556e-17 0.261905 translate
-0.0026 -0.0026 scale
0 0 378 576 re W
%%EndPageSetup

The reason lies somewhere in PSOutputDev in HEAD, somehow imgWidth became -1.
Comment 1 Jeff Muizelaar 2006-02-19 12:42:01 UTC
Is there a way to reproduce this?
Comment 2 Nickolay V. Shmyrev 2006-02-19 12:44:18 UTC
Print document with evince or pass real pageWidth and pageHeight to PSOutputDev
constructor instead of -1,-1
Comment 3 Nickolay V. Shmyrev 2006-02-22 11:19:41 UTC
Created attachment 4716 [details] [review]
Proposed patch

There are multiple ways to fix this bug, but I think the proposed one is most
consistent. Really PSOutputDev constructor API is not clear in view of passing
defaults like -1, -1 or 0,0,0,0. The patch makes defaults processing better. 

Otherwise we can try to pass real values not defauls to PSOutputDev
constructor, but I think it would be worse
Comment 4 Nickolay V. Shmyrev 2006-02-24 06:42:22 UTC
Btw, there is another problem described in 5749 and this patch also solve it
Comment 5 Kristian Høgsberg 2006-03-01 05:32:13 UTC
Thanks, fixed in cvs.
Comment 6 Kristian Høgsberg 2006-03-01 05:32:23 UTC
*** Bug 5749 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.