Course Content
PDF Magic with Python: Manipulating, Extracting, and Combining
PDF Magic with Python: Manipulating, Extracting, and Combining
Rotate Pages
rotate()
is a PyPDF2
function that allows developers to rotate the pages of a PDF file by a specified angle. It's useful for correcting orientation issues in PDF files and for generating reports or documents with a specific page orientation.
Task
- Read in a PDF called
"sample.pdf"
; - Select the page at index 0 and rotate it by 90 degrees;
- Write the PDf to a file called
"output.pdf"
.
Everything was clear?
Section 1. Chapter 5
Start learning today and achieve
coding mastery
- Master Python, SQL, JavaScript & more.
- Learn with Step-by-Step Lessons.
- Get Ready for Real-World Projects.
- Earn a Certificate Upon Completion.