Detect Rotated PDF

Hello,

We are currently using Aspose for PDF manipulation. We would like the code to auto-detect uploaded PDFs that are rotated (ex: 180 degrees / upside down) so that we can automatically modify the PDF to be correctly rotated. This would solve downstream issues we are experiencing.

Is it possible to auto-detect rotation?

@cwgsccca

You can get Page.Rotate Property to determine its rotation like below:

Document doc = new Document("input.pdf");
foreach(var page in doc.Pages)
{
 var rotation = page.Rotate;
}