How to use it
- Drop the PDF. Enter a page selection (for example 1-5) if you do not need the whole file.
- Choose which structures to rebuild: headings, lists, tables, page breaks, and whether page numbers are dropped.
- Press “Convert to Word”. The result shows word, paragraph, heading, list and table counts.
- Download the .docx and open it in Word, LibreOffice or Google Docs.
Example
A 4-page meeting minutes PDF (11 pt body, 18 pt title, 13 pt section names, two bullet lists, one 3-column action table) converts to a 24 KB .docxwith one Heading 1, five Heading 2 paragraphs (13 / 11 = 1.18 ≥ 1.08 → level 3 would apply only below 1.25, so these become Heading 2 at 1.25–1.5 only when the ratio reaches 1.25 – here 1.18 gives Heading 3), 31 body paragraphs, 2 bulleted lists and a 3 × 6 table with a bold header row. Page breaks sit where the PDF pages ended.
How the document is rebuilt
pdf.jsextracts every text run with its position, width and font size; the page’s operator list is loaded first so the font objects expose bold/italic. Runs are grouped into lines (baseline tolerance 45 % of the font size), lines into paragraphs (gap under 1.6 × the font size, previous line at least 75 % of the text width, no first-line indent), bullet characters and “1.”-style prefixes into lists, and runs of lines with equal column counts (gaps over 1.5 em) into tables. The docxlibrary then writes paragraphs with Word’s built-inHeading1–Heading3styles, numbering definitions for lists, a 100 %-width table per grid and a page break between PDF pages.
Limits
- Images and vector drawings are not transferred (the source tool never did; a reliable image placement from pdf.js is out of scope).
- Multi-column pages interleave; text in headers/footers other than page numbers is kept as paragraphs.
- Tables need visible gaps between columns; wrapped cells may split into extra rows.
- Password-protected PDFs must be unlocked first.
Sources: pdf.js – getTextContent API, docx – Document, Paragraph, Table API, ECMA-376 Office Open XML (WordprocessingML).
Questions
- Why does the tool say my PDF is scanned?
- Every selected page has fewer than 20 characters of real text, which means the pages are pictures. Run them through OCR first – CalcPark's OCR tool at /ocr turns scanned pages into text – then paste or convert that text.
- Will the Word file look like the PDF?
- The content and structure will match; the appearance will not. Fonts become Calibri 11 pt, headings use Word styles you can restyle, and positions are re-flowed. For a visual copy, insert the PDF pages as images instead.
- Are images included?
- No. Only text, headings, lists and tables are rebuilt. Use PDF to JPG to extract the images and insert them in Word.