Coordinates for the bounding boxes of the words on rotated PDF pages.

Q: My department is evaluating the PDFNet SDK for an internal project that requires us to analyze PDFs. We’ve run into several examples of Pages that are rotated (e.g. Page.GetRotations() = pdftron.PDF.Page.Rotate.e_90). The coordinates for the bounding boxes of the words on these pages are also rotated. I’ve looked at several questions on the Google groups page about rotating pages. The answers say to use the SetRotation method to rotate the page and then save the PDF. Is there a way to rotate the pages in memory?

A: You can use page.SetRotation() and not save the file.

To obtain the coordinates in rotated coordinate you can use page.GetDefaultMatrix() and rotate all coordinates as described in the following article:
https://groups.google.com/d/topic/pdfnet-sdk/TE3Eoay3J7A/discussion