local/tools
pdf / Python, bundled / v1.0.3

PDF to Markdown

Convert PDFs to clean Markdown and JSONL chunks for RAG, keeping tables and reading order.

Install

  • install
    irm https://raw.githubusercontent.com/chayprabs/localtools/main/pdf-to-markdown/install.ps1 | iex
  • update
    localtools-pdf-to-markdown update
  • remove
    localtools-pdf-to-markdown uninstall

Opens at http://127.0.0.1:47104 in your browser. Run localtools-pdf-to-markdown --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.

Direct download

PlatformFileSize
Linux x64pdf-to-markdown-1.0.3-linux-x64.zip41.2 MB
macOS Apple Siliconpdf-to-markdown-1.0.3-macos-arm64.zip28.4 MB
macOS Intelpdf-to-markdown-1.0.3-macos-x64.zip28.9 MB
Windows x64pdf-to-markdown-1.0.3-windows-x64.zip24.0 MB

SHA-256 checksums are in the release notes; the install scripts verify them for you.

See it

How to use

  1. Choose or drop a PDF (up to 64 MiB). It needs a text layer; scanned pages are reported, not OCR'd.
  2. Optionally enter a page range like 1-5,9, a chunk size in tokens and an overlap, and tick Extract images.
  3. Press Convert. Read the result as rendered Markdown, as raw Markdown, or as the chunks table with pages and heading paths.
  4. Download the Markdown, the ZIP with images, or the chunks as JSONL for your RAG pipeline.

FAQ

Does it handle two-column papers and tables?

Yes. Columns are detected from the gaps between them and read one after the other. Ruled tables, tables ruled only between columns, and tables bounded by horizontal rules (booktabs) become Markdown tables, or HTML tables when cells are merged. Tables aligned only by spaces stay as text.

What is in the JSONL chunks?

One object per line with the chunk text, estimated tokens, page numbers, heading path and start/end character offsets. Each chunk is an exact slice of the Markdown, chunks start at headings and repeat about the overlap you set when a section is split.

Can it read scanned PDFs?

No. There is no OCR, so pages without a text layer are reported by number and left empty, and a fully scanned PDF gets a clear 'no text layer' error.

Can I use it from the command line?

Yes: localtools-pdf-to-markdown convert in.pdf -o out.md (or -o out.zip with images), and localtools-pdf-to-markdown chunks in.pdf --max-tokens 512 --overlap 64 -o chunks.jsonl.

What are the limits?

64 MiB and 1,000 converted pages per PDF (use a page range for longer ones), 120 seconds per conversion and two at a time. Each conversion runs in a worker process that is killed if it runs too long. Nothing leaves your computer.