PDF and Image to Markdown and Text - Tables and OCR
Pricing
from $1.00 / 1,000 page converteds
PDF and Image to Markdown and Text - Tables and OCR
Convert PDF files and images to clean Markdown or plain text. Keeps headings, lists and tables, reads two-column pages in the right order and runs OCR on scanned pages, screenshots and photos (PNG, JPEG, TIFF, WebP). No external AI services. Built for RAG pipelines and AI agents.
Pricing
from $1.00 / 1,000 page converteds
Rating
0.0
(0)
Developer
Fayoz
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 days ago
Last modified
Categories
Features
Share
Convert PDF files and images into clean Markdown or plain text that language models and search indexes can use directly. The Actor keeps headings, lists and tables, reads two-column pages in the right order and runs OCR on scanned pages that have no text layer. Images (PNG, JPEG, TIFF, WebP, GIF, BMP) are read with OCR too, so the same Actor turns screenshots, photos of documents and scanned images into text.
It runs entirely inside the Actor: no external AI service is called, so your documents are not sent to a third party and the price per page stays low and predictable.
What it does
- Headings - detected from font size and weight and returned as
#,##,###. - Lists - bullets and numbered items are kept as list items.
- Tables - tables drawn with lines are returned as Markdown tables at their place in the text.
- Two-column pages - the left column is read before the right one, so paragraphs are not mixed line by line. Label-value layouts such as invoices are kept row by row.
- Scanned pages - pages without a text layer are recognised with Tesseract OCR. Nine languages are installed:
eng,deu,fra,spa,ita,por,nld,pol,rus. - Images - PNG, JPEG, TIFF, WebP, GIF and BMP files are read with OCR. Every frame of a multi-page TIFF is one page. Photo rotation from the camera (EXIF) is applied, very large photos are scaled down and small screenshots are scaled up before OCR.
- Per-document or per-page results - get the whole document in one field, or one result per page for chunking and citations with page numbers.
- Clear failures - a broken link or a file that is neither a PDF nor an image is reported in the results with
status: "failed"and a reason. The run itself still finishes successfully.
Typical uses
- Prepare contracts, reports, manuals and research papers for retrieval-augmented generation (RAG).
- Give an AI agent the content of a PDF found on the web.
- Turn scanned invoices, letters and photos of documents into searchable text.
- Read the text of screenshots and images in bulk (image to text).
- Extract tables from reports into Markdown that a model can read.
Input
| Field | Type | Default | Description |
|---|---|---|---|
pdfUrls | array of strings | required | Direct, publicly reachable links to PDF files or images (PNG, JPEG, TIFF, WebP, GIF, BMP). The file type is read from the file itself. |
outputFormat | markdown or text | markdown | Markdown keeps structure. Text removes the Markdown markers. |
outputMode | document or page | document | One result per document, or one result per page. |
extractTables | boolean | true | Return ruled tables as Markdown tables. |
ocr | auto, off, force | auto | Auto runs OCR only on pages with no text layer. Images are always read with OCR (they fail with off). |
ocrLanguages | string | eng | Tesseract codes joined with +, for example eng+deu. |
pageRange | string | all pages | For example 1-3,5,8-. Pages start at 1. For multi-page TIFF files the frames are the pages. |
maxPagesPerDocument | integer | 0 | Stop after this many pages per document. 0 means no limit. |
maxFileSizeMb | integer | 50 | Larger files are skipped and reported as failed. Maximum 200. |
includePageMarkers | boolean | false | Insert <!-- page N --> before each page (document layout, Markdown only). |
Example:
{"pdfUrls": ["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"],"outputFormat": "markdown","outputMode": "document","ocr": "auto"}
Example with images:
{"pdfUrls": ["https://example.com/scan-001.png", "https://example.com/receipt.jpg"],"outputFormat": "text","ocrLanguages": "eng+deu"}
To convert a file from your computer, upload it to any location that gives a direct link, for example an Apify key-value store record, and pass that link.
Output
One result per document (default layout):
{"url": "https://example.com/report.pdf","fileName": "report.pdf","fileType": "pdf","status": "succeeded","errorMessage": null,"title": "Quarterly Report","author": null,"creationDate": "2026-01-15T09:30:00+02:00","pageCount": 12,"pagesProcessed": 12,"ocrPages": 2,"tableCount": 3,"charCount": 18450,"wordCount": 2980,"markdown": "# Quarterly Report\n\n## Summary\n\nRevenue grew by 12 percent...\n\n| Region | Q1 | Q2 |\n| --- | --- | --- |\n| Europe | 120 | 135 |","truncated": false,"fullOutputUrl": null,"pageErrors": [],"fileSizeBytes": 482113,"sha256": "3f1c...","processedAt": "2026-11-15T10:00:00+00:00","durationMs": 840}
fileType is pdf, png, jpeg, tiff, webp, gif or bmp. For images title, author and creationDate are null and ocrPages equals pagesProcessed.
In per-page layout each result has page, markdown or text, tableCount, ocr and charCount, plus the document fields url, fileName, fileType, title, author and pageCount.
Very long documents: when the content is longer than 2,000,000 characters the result holds the first part, truncated is true and fullOutputUrl links to the complete file.
Pricing
Pay per event. You pay only for pages that were converted.
| Event | Price |
|---|---|
| Actor start | $0.00005 |
| Page with a text layer | $0.001 |
| Page converted with OCR | $0.004 |
Every image (or every frame of a multi-page TIFF) is one page converted with OCR.
Examples: a 40-page report with a text layer costs about $0.04. A 10-page scanned contract costs about $0.04. 1,000 screenshots cost $4. Failed downloads are not charged.
Set a maximum cost per run in the run options and the Actor stops before it is exceeded.
Free plan: up to 30 pages per run. The Actor stops with a clear message when the limit is reached. Paid Apify plans have no page limit.
Limits and honest notes
- Tables without ruling lines are returned as text rows, not as Markdown tables.
- Heading detection relies on font sizes. Documents that use one size everywhere come out as plain paragraphs.
- OCR quality depends on the scan. Skewed or low-resolution pages and photos give weaker text. Handwriting is not supported.
- Formulas, charts and images are not converted. Text inside images is read only when the page goes through OCR.
- Password-protected PDFs are reported as failed.
- The Actor downloads only the links you provide. It does not crawl websites.
FAQ
Can an AI agent call this Actor? Yes. The input is small and typed, and the output is one JSON record per document or per page.
Does it send my documents anywhere? No. Conversion and OCR run inside the Actor container. Results are stored in your own Apify dataset.
Which languages does OCR support? English, German, French, Spanish, Italian, Portuguese, Dutch, Polish and Russian. Combine them with +.
Can it read images? Yes: PNG, JPEG, TIFF, WebP, GIF and BMP. Pass the image links in pdfUrls, the same way as PDF links.
What happens with a link that is neither a PDF nor an image? The result for that link has status: "failed" and errorMessage explains why. Other links in the same run are still processed.
Changelog
See CHANGELOG.md.