PdfiumViewer icon indicating copy to clipboard operation
PdfiumViewer copied to clipboard

Get current rotation for page

Open tblack2200 opened this issue 7 years ago • 2 comments

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

tblack2200 avatar Aug 08 '17 20:08 tblack2200

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.

tiesont avatar Aug 09 '17 21:08 tiesont

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.

pvginkel avatar Nov 02 '17 11:11 pvginkel