{
  "id": 12842405,
  "title": "How I built a free PDF editor that keeps your fonts and never uploads your file",
  "url": "https://urgent.news/2026/10/08/how-i-built-a-free-pdf-editor-that-keeps-your-fonts-and-never-uploads",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-08T10:21:03.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/s_b_338d557aee06b6436d328/how-i-built-a-free-pdf-editor-that-keeps-your-fonts-and-never-uploads-your-file-30c6"
  },
  "original_language": "en",
  "account": "Most free PDF editors struggle to maintain fonts and ensure files are not uploaded when editing. This is because a PDF is not a conventional document but rather a sequence of drawing commands that manipulate text and graphics. Most browser-based editors simply add white boxes for editing, resulting in font changes and hidden old text that can still be found through search or screen readers. To address these issues, the author developed a free PDF editor that keeps fonts intact and never uploads files.\n\nThe editor achieves this by converting text runs into editable lines, merging runs with the same font, size, and baseline into single lines. When a line is edited, the editor samples the background and text color from the rendered canvas to create a blending box that appears transparent. The editor also handles table cells by treating single wide space runs as separators, joining runs only with a word-sized gap to maintain proper alignment.\n\nDetermining the correct font for edited text is crucial, as most PDFs embed subsets of fonts rather than complete fonts. The editor identifies the font used in the PDF, strips any subset prefixes, and selects the best matching real font from a list of options. If the desired font is not available, the editor provides the user with a look-alike option and a button to choose an exact font.\n\nTo remove the original text accurately, the editor decompresses the page's content stream and iterates through each operator responsible for text rendering. It replaces the text operators with empty ones that move the text position by the same amount as the original string, ensuring the edited line takes up the same space as before. This method preserves the overall layout and prevents columns from running into each other.\n\nAfter editing, the editor verifies its work by reopening the modified PDF with pdf.js, checking the page count, ensuring untouched text remains intact, and rendering each changed page. If any errors occur during this process, the editor defaults to leaving the original text unchanged and covering it with a box in the sampled background color, providing a useful backup option for users. The editor supports various file types, including office invoices, letterheads, and fillable forms, maintaining correct font usage and preserving user data in all cases.",
  "summary": "You click a line in a PDF, type, and download. The new text uses the same font, the old words are really gone (not hidden under a white box), and the file never leaves your browser. Here is how the Aivdo PDF editor does it, and the bugs I hit on the way. Why most free PDF editors get this wrong A PDF is not a document with paragraphs. It is a list of drawing instructions: \"use font F2 at 11 pt,…",
  "key_points": [
    "Free PDF editor maintains fonts during editing",
    "No file uploads occur when editing PDFs",
    "Editor converts text runs into editable lines"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}