Is there a way to detect rotated page in PDF using Uipath

There are some PDF files whose pages are inverted/rotated. Is there any way from Uipath to detect an inverted page in PDF. Just so if an inverted page is detected that PDF will not be processed further by Uipath.

Hi @mailsmithash

Try this

How can we rotate a PDF?

Thanks
Ashwin.S

PDF page whose orientation is inverted.

I don’t need to rotate the pages , just detect if it is an inverted page in PDF. Also there is no consistent image or data on the pages of the PDF to use a variable to detect if it is at a orientation as that link states.

Are there any PDF objects that can be queried from UIPATH so it tells the orientation. Just like /Type/Page to get the page count in a PDF.

@mailsmithash Can you read the PDF using Read Pdf Text Activity, If you are not able to read and if it returns Null then it means it is Inverted, else it is Properly Oriented

The PDF files are scanned PDFs , so Read PDF activity is not working on any of them. Using Read PDF with OCR for them, it does return text for all PDFs alike both inverted and non-inverted , The text returned for inverted is gibberish though.

@mailsmithash Then it’s a bit Complicated to achieve this :sweat_smile:, Can you send the PDF ? I’ll try from my end if possible

Those PDF have customer related information. Cannot possibly attach the entire PDF file with the pages. Attaching one PDF with a single page.TestDoc (3).pdf (1.6 MB)
Just need to identify it is an inverted page from Uipath End.

1 Like

@mailsmithash did you find a solution? I have the same issue!

Hi, please check if a separate python script can be written to find the orientation using tesseract

Hope this helps.

1 Like