😫 The Pain Point
You scanned a stack of papers. Page 5 was inserted backward. Now it’s upside down in the PDF. Readers have to rotate their heads to read it.
🚀 Agentic Solution
Page Turner: Modifies the “Rotation” flag of specific pages.
Key Features:
- Zero Loss: Rotates metadata, doesn’t re-compress the image.
- Selection: Rotate only specific pages (e.g., Pages 5 & 7).
⚔️ Phase 1: Commander (Quick Fix)
For a quick fix.
Prompt:
“Rotate page 5 of
doc.pdfby 180 degrees. Save asfixed.pdf.”
Result: Corrected PDF.
🏗️ Phase 2: Architect (Permanent Tool)
For Copy Shops.
Engineering Prompt:
**Role:** Python PDF Util Dev
**Task:** Create a "PDF Page Rotator".
**Requirements:**
1. **GUI:**
* Load PDF.
* Input: "Page Numbers" (e.g., 5,7).
* Direction: "Clockwise 90" or "180".
* "Rotate" button.
2. **Logic:**
* Use `pypdf`.
* `page.rotate(90)`.
* Save result.
3. **Deliverables:** `pdf_rotate.py`, `run.bat` (Windows), `run.sh` (Mac).
🧠 Prompt Decoding
- Metadata Rotation: Rotating a PDF page is instantaneous because we aren’t moving pixels. We are just telling the PDF viewer “Hey, display this page rotated”.
🛠️ Instructions
- Copy Prompt -> Paste -> Run.
- Input Page No -> Rotate.