Scanned PDF OCR to Markdown Offline (Fix Empty PDF Output)

Got an empty .md file with only '# filename' and '<!-- Page N -->' comments? Your PDF has no text layer—convert scans offline on Windows with bundled Tesseract OCR.

How Scanned PDF & Images (Offline OCR) Conversion Works

Why do browser PDF converters sometimes output an empty file containing only `# filename` and `<!-- Page N -->` comments? In MarkItDown's browser converter, `pdfjs-dist` reads embedded digital text via `getTextContent()`. When a PDF is created by a scanner or camera, it stores raster page images with zero selectable text items—so text-only browser parsing has nothing to extract. Quick 5-second diagnostic check: open your PDF and try highlighting one word. If text selects cleanly, convert it in your browser at /pdf-to-markdown (requires free account sign-in with 7-day history sync). If clicking only drags over an image, your PDF requires OCR. MarkItDown for Windows (MarkItDown Setup 1.1.1.exe, 352.2 MB All-in-One bundle, or Microsoft Store on Windows 10/11 x64) bundles Microsoft MarkItDown together with local offline Tesseract OCR, FFmpeg/FFprobe for MP3/WAV/M4A audio, ZIP unpacking, and Outlook .msg extraction—with zero Python, pip, or cloud API keys.

Attaching multi-page scanned PDFs, signed NDA contracts, or photographed lecture handouts directly to ChatGPT or Claude forces vision models to process high-resolution page rasters, eating context tokens fast while exposing confidential pages to external servers. Running offline Tesseract OCR locally on Windows converts image-only PDFs and photos (JPG, PNG, WEBP, TIFF, BMP, GIF) into lean, searchable Markdown before a single prompt is sent.

Key Benefits

  • Fixes Blank '# filename / <!-- Page N -->' Exports: Solves the exact cause of empty PDF conversions: browser pdfjs-dist only reads digital text layers, while MarkItDown for Windows runs offline Tesseract OCR on scanned raster pages.
  • 5-Second Highlight Diagnostic Check: Try selecting a word in your PDF. Selectable text converts in-browser at /pdf-to-markdown; unselectable scanned pages belong in MarkItDown for Windows (/download/windows).
  • 100% Offline Privacy for NDAs & Records: Legal contracts, medical forms, and internal audits never touch third-party cloud OCR APIs—every byte is processed locally on your Windows 10/11 x64 PC.
  • All-in-One Bundle: Zero Python or API Keys: MarkItDown Setup 1.1.1.exe (352.2 MB) and the Microsoft Store app pre-bundle Microsoft MarkItDown, offline Tesseract OCR, FFmpeg/FFprobe for audio, ZIP archives, and Outlook .msg.

Conversion Steps

  1. Run the 5-second highlight check on your PDF: Try selecting text inside your PDF. Digital selectable text works in the browser at /pdf-to-markdown; unselectable scanned pages require offline Windows OCR.
  2. Install MarkItDown for Windows (No Python needed): Download MarkItDown Setup 1.1.1.exe (352.2 MB All-in-One bundle) or install via Microsoft Store on Windows 10/11 x64 at /download/windows.
  3. Drop scanned PDFs or images into the desktop app: Add .pdf scans or .png, .jpg, .tiff, .webp, .bmp, and .gif images. Bundled offline Tesseract OCR extracts text locally with zero API keys.
  4. Export clean Markdown or sync history: Save the extracted .md file locally for Obsidian, RAG, or Claude context (/convert/pdf-to-claude-context), and optionally sync conversion history with your free MarkItDown account.

Sample Markdown Output (Scanned_NDA_Amendment_300dpi.pdf (4.6 MB))

# Scanned_NDA_Amendment_300dpi

## Mutual Non-Disclosure Addendum

Effective Date: November 15, 2026

1. **Confidential Scope:** All technical schematics and vendor pricing schedules marked Confidential remain strictly offline.
2. **Term:** Obligations survive for three (3) years from execution.

| Signatory | Role | Execution Status |
| --- | --- | --- |
| Operations Lead | Disclosing Party | Signed (Page 2) |
| Legal Counsel | Receiving Party | Signed (Page 2) |

Desktop OCR & Browser Extension Options

Scanned PDFs and standalone image formats (.png, .jpg, .tiff, .webp, .bmp, .gif) require offline Tesseract OCR in MarkItDown for Windows (/download/windows)—browser pdfjs-dist only parses digital selectable-text PDFs. Download MarkItDown for Windows or install MarkItDown Companion.

Frequently Asked Questions

Why did my PDF convert to an empty file with only '# filename' and '<!-- Page N -->' comments?

The browser converter uses pdfjs-dist getTextContent(), which only reads embedded selectable text layers. Image-only scanned PDFs contain zero text items, producing page markers with empty body text—switch to MarkItDown for Windows (/download/windows) for offline Tesseract OCR.

What is the fastest way to tell browser pdfjs-dist parsing vs. Windows offline OCR apart?

Open the PDF and try highlighting a word with your cursor. If text highlights, convert it locally in the browser at /pdf-to-markdown (requires free account sign-in). If clicking only drags a box over an image, use MarkItDown for Windows.

Does MarkItDown for Windows require Python, pip, or external OCR API keys?

No. MarkItDown Setup 1.1.1.exe (352.2 MB) and the Microsoft Store build bundle Microsoft MarkItDown and offline Tesseract OCR in one Windows 10/11 x64 app with zero Python setup or cloud keys.

What other formats does MarkItDown for Windows handle besides scanned PDFs?

Alongside scanned PDFs and JPG/PNG/GIF/BMP/TIFF/WEBP images (/convert/image-ocr-to-markdown), the Windows desktop app converts DOCX, PPTX, XLSX/XLS, CSV, JSON, XML, HTML, TXT/MD, EPUB, ZIP archives, Outlook .msg emails, and MP3/WAV/M4A audio workflows via bundled FFmpeg/FFprobe.

How do MarkItDown's offline Tesseract OCR and cloud parsers like LlamaParse differ?

MarkItDown for Windows keeps sensitive scans 100% offline on your PC with zero API keys, whereas cloud parsers like LlamaParse (/compare/markitdown-vs-llamaparse) upload files to external servers for VLM layout parsing.

Related Converters & Guides