PDF to Markdown
Best-effort pdf to markdown, from extracted text and a heading/list heuristic.
Runs on your device. The file is never uploaded.
PDF to Markdown reads a document's text with pdf.js and writes a .md named after your file. Items whose y coordinates sit within 2 points become one line, and a line more than 15 percent taller than the commonest glyph height becomes a heading. Only text is read, so no picture on the page crosses over.
Questions
Does anything leave my device?
No. This is the one conversion in the family that never calls pandoc: pdf.js extracts the text in a Web Worker and the Markdown it produces is the finished file. There is no upload, no server step and no account, and the whole run works offline.
How does it know what is a heading?
By glyph height, not by any structure in the file. It counts how often each text size appears across the document, calls the most common one body text, and treats every size more than 15 percent taller as a heading, ranked so the largest becomes h1. A line starting with a dash, asterisk or bullet becomes a list item. It is a heuristic, so a document with no size contrast comes out flat.
Why are there backslashes all over my Markdown?
To keep your document's own text intact. A PDF has no Markdown semantics, so every character Markdown gives meaning to is escaped: backslash, backtick, asterisk, underscore, brackets, angle brackets, ampersand, dollar, pipe, tilde, caret and braces, plus block markers at the start of a line. Without this, a path like C:\temp\notes.txt was read as TeX and came out as C:.txt.
How are lines put back together?
By vertical position. pdf.js reports each run of same-font text separately, so items whose y coordinates are within 2 points of each other are grouped into one physical line, sorted left to right, and the lines are ordered from the top of the page down. Pages are concatenated with no page break marker between them.
What do I get back?
A .md named after your PDF, with the Markdown also shown on the page as a preview. The preview is byte-identical to the downloaded file, so what you read is what you save. One PDF at a time, and the original is untouched. If there was no text to extract, it stops with "no extractable text found in this PDF".
How is this different from PDF to text?
PDF to text gives you the raw content with a marker before each page and no interpretation. This one groups items into lines, guesses headings and lists, and escapes the result so it renders back as the words on the page. Pick this when you want something readable, and PDF to text when you want something to search.