Bug 24774

Summary: Normalize pages (autorotate landscape pages to portrait)
Product: poppler Reporter: Ryszard Trojnacki <rysiek>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED NOTABUG QA Contact:
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch for the added feature
Example file to test feature

Description Ryszard Trojnacki 2009-10-28 04:31:46 UTC
Created attachment 30772 [details] [review]
Patch for the added feature

I have made an feature to pdftops util which is autorotating landscape pages to portrait orientation that all pages on output postscript file are portrait. The feature is enabled by command -autorotate argument.
Comment 1 Ryszard Trojnacki 2009-10-28 04:33:03 UTC
Created attachment 30773 [details]
Example file to test feature
Comment 2 Adrian Johnson 2009-10-28 13:57:51 UTC
The autorotation patch is rotating the wrong way. Refer to the PLRM.

After correcting this by changing rotate=90 to rotate=270 the only difference in output using your test example is:

-%%PageOrientation: Landscape
+%%PageOrientation: Portrait

I had assumed that your patch was the result of incorrect printing of landscape pages. But all the above difference will do is make landscape pages display incorrectly in gv/evince/okular. It won't effect printing.

I am not understanding the purpose of this patch.

Comment 3 Ryszard Trojnacki 2009-10-29 01:57:05 UTC
Yes this patch does nothing. I have made this because of expierience with ghostscript converter to postscript (gs -sDEVICE=pswrite). When I was using gs then psnup was working incorrecly without rotation. But with pdftops everything seems to be OK (Ghostscript doesn't add %%PageOrientation attribute in ps file).

Thanks for info.

(In reply to comment #2)
> The autorotation patch is rotating the wrong way. Refer to the PLRM.
> 
> After correcting this by changing rotate=90 to rotate=270 the only difference
> in output using your test example is:
> 
> -%%PageOrientation: Landscape
> +%%PageOrientation: Portrait
> 
> I had assumed that your patch was the result of incorrect printing of landscape
> pages. But all the above difference will do is make landscape pages display
> incorrectly in gv/evince/okular. It won't effect printing.
> 
> I am not understanding the purpose of this patch.
> 

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.