BuildAIToday Mohamed-Zayim
FR EN

All projects

PdfWritter. Web editor, from text to PDF

Status
Private repository, not deployed
Stack
TypeScript, Vite, Tiptap, pdfmake, Vitest, Playwright
GitHub
Private repository
  • 53 unit tests
  • 39 e2e tests

Problem

Text pasted from a PDF, ChatGPT or an email arrives with what breaks the layout: forced line breaks, split words, page numbers, invisible characters, broken bullets. PdfWritter spots them, fixes them in one click and gives you the PDF directly.

Decisions

  • An editor in the browser: you write text, you get a PDF.
  • Everything runs in the browser: the text never leaves the machine, no server.
  • Pure, tested cleaning rules, applied to the document itself to keep bold, italics, headings and lists.
  • A PDF with real, selectable text (pdfmake), loaded only on click because the fonts are heavy.
  • Unit tests, including 2,000 random texts, and end-to-end tests in Chromium.

Result

Both test suites pass. The repository is private.

What’s not done yet

  • Not deployed yet.
  • Importing a PDF file directly (pdfjs-dist) to recover real paragraphs, columns and headings: copy-paste only gives raw text.
  • Emoji, Arabic and Chinese are not in the PDF font; the tool warns before export.
  • Repeated page headers and sentences split across two paragraphs are not handled.