I have a scanned book as a pdf file.

Some pages are not correctly align and need some rotation, less than 90 degrees, obviously. The text in the pages has not very good defined limits, but there are some decorative lines vertical or horizontal that can be used as markers.

Is there any solution to fix the pages one by one, drawing a line or something similar that defines the orientation optically?

1 Answer 1


Some PDF-handling programs have options to automatically de-skew files as they're processing them.

Generally, the procedure is to split the PDF into one image file per page, deskewing each image, and then merge all the pages back into a new PDF file.

Some programs can do this splitting/deskewing/merging process automatically - e.g. ocrmypdf, which can add a text layer to PDFs which don't already have one (or replace the existing text layer with a new one) has a --deskew option which does this for each page before using tesseract-ocr to generate the text.

There are also programs like deskew and pagetools for manually deskewing individual image files (in a variety of formats).

  • I am aware of such tools, I am looking for, a probably manual tool, that will allow me to do some custom rotations to pages when is needed. Assuming that already have processed the pages with tools that do deskewing and/or auto align and rotation.
    – ThanasisN
    Commented Jan 9, 2023 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .