PDF to Markdown: Word, PPT, Excel, OCR, Tables, RAG avatar

PDF to Markdown: Word, PPT, Excel, OCR, Tables, RAG

Pricing

from $1.50 / 1,000 document converteds

Go to Apify Store
PDF to Markdown: Word, PPT, Excel, OCR, Tables, RAG

PDF to Markdown: Word, PPT, Excel, OCR, Tables, RAG

Convert PDF to Markdown (also Word, PowerPoint, Excel, HTML) for LLMs and RAG. Tables, two-column layouts, OCR for scans, password PDFs, heading-aware chunks. Failed files are free.

Pricing

from $1.50 / 1,000 document converteds

Rating

0.0

(0)

Developer

Prometheus

Prometheus

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

20 days ago

Last modified

Features

Limited permissions

Share

PDF to Markdown: Word, PowerPoint, Excel, OCR, Tables, RAG

A table from page 6 of a PDF and the same table as Markdown output

Give it links to PDF, Word, PowerPoint, Excel, HTML, CSV or EPUB files. You get back clean Markdown or plain text, plus metadata and optional RAG chunks, ready for an LLM, a vector database or a search index.

Quick start

Press Start: the default input converts the arXiv paper "Attention Is All You Need". To run your own files, send this:

{
"startUrls": [{"url": "https://arxiv.org/pdf/1706.03762"}],
"chunkSize": 1500
}

Leave out chunkSize if you only want the Markdown.

Output (one item per document)

The result for the input above:

{
"url": "https://arxiv.org/pdf/1706.03762",
"status": "ok",
"fileType": "pdf",
"pageCount": 15,
"pagesProcessed": 15,
"metadata": {"creator": "LaTeX with hyperref", "producer": "pdfTeX-1.40.25"},
"markdown": "# Attention Is All You Need\n\n## Abstract\n\nThe dominant sequence transduction models ...",
"chunks": [{"index": 0, "headings": ["Attention Is All You Need", "Abstract"], "text": "..."}],
"warnings": []
}

Failed downloads or unreadable files come back with status: "error" and a reason. They are never charged.

Features

  • Markdown with structure: headings detected from font size and weight, paragraphs re-joined across line breaks, hyphenation repaired, bullet lists, and tables rendered as Markdown tables. That covers fully ruled tables, tables drawn with horizontal lines only (the usual style in research papers and reports), lines drawn cell by cell, and lists with only column borders.
  • Correct reading order: two-column papers, newsletters and many-column newspaper pages are read one column at a time. Every PDF result is checked against the PDF's own text layer, and you get a warning if words seem to be missing.
  • Clean output: rotated watermarks and stamps ("PAID", "DRAFT") are removed, and Chinese and Japanese text comes without stray spaces between characters
  • OCR for scanned PDFs: pages without a text layer are read with Tesseract OCR automatically, in 41 languages
  • Password-protected PDFs: give the password once and it's stored encrypted
  • Clean text: running headers, footers and page numbers removed (optional)
  • Metadata: title, author, subject, creator, dates, page count, file size, SHA-256
  • RAG chunks (optional): chunks of roughly the size you choose, split on paragraph boundaries, each tagged with the headings it sits under
  • Tables as JSON (optional): every detected PDF table as rows of cells

How good is it

On AI2's olmOCR-bench pages this converter passes 63% of the text-layer checks (373 of 591), up from 49% (289) when I started. It is also regression-tested on 1,068 broken PDFs from Mozilla's pdf.js suite.

Typical uses

  • Ingesting reports, papers, manuals and contracts into a RAG pipeline
  • Bulk-converting document links found by another scraper
  • Making PDFs searchable or diff-able as text

Input

FieldWhat it does
Document URLsDirect links to files. The type is detected from the content, not just the extension.
Output formatmarkdown, text or both
Chunk size / overlapSet a chunk size to get chunks ready for embedding
PDF page rangee.g. 1-5,8,10-
PDF passwordOpens password-protected PDFs. Stored encrypted.
Max pages per PDFCaps work and cost on very long files
OCR mode / languagesauto reads scanned pages only; choose the document languages

Use it from code

Call it as an API and get the results back as JSON in one request:

curl -X POST "https://api.apify.com/v2/acts/prometheus-maker~pdf-document-to-markdown/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"startUrls": [{"url": "https://arxiv.org/pdf/1706.03762"}], "chunkSize": 1500}'

A tested Python example is in pdf_to_markdown.py in the examples repo.

Pricing

Pay per use: a small fee per converted document plus a small fee per page. PowerPoint counts one page per slide; files without pages (Word, Excel, HTML, CSV, EPUB) count one page per 3,000 characters of text, about one printed page. OCR pages cost extra because they need far more compute. Failed documents cost nothing. Use Max pages per PDF to cap the cost of very long files.

Limits

  • OCR quality depends on scan quality; OCR output is plain paragraphs (no headings or tables).
  • Tables with no lines at all come out as text, not as Markdown tables.
  • Math in PDFs comes out as plain text (no LaTeX). Equations in Word files do become LaTeX, like $β_{0}+β_{t}x_{t}$.
  • Password-protected Word, Excel and PowerPoint files, and old .doc/.ppt files, are not supported: you get a clear error and pay nothing. Old .xls spreadsheets work.
  • Some damaged or unusual PDFs can't be read by the main engine. Those are read with a second engine (PDFium, the one in Chrome) as plain text, with a warning in warnings.
  • Files up to 100 MB. Very large Word files can need more memory: one whose text alone was 12.5 MB used 791 MB, so give runs with such files 2 GB.

About

Built and maintained by Prometheus.