PdfiumViewer
PdfiumViewer copied to clipboard
Get current rotation for page
I've found an example on how to set the rotation of a page, but how do I get the current rotation of a page?
Thanks
I don't see anything in the PdfDocument class, or related bits, that denotes the orientation of the page. I think the only to determine that would be to read the height and width properties - if the width is greater than the height, you can assume a landscape orientation.
If you want to know if the page is oriented correctly, I don't see a way to do that without user intervention (you have to just view the page).
I don't mind being wrong about any of the above, it's just what I can determine from my own searches.
I'm not sure whether this is what you're looking for, but the PdfRenderer
class has a Rotation
property that is updated when the RotateLeft
and RotateRight
methods are called. You can access this class from the Renderer
property on the PdfViewer
control.