Bug 41867

Summary: pdfinfo does not report page rotation
Product: poppler Reporter: Vitaliy Filippov <vitalif>
Component: utilsAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Attachments: Patch for pdfinfo to report rotated page size
Shows page rotation in addition to page size

Description Vitaliy Filippov 2011-10-17 04:11:24 UTC
Hello! I have the following problem with pdfinfo: it shows page size, but doesn't show page rotation.
The reported width/height is same for portrait/landscape images, although they render correctly. But you cannot use width/height reported by pdfinfo, because they may be swapped due to rotation.
There are several discussions of this on the web, for example, http://www.perlmonks.org/?node_id=485453 even contains simple perl script to extract page rotation.
Comment 1 Vitaliy Filippov 2011-10-20 03:52:23 UTC
Created attachment 52578 [details] [review]
Patch for pdfinfo to report rotated page size
Comment 2 Albert Astals Cid 2011-10-20 06:10:03 UTC
Personally I would prefer if you added a new field "Page Rotation:". I know it will probably make life a bit harder for you but i prefer if we do not modify existing behaviour of a tool
Comment 3 Vittal Aithal 2011-11-09 10:07:56 UTC
Created attachment 53336 [details] [review]
Shows page rotation in addition to page size

I agree that changing existing behaviour could cause all kinds of problems for people. Adding page rotation as another output field is preferable.


Page    1 size: 595 x 842 pts (A4)
Page    1 rot:  90
Page    2 size: 595 x 842 pts (A4)
Page    2 rot:  90

Vittal Aithal
Cognidox Ltd
Comment 4 Albert Astals Cid 2011-11-09 11:11:16 UTC
Commited, will be in poppler 0.20
Comment 5 Vitaliy Filippov 2011-11-12 13:29:38 UTC
Thanks for the fix!
I agree with you that showing page rotation is far more compatible than changing output. :)

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.