Forum How do I...?

Rotate a landscape page after rendering with -prince-rotate-body

swilson22
Is there any way to rotate a page in the PDF AFTER it is generated so that it displays as landscape, when it was created by using -prince-rotate-body?

The page is otherwise correct, with the body content rotated and the header/footer along the short sides of the page. It's just that the PDF is output with all the pages in portrait orientation, and I'd like this page to be landscape so that the body content is oriented the right way to be read on screen.

I spent some time looking through the other topics with similar questions, but didn't see this specific one answered. It actually looks like this may have been how things worked before -prince-rotate-body was implemented...

Thanks!
howcome
Perhaps you could use pdftk or simliar tools to post-process the document?

https://askubuntu.com/questions/569328/rotate-a-specific-page-of-a-pdf-file
mikeday
Currently we don't have a CSS property to add the /Rotate flag to the PDF, which controls the rotation of that page as displayed in the PDF viewer. We could potentially add one, but it would require some thought as it would be a bit confusing to tell which property actually rotates the page content on the paper and which merely instructs the viewer which way up to show the page.
swilson22
Thanks for confirming that I wasn't missing something in the documentation. I wasn't sure if it was something I could do with Javascript and the PDF.pages Box API, but I didn't see anything regarding rotation there either.

I'll look into other postprocessing approaches as suggested.