Blog
Notes from the inside of a PDF.
What it takes to edit a page in place, written from the code that does it. No roadmap posts, no announcements, just the engineering.
Exporting edits as real text, in the page's own font
How Edit My PDF removes the original strings from a page's content stream, embeds a subset of the font pdf.js decoded, and writes your edit as positioned text rather than a picture.
What the editor leaves alone
Covered text, tables, Type 3 fonts, form XObjects, phantom spaces and the lines you did not touch: the deliberate limits of editing a PDF in place.
Editing a paragraph that mixes bold, italic and regular as one block
A textarea holds one font. A paragraph with a bold lead-in needs a contentEditable editor that owns its DOM, maps every edit into styled spans and keeps the page's line layout.
Opening an element exactly as the page prints it
Fitting every run and line to its printed width, keeping a block's own baselines and breaks, measuring the baseline in the browser, and reading colour from the pixels.
Nothing leaves your browser: how Edit My PDF is built
pdf.js in a web worker, pdf-lib for writing, IndexedDB for storage and no server at all. What that architecture buys, what it costs, and how to verify it.
Why editing text inside a PDF is hard
No paragraphs, subset fonts with no space glyph, spacing operators that leak, phantom spaces, mixed faces and browsers that round: the real reasons a click can shift a line.