A PDF has sizes, not headings
A PDF is a typesetting result that stores where each glyph sits and how large it is, without tagging anything as a heading. Converting to Markdown therefore relies on inference: heading detection offers font-size inference or treat-all-as-body, and maximum heading level of 1 to 4 caps how deep it may go. Toggles cover page-number prefixes, table preservation, merging broken lines and preview, with a page-range field hinted as 1-5,8. Controls select the file, convert, load a sample, download, copy, export HTML, clear, and page back and forth.
Steps
- Load the PDF first, limiting the range for long documents.
- Enter expressions like 1-5,8, or leave blank for all pages.
- Choose font-size inference so headings are marked.
- Cap the maximum level at three to avoid promoting large body text.
- Enable line merging for wrapped sentences, and table preservation when tables exist.
- Convert, check levels in preview, then download or copy, exporting HTML as backup.
Where inference breaks
The method profiles font sizes, treats sizes clearly larger than body as headings and groups equal sizes at independent positions. It fails in three situations: two-column journals where a line mixes unrelated passages of equal size, scanned PDFs whose text is really an image with no sizes to read, and display typography whose sizes jump wildly without semantic hierarchy. Line merging depends on detecting an unterminated line followed by a continuation, and Chinese lacks letter case, so punctuation and line width approximate the judgement and long paragraphs merge wrongly. Range syntax needs ASCII commas and hyphens, since fullwidth punctuation is rejected.
Common mistakes
Typing fullwidth punctuation into the range and failing the parse. Treating scans as text PDFs and getting an empty shell. Setting maximum level to four until body text becomes headings. Leaving a two-column document unbounded so paragraph order scrambles. Merging lines in poetry until verses fuse. And downloading without previewing scrambled levels.
Where conversion is the wrong goal
Faithful layout needs a PDF reader, not Markdown. Structured table extraction needs a table recognition tool. Scans require OCR, which this does not do. And any conversion keeps the original PDF for verification.