PDF Tools
Drag-and-drop PDF processing that stays entirely in your browser. Your files stay yours.
- 01One page, four screens
- 02One state object
- 03Page order as numbers
- 04Thumbnails with a personality
- 05Local output
- 06Edit Text, the exception
Architecture Overview
Nine PDF tools — merge, split, remove, extract, reorder, rotate, page numbers, add text and edit existing text — on one static page with no build step and no framework. Eight of the nine run entirely in your browser tab: the file is opened, changed and saved without ever leaving your machine, which is what makes it work offline and safe for documents you would never upload anywhere. The ninth, Edit Text, is honest about needing a small helper you run yourself, because rewriting a word in a PDF's own embedded font is something a browser genuinely cannot do.
How it works
Core mechanics, failure recovery paths, and system design decisions.
One page, four screens
index.html holds four sections and shows one at a time, so changing screen is a CSS class rather than a page load. Three files — markup, styling and about 490 lines of JavaScript — are the whole site.
One state object
The chosen tool, the files, the page order, the removed and kept sets, rotations and edits all live in a single state object. Start over throws it away wholesale, so two jobs can never bleed into each other.
Page order as numbers
Reorder, remove and extract never move real pages while you work; they rearrange a list of indices, and the PDF is built once at the end by copying pages in that order. Three tools, one function, a different list each time.
Thumbnails with a personality
pdf.js paints each page onto a canvas at 40%, and the chosen tool attaches its own behaviour to that same grid: tap to delete, tap to keep, a rotate button, a drag handle, or a click that opens the page editor.
Local output
The finished bytes become a Blob and an invisible download link. Nothing was ever on a server — the file was invented in memory a second earlier.
Edit Text, the exception
A small FastAPI and PyMuPDF helper genuinely removes the old glyphs rather than covering them with a white box, pulls the original embedded font out by its xref, and redraws the new text in it. With no backend configured, that one tool says it is unavailable and the other eight carry on.
Engineering Highlights
- •Eight of the nine tools work with the network unplugged
- •No build step, no npm install, no framework — open the file and it runs
- •Redaction deletes the glyphs, because a white box leaves the words copy-pasteable underneath
- •Click position is flipped and unscaled from screen pixels to PDF points
- •The one tool that needs a server says so, rather than quietly uploading your file