We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Page rotation by words or letters

Page Rotate getting as Zero, is there any way to check the page rotation by the words or letters?
Upside Down.pdf (2.5 MB)


Thanks for contacting support.

We have checked the PDF document which you have shared and observed that, no rotation was set for the pages, which was why the Page.Rotate property was returning as None. However, if you set the Rotation Property of pages and access that again by loading updated document, the property will return correct value. Please consider following code snippet:

Document document = new Document(dataDir + "Upside Down.pdf");
foreach (Page page in document.Pages)
 page.Rotate = Rotation.on180;
document.Save(dataDir + "Upside Down_out.pdf");
document = new Document(dataDir + "Upside Down_out.pdf");
foreach (Page page in document.Pages)
 Console.WriteLine("Page Rotation has been set as : " + page.Rotate);

PageRotation.png (1.8 KB)
Upside Down_out.pdf (2.5 MB)

It looks like your PDF contains images which were added inside it upside down in the first place. Furthermore, I am afraid that there is no way to determine the page rotation by words or letters, as we already offer Page.Rotation Property, which serves the purpose. Nevertheless, if you have some different requirements for a different type of PDF document, please share some more details with us. We will check the details and provide our feedback accordingly.