Reset PDF Page Rotation to 0

Skip to first unread message


Apr 14, 2015, 1:04:07 PM4/14/15
Q: We’ve noticed that some applications will generate PDF files with initial rotation values (in this case it’s the CutePDF print driver). When you open the PDF in Adobe, the orientation is correct (landscape), but there is a stored rotation value of 90. If we remove that value with CosEdit and reopen the PDF, it’s now rotated into portrait mode.

Is there any way to reset the rotation value of a page to 0 while maintaining the correct orientation?

I’ve attached a PDF which displays this behavior.


As a solution you can call page.SetRotation(Page.Rotate.e_270), and rotate page media & crop box (similar to Rect sample - and also add a transform matrix that will rotate all page content. The last part is a bit more tricky… You can use ElementEdit approach (, where you adjust the transform on the initial element (you could surround all content with e_group_begin/end element; i.e q/Q). Perhaps a simpler approach is to approach shown in Imposition sample ( where you place an existing page on another page (in your case that would be rotated page).
Reply all
Reply to author
0 new messages