I'm extracting all the images from a bunch of scanned PDFs using pdfimages, in order to process and repackage them.

The problem is that some images are rotated 90° (either CW or CCW) and others are not. The original PDF re-rotates them on the page, so that all the pages show up straight, but the extracted images remain rotated.

I couldn't find an option in pdfimages to output the rotations, so that I could use them in a script.

Is there a way to extract this information?

1 Answer 1


I'm not sure if your PDF's are multi-page, so if they are then use pdfTK or pdfSAM to break them into single page PDF's, then use The Gimp to rotate the images manually.

The other thing that you could is use a tool like ImageMagick to automate the rotation, but you would probably have to separate the normal, CW, CCW pictures into different folders.

  • The actual problem is automatic recognition of the rotation, not how to rotate pages/images manually.
    – Thomas W.
    Commented Nov 25, 2016 at 22:47

You must log in to answer this question.

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