Guide · PDF, Word and PowerPoint to Markdown

PDF to Markdown: what survives and what does not

By Tan Solutions · Published · Updated

Short answer

A PDF to Markdown converter can only keep what the PDF actually stores. If the PDF has a text layer, the words, the reading order, the headings (guessed from font sizes), lists and most tables come through, and page numbers can be kept for citing. What does not survive: text in scanned pages (unless you run OCR), text in locked files, pictures and charts as content, and the exact visual layout. Word and PowerPoint files convert more cleanly, because they store headings, lists and tables as structure rather than as positioned text.

1. Why PDF is the hard case

A PDF is a page description. It says “draw these characters at these positions in this font”, not “this is a heading” or “this is row 3 of a table”. A converter rebuilds structure from clues:

  • Headings from larger or bolder fonts.
  • Reading order from positions on the page. Two-column pages must be read column by column, not straight across.
  • Lists from bullet characters and indents.
  • Tables from text that lines up in a grid, or from ruling lines.

Where those clues are clear, the Markdown is good. Where they are not (a heading set in body-size bold, a table with merged cells, a sidebar box), the converter has to guess.

2. What survives: a dated test on a real file

We ran our converter on RFC 9309, the Robots Exclusion Protocol, a 12-page text PDF, in a cloud run on 13 November 2026. The real output row, with the long text cut short:

{
  "source": "https://www.rfc-editor.org/rfc/rfc9309.pdf",
  "fileName": "rfc9309.pdf",
  "fileSizeBytes": 177688,
  "status": "ok",
  "docType": "pdf",
  "title": "RFC 9309: Robots Exclusion Protocol",
  "markdown": "# RFC 9309\n\n# Robots Exclusion Protocol\n\n## Abstract\n\nThis document specifies and extends ... (22,290 characters)",
  "pageCount": 12,
  "pagesProcessed": 12,
  "wordCount": 3202,
  "metadata": { "producer": "WeasyPrint 56.1", "createdAt": "2022-09-10T00:39:45.000Z" },
  "processedAt": "2026-11-13T10:06:13.735Z"
}

What this one file shows:

Element Result in this run
Title Kept, from the document metadata
Headings Kept as # and ##, from font sizes
Body text Kept: 3,202 words, 22,290 characters of Markdown
Pages All 12 processed; page numbers kept when you turn on per-page output
Metadata Producer and creation date kept

This is one well-made, text-only PDF. It does not tell you how a scanned contract, a slide deck saved as PDF or a financial table with merged cells will come out. Test the documents you actually have before you trust any converter, ours included.

What does not survive, by design in our tool (from its documentation, verified 14 November 2026):

  • Scanned PDFs. No text layer means no text. These come back as no_text_layer and are free. There is no OCR.
  • Locked files. Password-locked or copy-locked PDFs are not converted, and the tool never removes locks. Files that only restrict printing or editing convert normally.
  • Images. What is inside a chart, a diagram or a photo is not turned into text.

3. Word and PowerPoint

Office files are easier, because the structure is stored, not guessed.

  • Word (DOCX). Headings, lists and tables come through as such. Our tool leaves out comments, tracked-change authors and hidden personal metadata.
  • PowerPoint (PPTX). One section per slide with the slide title, text, tables and speaker notes.
  • Old formats. Old Word (.doc), Excel files and images come back as unsupported in our tool (free).

If you have pandoc installed, it can also read Word and PowerPoint: its list of input formats includes docx and pptx, and it does not list PDF as an input format (Pandoc User’s Guide, read 15 November 2026). So pandoc is a good “DOCX to Markdown” answer and no answer at all for PDF.

pandoc -f docx -t gfm report.docx -o report.md

4. Chunking for search indexes and RAG

For retrieval-augmented generation (RAG), you rarely index a whole document as one block. You split it into chunks, embed each chunk and store it with metadata. Three things matter more than the converter brand:

  1. Chunk size and overlap. Smaller chunks find precise passages; larger ones keep context. A small overlap stops a sentence that falls on a boundary from being lost. Our tool takes chunkSize from 500 to 100,000 characters and a chunkOverlap in characters.
  2. Keep the page. If an answer must cite “page 7”, index page by page. With includePages on, our tool returns one entry per page or slide.
  3. Keep the source. Store the file URL, the title and the page count next to each chunk, so an answer can link back to the original.

A real input that does all three:

{
  "documentUrls": [{ "url": "https://www.rfc-editor.org/rfc/rfc9309.pdf" }],
  "includePages": true,
  "includeText": true,
  "chunkSize": 2000,
  "chunkOverlap": 200,
  "maxPages": 500
}

5. Python or a hosted tool

Python libraries are the right choice when the files are on your machine, you convert often and you want full control.

  • MarkItDown (Microsoft, release 0.1.9 on 21 October 2026 per PyPI) converts PDF, PowerPoint, Word, Excel, HTML and more to Markdown. Its README says the output “is meant to be consumed by text analysis tools” and “may not be the best option for high-fidelity document conversions for human consumption”. It also notes that image captioning and speech transcription “rely on web-hosted services” (read 15 November 2026).
  • PyMuPDF4LLM (Artifex) turns PDFs into Markdown, JSON or text, “includes layout analysis without any GPU requirement” and has LlamaIndex and LangChain integration (docs last updated 13 November 2026, read 15 November 2026). It is distributed under a licence; check Artifex’s terms before you use it in a product.

A minimal MarkItDown call:

from markitdown import MarkItDown

md = MarkItDown()
result = md.convert("report.pdf")
print(result.text_content[:500])

A hosted tool is the right choice when the files are on the web, the list is long, or you do not want to run and patch converters yourself. Our PDF, Word and PowerPoint to Markdown takes links to files, or files you uploaded to an Apify key-value store, and converts each document on its own, with its own memory and time limit, so one broken file never stops the run. It costs from USD 3.00 per 1,000 converted documents (USD 4.00 on the Apify free plan), plus Apify’s own charge for starting a run. Failed, locked, scanned and unsupported files are free. Run it on the Apify Store.

Its limits: up to 1,000 documents per run, files up to 50 MB, up to 2,000 pages per document and at most 5 million characters per row. It reads public links only (no logins or cookies) and stops at CAPTCHAs and bot walls.

6. A checklist before you index

  • Open three sample conversions side by side with the original.
  • Search the Markdown for a table you care about. Are the columns right?
  • Check one two-column page for reading order.
  • Count scanned or locked files; they need OCR or the owner’s unlocked copy.
  • Decide whether you cite by page. If yes, index page by page.

Sources

All read on 15 November 2026.

  1. pandoc, Pandoc User’s Guide, input formats, no page date shown.
  2. Microsoft, MarkItDown README.
  3. Python Package Index, markitdown release history, release 0.1.9 of 21 October 2026.
  4. Artifex, PyMuPDF4LLM documentation, last updated 13 November 2026.
  5. IETF, RFC 9309: Robots Exclusion Protocol, September 2022 (the test file).
  6. Tan Solutions, PDF, Word and PowerPoint to Markdown, cloud run of 13 November 2026, verified 14 November 2026.

Next steps

Related guides