Currently, I have a few PDFs that view correctly as landscape pages. But internally, they are defined as portrait pages and with the page rotation set to 90 degrees.
Is there a way to force or reset the orientation of the page to match the current rotation value is? Or resave the PDF to match the current view orientation so when reopened it views as expected, but the page rotation is now zero? or to reset the coordinate system and objects to match the currently viewed orientation?
I ask because this presents several issues when trying to draw on the PDF, and the coordinate system is then 90, 180 or 270 out of skew relevant to how the page is being viewed.
In next minor version we will add PdfPage.RemoveRotation method that will allow to remove rotation of PDF page. I think new minor version will be available next week.
In version 12.1.12.1 we have added new method - PdfPage.RemoveRotation, which rotates content of PDF page and sets PdfPage.Rotate property to 0. Please use version 12.1.12.1 and let me know if you will have any question or problem.
Thank you for getting this added. But, there appears to be a problem with this new method. It does remove the viewer rotation, but in the process, the page is clipped to a square when the orientation doesn't match.
So the RemoveRotataion works fine when the Page.Rotate was set to 180. But when set to 90 or 270 it clips the page.
I think the problem is shown in the ArtBox values. Before the RemoveRotation the ArtBox Width is 792 and the Height is 611. Afterward, the Artbox Width is 611 and the Height is also 611. So, I think this explains the clipping to a square.
If you need samples to illustrate this I can email them to you.