- Published on
PDF to Markdown: Convert, Check Tables, and Fix Missing Text
To convert a PDF to Markdown, first check whether its text can be selected, choose a converter that matches the document, and compare the result with the original before using it. A file ending in .md is not proof that headings, table cells, or missing pages were handled correctly.
This guide is for people turning reports, manuals, or notes into editable text. It includes a local command-line option and a manual review checklist. MoaWiki does not currently provide a PDF-to-Markdown converter. The examples below are constructed editing examples, not a benchmark of conversion tools.
1. Check the PDF before choosing a converter
Open a representative page and try selecting a sentence. Then inspect a page with a table or an image. Selection is a useful first check, not a guarantee: a scanned document can already have an OCR text layer, and that layer can contain errors.
| What you observe | What to try | What to inspect afterward |
|---|---|---|
| Selectable paragraphs in one column | A text-based PDF converter | Headings, lists, line breaks |
| A page that behaves like a photograph | An OCR-capable workflow | Names, numbers, punctuation |
| Two columns or sidebars | A layout-aware conversion workflow | Paragraph order and sidebar placement |
| Dense or merged-cell tables | Table extraction plus manual review | Which value belongs to each header |
| A mixture of scans and selectable text | Check both page types separately | Pages that silently produce little text |
Do not choose an online service solely because its button says “free.” Check its file handling and retention terms before uploading a private document. If you need local processing, distinguish a local converter from a local interface that calls a cloud service.
2. Try a local PDF-to-Markdown conversion
Microsoft MarkItDown offers a command-line conversion path. Its documentation recommends a virtual environment and explains that the output is intended for text analysis rather than high-fidelity reproduction.
With a compatible Python installation, create a separate environment:
python -m venv .venv
Activate it on macOS or Linux:
source .venv/bin/activate
Or in Windows PowerShell:
.\.venv\Scripts\Activate.ps1
Install PDF support and convert a local file:
python -m pip install "markitdown[pdf]"
markitdown "input.pdf" -o "output.md"
Replace input.pdf with your file path. Use a new output filename if you need to preserve an earlier result. These commands follow the linked project documentation; they are not a promise that your PDF will preserve its layout. The standard command does not configure a cloud endpoint or an OCR plugin. Do not assume it will recognize every scanned page.
For documents that need a different extraction path, PyMuPDF4LLM documents Markdown extraction with OCR options. Read its current setup requirements and API reference before selecting an OCR workflow. Changing tools is useful only if the resulting content passes your checks.
3. Review these six things before using the output
Keep the PDF and Markdown open side by side. For a long document, start with the first page, last page, a table, and a complex-layout page. That is a quick diagnostic pass, not a substitute for reviewing all important content.
- Coverage: Find a distinctive sentence near the beginning and end of each important section. Is either missing?
- Reading order: Read across the end of one paragraph into the next. Did a sidebar or second column interrupt the sentence?
- Headings: Do section titles use Markdown headings, or are they indistinguishable from body text?
- Tables: Trace one row from its label through every value. Then check the next row and the units in the header.
- Numbers: Compare dates, decimal points, negative signs, percentages, and identifiers directly with the PDF.
- References: Keep captions, footnote markers, and source page information with the passage they explain.
A Markdown preview helps detect broken syntax. It cannot tell you that a plausible-looking number came from the wrong row.
4. Fix a broken table without guessing
Suppose your source contains this small, invented table:
| Plan | Monthly price (USD) | Seats included |
|---|---|---|
| Starter | 12 | 1 |
| Team | 30 | 5 |
An unsuccessful extraction might give you a sequence like this:
Plan Monthly price Seats
Starter Team
12 30
1 5
Do not ask an AI tool to infer the rows and then accept the result without checking. Return to the PDF, match each row label with its values, and rebuild the table explicitly:
| Plan | Monthly price (USD) | Seats included |
| ------- | ------------------- | -------------- |
| Starter | 12 | 1 |
| Team | 30 | 5 |
Preserve the units rather than copying only the numbers. If a header spans multiple columns, write an unambiguous header for each output column. If a relationship cannot be represented cleanly, keep the original table image with a page reference or use a spreadsheet instead of forcing it into a simple Markdown table.
5. Handle missing text and repeated page furniture
| Symptom | Check before editing | Possible next step |
|---|---|---|
| A page produces almost no text | Whether it is a scan or diagram | Use OCR where appropriate, then compare with the page |
| Every paragraph contains the document title | Whether page headers were inserted | Remove only verified repeated header lines |
| Words appear split at line endings | Whether the hyphen is part of the word | Repair the specific line break after checking the source |
| Text from two columns is interleaved | The intended reading sequence | Reorder paragraphs against the original |
| A formula turns into unfamiliar characters | The rendered formula in the PDF | Preserve the image or transcribe and verify it |
Avoid a global rule such as “delete every short line” or “remove every hyphen.” That can erase labels, list items, and legitimate words. Make a copy of the first conversion so you can inspect what each cleanup step changed.
6. Keep a review note with the Markdown
Copy this checklist into a separate note. It is an editorial aid created for this guide, not converter output:
# Conversion review
- Source filename:
- Source version or date:
- Conversion tool and version:
- Pages or sections checked:
- [ ] Important sections are present
- [ ] Paragraphs follow the source reading order
- [ ] Table headers, rows, and units match
- [ ] Important numbers were checked against the PDF
- [ ] Captions and references remain identifiable
- [ ] Unresolved errors are listed below
## Unresolved issues
- Source page / section:
- What needs checking:
For notes that will be used with an AI assistant, keep source page or section references where you can verify them. Do not insert invented page numbers. A clean-looking Markdown file can still contain extraction errors, so preserve access to the original.
Frequently asked questions
Is PDF to MD different from PDF to Markdown?
In this context, .md is the file extension commonly used for Markdown. Renaming a PDF to .md does not convert its contents.
Why is my output mostly plain text?
The converter may have extracted text without identifying the structure you expected. Check whether headings and tables are present in the output, and whether the source layout can be reconstructed reliably. A different tool may help, but review the actual result rather than relying on the format label.
Can I convert a scanned PDF?
You need a workflow that recognizes text in the scan, usually through OCR. An existing selectable text layer may still require review. The OCR setup and supported languages depend on the tool you choose.
Should I upload a confidential PDF to an online converter?
Use a workflow permitted for that document. Check the provider's handling terms and whether any OCR or AI step sends the file to another service. Running a program on your computer does not by itself establish that every enabled feature is offline.
Sources and scope
Project documentation checked on September 26, 2026:
- Microsoft MarkItDown: installation, PDF support, and CLI usage
- PyMuPDF4LLM overview
- PyMuPDF4LLM API and OCR options
The review process, sample table, and checklist are MoaWiki editorial examples. This article does not report measured conversion accuracy or claim that one tool is best for every PDF.