Rotate pdf file


When reading a pdf that is rotated to the sides, the output that is given shows gibberish, and this is due to the fact that the OCR engine is trying to read the page from top to bottom, and left to right.

Is it possible to detect the orientation of the page, and rotate it?


APIs are available to detect the orientation of a page.

As a simpler way, If you already know that the page is always rotated in some particular angle, you can send a hotkey to re-rotate the page every time to the angle that u desire and perform read operation.


thank you, do you knoiw a name of an API like this


PDFBOX, Acrobat Api are some i have heard of… There are some tools too which can detect the orientation - tesseract, pdftk