PDF to Text, Markdown and Tables (with OCR) avatar

PDF to Text, Markdown and Tables (with OCR)

Pricing

from $3.00 / 1,000 pdf processeds

Go to Apify Store
PDF to Text, Markdown and Tables (with OCR)

PDF to Text, Markdown and Tables (with OCR)

Convert PDFs to clean text, Markdown and tables for RAG and AI pipelines. Scanned pages are OCR'd automatically. $0.003 per PDF + $0.004 per OCR page.

Pricing

from $3.00 / 1,000 pdf processeds

Rating

0.0

(0)

Developer

Gigsmith

Gigsmith

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

PDF to Text, Markdown and Tables (with OCR for scanned pages)

PDF to Text, Markdown and Tables converts PDF files into clean plain text, LLM-ready Markdown and structured tables. Pages with no text layer, such as scans, faxes and photographed documents, are detected and read with OCR automatically. Paste PDF links or upload files and get one result row per PDF.

Pricing: $0.003 per PDF plus $0.004 per scanned page that needs OCR. Text-layer pages cost nothing extra.

What does this PDF extractor do?

  • 📄 PDF to text: the PDF's own text layer in reading order, with pages separated by a form feed (\f), just like pdftotext
  • 📝 PDF to Markdown: text and tables in page order, with a <!-- page N --> marker per page, ready for RAG chunking, embeddings and LLM prompts
  • 📊 Table extraction: ruled tables come back as rows (arrays of cells) and as Markdown tables, and their text is kept out of the body text so nothing is duplicated
  • 🔎 OCR fallback for scanned pages (Tesseract 5, 20 languages): only pages with no usable text are OCR'd, so mixed PDFs cost the least
  • 🗂️ Per-page output: text, OCR flag, OCR confidence, table and image counts for every page
  • 🔐 Password-protected PDFs: supply the password as an encrypted secret input
  • 🧾 Metadata: title, author, creator, producer and dates
  • 💸 Fair billing: broken links, non-PDF files and corrupt PDFs are reported and never charged

Who is it for?

  • AI and RAG builders who need clean Markdown from document collections
  • Analysts, legal and finance teams extracting text and tables from reports, contracts, statements and filings
  • Automation builders on Make, Zapier or n8n who need PDF text in a workflow
  • Archivists digitising scanned paperwork

How to convert PDF to text and Markdown

  1. Click Try for free.
  2. Paste public PDF links into PDF URLs, or upload files under Or upload PDFs.
  3. Leave OCR for scanned pages on Auto. Set OCR languages if your scans aren't in English.
  4. Click Start. Download the results as JSON, CSV or Excel, or read them with the Apify API. Use the Tables and Pages views in the Output tab for one row per table or page.

Input example

{
"fileUrls": ["https://example.com/reports/q3-2026.pdf", "https://example.com/scans/contract.pdf"],
"ocrMode": "auto",
"ocrLanguages": ["eng"],
"extractTables": true,
"includePages": true
}
FieldWhat it does
fileUrls / uploadedFilesPDF links or uploaded PDFs
ocrModeauto (scanned pages only, default), always (OCR every page), never (text layer only, no OCR charges)
ocrLanguagesTesseract codes such as eng, deu, fra, spa, heb, ara, chi_sim, jpn
extractTablesDetect ruled tables (default true)
includePagesAdd per-page results (default true)
pdfPasswordSecret. Password for protected PDFs
maxPagesPages per PDF to process (default 500)
ocrMinCharsIn auto mode, an image-covered page with fewer characters than this is OCR'd (default 25). Pages with no text at all are always OCR'd.
ocrDpiOCR render resolution, 150–400 (default 300)

Output example

This is real output from a test run on a one-page sales report:

{
"fileName": "sales_report_tables.pdf",
"status": "ok",
"pageCount": 1,
"ocrPageCount": 0,
"tableCount": 2,
"charCount": 276,
"text": "Quarterly Sales Report - Q3 2026\nThis report summarises sales by region for the third quarter. ...",
"markdown": "<!-- page 1 -->\n\nQuarterly Sales Report - Q3 2026\n...\n\n| Region | Q2 revenue | Q3 revenue | Change |\n|---|---|---|---|\n| North America | $410,200 | $438,900 | +7.0% |\n| EMEA | $265,000 | $318,400 | +20.2% |\n...",
"tables": [
{
"page": 1, "index": 1, "rowCount": 5, "columnCount": 4,
"rows": [["Region", "Q2 revenue", "Q3 revenue", "Change"], ["North America", "$410,200", "$438,900", "+7.0%"]],
"markdown": "| Region | Q2 revenue | Q3 revenue | Change |\n|---|---|---|---|\n..."
}
],
"pages": [{ "page": 1, "text": "...", "ocr": false, "ocrConfidence": null, "tableCount": 2, "imageCount": 0 }],
"processingSeconds": 0.05
}

On a mixed PDF (one digital page followed by two scanned pages), pages[].ocr comes back [false, true, true] and ocrPageCount is 2. You're charged $0.003 + 2 × $0.004 = $0.011.

How much does PDF extraction cost?

Pay-per-event pricing means you pay only for what was actually processed.

EventPriceWhen it's charged
pdf-processed$0.003Once per PDF that opened and converted successfully
ocr-page$0.004Once per page read with OCR (scanned pages in Auto mode, or every page in Always mode)
  • Apify platform usage is included. The only other charge is Apify's standard run-start event of $0.00005 per run ($0.05 per 1,000 runs).
  • 1,000 digital PDFs cost $3.00, whatever their page count (up to maxPages).
  • A 20-page fully scanned PDF costs $0.003 + 20 × $0.004 = $0.083.
  • Use ocrMode: "never" to guarantee you never pay for OCR.
  • Failed PDFs are not charged. Set Max charge per run to cap spend. If the cap is reached mid-PDF, the remaining scanned pages are left un-OCR'd (ocrSkippedPages) and not charged.

Limits and tips

  • Tables are detected from ruled lines. Tables drawn with whitespace only (common in academic papers) stay as text in reading order.
  • OCR reads printed text well, but handwriting and very low-quality scans give poor results. Check pages[].ocrConfidence.
  • Multi-column layouts come out column by column in most PDFs, but complex magazine layouts can interleave.
  • Very large outputs: if the Markdown exceeds 2 MB, the full file is saved to the run's key-value store and linked in markdownUrl.

FAQ

Is this good for RAG? Yes. Split markdown on <!-- page N --> markers or headings, and use tables[].rows for structured data.

Are my PDFs stored? PDFs are downloaded into the run's container, processed locally (no third-party APIs) and deleted when the run ends. Results stay in your own Apify storage.

Can I process PDFs from Google Drive or Dropbox? Yes, if the link is a public direct-download link.

Found a PDF that converts badly? Open an issue on the Issues tab with the run link.

Keywords

PDF to text, PDF to Markdown, PDF table extraction, PDF table extractor, extract tables from PDF, PDF OCR, scanned PDF to text, PDF parser, PDF text extractor, PDF for RAG, PDF to LLM, document parsing, bulk PDF converter, invoice PDF, pdfplumber, Tesseract


Made by Gigsmith.