Turn scans into editable PDFs with matching layout

Use an agent to rebuild scanned pages or phone photos as PDFs with live text, redrawn graphics, and the same page design.

Done with Claude CodeCodexClaudeยท Advancedยท Nov 2026

What they did
A Claude Code and Codex skill took on the tricky parts of rebuilding documents from images. It worked page by page, using pixel measurements, a single command to draft each sheet, and a magnified contact sheet to inspect doubtful words. The agent then overlaid each rebuilt page on top of the scan to check for mismatches, and it wrote out what still needed attention; changing one word only required editing one JSON line.
How it went
In tests on two new 9-page synthetic files, Haiku and Fable moved from about 0.84 up to 0.997. Sonnet and Opus began around 0.994 and finished at 0.998. The same method made little difference on 3-page packets for Sonnet and Opus.
Tips
Plan for several minutes of agent time per page, and expect Opus and Fable to run slower with the skill turned on. If you only need searchable text, OCRmyPDF is the better fit.

Try it yourself with Claude Code

I have [scanned pages / phone photos] in [folder path]. Recreate each page as a new PDF that preserves the original layout as closely as possible, while adding real selectable text and vector versions of diagrams or figures. Handle the pages one at a time, use a zoomed contact sheet to resolve any unclear words, and save the finished PDFs in [output folder] without changing the source files. After each page, compare your version with the original and give me a list of anything that still looks different, so I can review it. Stop and ask for my approval before any irreversible action, including overwriting files, deleting inputs, sending outputs, or submitting the final result.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.