I am trying to read a PDF using pdfplumber
and it usually works, but if there is one page where the text is rotated, it rotates all other pages as well.
This is the code I use:
import pdfplumber
pdf_path = "some_pdf.pdf"
with pdfplumber.open(pdf_path) as pdf:
for page in pdf.pages:
print(page.rotation)
Which outputs:
270
270
The first 270 should be 0 and the second is correct. Assuming that zero means that the text is readable without rotating.