How to save state on pdfviewctrl on orientation changes?


Hello Marius,

It sounds like you’re asking how to change the orientation of a page, and persist that new orientation in the document so that when the document is re-opened that page is still the same orientation. (Let me know if this understanding is incorrect.)

If so, you can persist the rotation by calling Page.SetRotation() ( instead of PDFViewCtrl.RotateClockwise/RotateCounterClockwise.

Hi Aaron,

Sorry for not being clear enough.
Here's what I want to do:
a) while in Portrait , zoom in into an area.
b) Now rotate app into Landscape mode and persist previous zoom levels and area.

In Our current implementation changing the rotation will reset the zoom level to fit whole page.


Thank you for the clarification. The sample applications included with your PDFNet SDK should already retain page position and zoom level when changing orientation, so you should be able to follow those. If a sample app in your SDK is not doing so, that is erroneous. (If a sample app isn’t rotating correctly, please forward the details to for investigation.)