PDF & Office to Markdown for RAG — tables, chunks, OCR
Pricing
from $1.00 / 1,000 page converteds
PDF & Office to Markdown for RAG — tables, chunks, OCR
Convert PDFs, scans, images, Word, Excel and PowerPoint into clean Markdown for LLMs and RAG: real tables (Markdown, CSV, cells), correct reading order in multi-column layouts, headers and footers removed, and ready-to-embed chunks with page and section. Automatic OCR only on scanned pages.
Pricing
from $1.00 / 1,000 page converteds
Rating
0.0
(0)
Developer
LIF
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
Turn PDFs, scanned documents, images, Word, Excel and PowerPoint files into clean Markdown that LLMs and RAG pipelines can use directly:
- 📊 Tables come out as tables — as Markdown, CSV and a cell array (
rows), not as jumbled lines of text. Tables whose ruling only separates groups of rows are split back into one row per record. - 📰 Correct reading order in two- and three-column layouts (papers, reports, government gazettes).
- 🧹 Repeated headers, footers and page numbers removed, and paragraphs broken across columns or pages joined back together.
- 🧩 Ready-to-embed chunks that follow section boundaries, carry their page range and section path (
Introduction > Method), and never cut a table without repeating its header row. - 🔍 Automatic OCR only where needed: pages without a usable text layer and images are OCR'd (Spanish + English by default; Portuguese, French, German and Italian available). Pages with text are not, so they stay fast and cheap.
- 📁 One Actor for every format: PDF, PNG, JPG, WEBP, TIFF, BMP, DOCX, XLSX, PPTX (including speaker notes), TXT, MD and CSV.
No LLM inside: deterministic, fast (≈0.2 s per text page) and your documents are not sent to any third-party AI service.
How to use it
- Paste public URLs of your documents, or upload files and select the storage they were uploaded to in Storage with uploaded files (the Actor runs with limited permissions and can only read the storage you choose).
- Pick the output: one item per document, per chunk (ready for a vector database) or per page.
- Run it. Leave the input empty to try a demo document (not charged).
From code or an AI agent, call it through the Apify API or MCP with {"documents": ["https://example.com/report.pdf"]}.
Input
| Field | Default | What it does |
|---|---|---|
documents | — | Files or URLs (up to 50 MB each). |
storage | — | The key-value store with your uploaded files. |
output_mode | document | document, chunks or pages. |
chunk_tokens | 800 | Target chunk size (≈4 characters per token). 0 = no chunks. |
chunk_overlap | 80 | Text repeated at the start of the next chunk when a section is split by size. |
ocr | auto | auto, always (PDFs with a broken text layer) or never. |
ocr_languages | spa+eng | Languages of scanned pages. |
pages | all | Page or slide range, e.g. 1-5, 8, 12-. |
max_pages | 200 | Safety limit per document. |
include_pages | false | Adds per-page Markdown, method and OCR confidence. |
save_markdown_files | true | Also saves a .md file per document, with a link in the result. |
Output (document mode)
{"file": "report.pdf","status": "ok","format": "pdf","page_count": 12,"metadata": {"title": "Annual report", "author": "…", "creationdate": "2026-03-02T10:15:00+00:00"},"markdown": "# Annual report\n\n## Results\n\n| Plot | Water (m³) | Yield (kg) |\n| --- | --- | --- |\n| A1 | 1,200 | 3,450 |…","tables": [{"table_id": 1, "page": 3, "n_rows": 4, "n_cols": 3, "rows": [["Plot", "Water (m³)", "Yield (kg)"], ["A1", "1,200", "3,450"]], "markdown": "…", "csv": "…"}],"chunks": [{"chunk_id": 1, "section": "Annual report > Results", "pages": [3, 4], "tokens_est": 612, "text": "…"}],"billing": {"page": 11, "ocr-page": 1},"stats": {"chars": 41250, "tokens_est": 10313, "n_tables": 4, "n_ocr_pages": 1, "removed_header_footer_lines": 22},"markdown_file": "https://api.apify.com/v2/key-value-stores/…/records/001-report.md","warnings": []}
In chunks mode each item is one chunk: file, chunk_id, chunk_count, section, pages, tokens_est, text, title. In pages mode each item is one page with its Markdown and tables.
Pricing
Pay per event, only for pages that produced text:
| Event | Price | When |
|---|---|---|
page | $0.001 | A PDF page with a text layer, a slide, or every 3,000 characters of DOCX/XLSX/TXT output |
ocr-page | $0.003 | A scanned page or image that needed OCR and returned text |
Empty pages, failed downloads, unsupported files and the demo are not charged. The run stops when it reaches the maximum cost per run you set.
Limits (honest list)
- Tables are detected on PDF pages with a text layer when they have ruling lines. Tables without lines and tables inside scanned pages come out as text (you get a warning).
- OCR is Tesseract: clean prints read very well; handwriting, very small text and photos with heavy blur do not.
- Headings in PDFs are inferred from font size and bold; Word headings come from their styles.
- Legacy
.doc,.xlsand.pptare not supported (save them as DOCX/XLSX/PPTX or PDF). Password-protected PDFs are not supported.
Privacy and permissions
- Network access only to download the files you give it. The Apify token is only ever sent to
api.apify.com. - Files are processed in the run's container and deleted when it ends. Results stay in your own dataset and key-value store.
- Limited permissions: the Actor can only read the storage you select.
- Open-source engines with permissive licenses (pdfplumber, pypdfium2, Tesseract, OpenCV, python-docx, openpyxl, python-pptx). Pinned dependencies.
Feedback
Found a document that converts badly? Open an issue on the Actor page with a public link to it (or a similar one) and it will be looked at.