Skip to content

How to Rotate PDF pages in a handful of lines (v1.9.3)

Jorj X. McKie edited this page Jan 17, 2019 · 2 revisions

This works with version 1.9.3:

import fitz
doc = fitz.open("file.pdf")
for page in doc:
    page.setRotation(90)
doc.save(doc.name, incremental = True)

The above takes less than 2 seconds (!) for the 1310 pages of the Adobe manual ...

Clone this wiki locally