Skip to content

Promote to production: PDF to Word (DOCX) - #157

Merged
slaveofcode merged 2 commits into
mainfrom
develop
Aug 3, 2026
Merged

Promote to production: PDF to Word (DOCX)#157
slaveofcode merged 2 commits into
mainfrom
develop

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Promotes #156 — PDF to Word (DOCX) with OCR fallback.

🤖 Generated with Claude Code

Kresna and others added 2 commits August 3, 2026 17:54
Convert a PDF to an editable .docx entirely client-side:
- Extract positioned text per page with pdf.js, then reconstruct real
  paragraphs and headings (heuristic line/paragraph grouping + font-size
  heading detection) so the Word output is editable and reflowable.
- Pages with little/no selectable text (scanned/image PDFs) fall back to
  on-device OCR (PaddleOCR, reused from the OCR tool); a 'Force OCR' toggle
  runs OCR on every page.
- Generate the .docx in-browser with the 'docx' library (MIT). Per-page
  progress; page breaks between pages. Nothing is uploaded.

Honest about limits: PDF stores positioned glyphs, not paragraphs, so exact
layout / tables / multi-column pages are reconstructed heuristically and may
need cleanup — surfaced in the UI. Pure reconstruction lib with 8 unit tests.
Bilingual (EN + ID) UI, SEO and OG.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ubfx4XocHcECaL8twp9zsr
feat(documents): PDF to Word (DOCX) with OCR fallback
@slaveofcode
slaveofcode merged commit ce2af60 into main Aug 3, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant