PDF Text & Table Extractor with CSV Tables + OCR
Pricing
from $2.00 / 1,000 document processeds
PDF Text & Table Extractor with CSV Tables + OCR
Extract text, RAG-ready markdown, and tables from PDF URLs. Every detected table becomes its own CSV-ready dataset record. No OCR; scanned pages are flagged, never guessed.
Pricing
from $2.00 / 1,000 document processeds
Rating
0.0
(0)
Developer
Inn Corp
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
2
Monthly active users
5 days ago
Last modified
Categories
Share
PDF Text & Table Extractor with CSV Tables
Give it PDF URLs, get back clean per-page text, RAG-ready markdown, and, the part the other extractors skip, every detected table as its own dataset record with rows, dimensions, and a ready-to-save CSV string. Built for data pipelines, spreadsheets, and AI agents that need the table out of the PDF and into columns, not buried in a wall of page text.
What it does
- Fetches each URL with a single plain HTTP GET, streams it to disk, and processes it page by page (memory stays flat on big documents).
- Writes three record types, discriminated by
recordType:page, one per processed page: extracted text, a light markdown rendering, detected tables, andpageHasTextso you can spot scanned pages programmatically.table, one per detected table: the rows as a 2D string array,rowCount,columnCount, and the same table rendered as an RFC 4180 CSV string you can write straight to a file.summary, one per document, always: status, page counts, tables found, file size, and the PDF's own metadata.
- Page ranges (
"1-5,8,12-"), size caps checked with a HEAD request before any download, and a per-document timeout that keeps partial results.
What it deliberately does not do
- No OCR unless you turn it on. Scanned pages have no text layer, so by
default they honestly come back with empty text and
pageHasText: false. Nothing is hallucinated from images. Turn onenableOcrto read those pages instead; see "Optional OCR for scanned pages" below for exactly how that works and how it is priced. - No perfect tables. Table detection (pdfplumber) is heuristic. The
tableStrategyinput exposes both detection modes, ruled lines and text alignment; if a table looks wrong or missing, try the other one. Complex layouts (merged cells, forms, multi-column pages) can confuse either. - No invented metadata.
title,author, andcreatedcome from the PDF's own metadata dictionary. Missing values arenull, never guessed. - Markdown is deliberately simple: short all-caps lines become headings and detected tables are appended as markdown tables (first row rendered as the header, a layout convention rather than detection). PDFs whose fonts lack proper Unicode maps can yield odd characters; that is the document, passed through honestly.
Documents and privacy
This Actor processes documents you supply. Use it only on PDFs you have the right to access. It fetches URLs with a plain HTTP GET and never bypasses paywalls, logins, or DRM. Your documents' content, including any personal data, is yours; results go only to your own Apify dataset.
Password-protected PDFs are rejected with an encrypted summary record (and
no charge); the Actor never attempts to break protection.
Output examples
Real records from a run against the IRS Form 1040-ES package
(https://www.irs.gov/pub/irs-pdf/f1040es.pdf, 16 pages, 12 tables found).
A table record (page 2, the standard deduction table):
{"recordType": "table","url": "https://www.irs.gov/pub/irs-pdf/f1040es.pdf","page": 2,"tableIndexOnPage": 1,"rows": [["IF your 2026 filing status is...", "THEN your standard\ndeduction is..."],["Married filing jointly or\nQualifying surviving spouse", "$32,200"],["Head of household", "$24,150"],["Single or Married filing separately", "$16,100"]],"rowCount": 4,"columnCount": 2,"csv": "IF your 2026 filing status is...,\"THEN your standard\ndeduction is...\"\r\n\"Married filing jointly or\nQualifying surviving spouse\",\"$32,200\"\r\nHead of household,\"$24,150\"\r\nSingle or Married filing separately,\"$16,100\"\r\n"}
The matching summary record:
{"recordType": "summary","url": "https://www.irs.gov/pub/irs-pdf/f1040es.pdf","status": "ok","error": null,"pageCountTotal": 16,"pagesProcessed": 16,"tablesFound": 12,"fileSizeBytes": 331490,"metadata": {"title": "2026 Form 1040-ES","author": "W:CAR:MP:FP","created": "2026-02-12T06:17:45-05:00"},"fetchedAt": "2026-08-24T06:57:34+00:00"}
page records carry url, page (1-based), text, markdown,
tableCount, pageHasText, charCount, ocrText (null unless enableOcr
is on and OCR found something), and (in the default mode) the tables
array. summary.status is one of ok, error, timeout, too-large, or
encrypted; every failure states its reason in error.
Typical uses
- Pull rate tables, price lists, or financial statements out of PDFs and into CSV without copy-paste.
- Feed page markdown into a RAG index so chunks keep their headings and tables.
- Batch-convert report archives while
pageHasTextflags the scanned pages that need an OCR pass elsewhere. - Let an AI agent read a PDF's actual tables instead of re-typing them.
Optional OCR for scanned pages
Off by default (enableOcr: false); turning it on changes nothing about
pages that already have native text. When it is on, any page whose native
text comes back empty or near-empty (pdfplumber found no real text layer)
is rendered to an image and read with Tesseract OCR. The result goes into a
new ocrText field on that page's record. It never touches text or
markdown: text stays "native extraction only," always, so nothing that
already relied on it changes meaning; ocrText is a separate, clearly
labeled field precisely because OCR output is not as reliable as native
text extraction. There is no blending of the two.
Be honest with yourself about what this buys you:
- OCR quality varies with scan quality. A clean, high-contrast scan
reads well; a skewed, low-resolution, or handwritten page can come back
garbled or empty.
ocrTextis null both when OCR was never attempted (disabled, or the page already had real text) and when it ran but found nothing usable; the field alone cannot tell those apart, only your ownenableOcrsetting andpageHasTextcan. - English by default. This build uses Tesseract's default language pack. Non-English scans will read poorly or fail outright.
- Pages with real text are never OCR'd, so you are never billed for OCR on a page that did not need it.
- Only meaningful when page records are emitted (
outputModeother thantables); table-only runs have no page record forocrTextto live on.
Input
| Field | Meaning |
|---|---|
pdfUrls | Direct links to the PDFs. Required. |
pageRange | 1-based, like "1-5,8,12-" ("12-" = to the end). Empty = all pages. |
outputMode | both (default: page records with text, markdown, and tables, plus table records), text (no table detection), tables (table records only), markdown-only (page records without the raw text field). |
tablesAsRecords | Each detected table as its own CSV-ready record. Default on. |
maxPages | Per-document page cap, default 200. |
maxFileSizeMb | Size cap, default 50. Checked via HEAD before downloading; oversized documents are rejected free of charge. |
timeoutPerPdfSecs | Wall-clock budget per document, default 120. On timeout you keep the pages already extracted and the summary says timeout. |
tableStrategy | lines (ruled tables, default) or text (alignment-based). Detection is heuristic; if results look wrong, try the other strategy. |
enableOcr | Off by default. When on, pages with empty or near-empty native text are OCR'd with Tesseract into a separate ocrText field, billed as an add-on page-ocr event. See "Optional OCR for scanned pages" above. |
Fair pricing
Pay per document processed, per page extracted, and per table extracted, once pay-per-event pricing is enabled. Failed downloads, oversized rejects, and encrypted documents cost nothing; a timeout is only charged when it still delivered pages. No subscription.
OCR is a paid add-on on top of normal extraction, not a replacement for it:
when enableOcr is on and a page's native text is empty or near-empty, a
successful OCR read is billed as its own page-ocr event in addition to
that page's normal page-extracted charge, never instead of it. OCR that
runs but finds nothing usable (garbled scan, blank page) is not charged;
you only pay when you get OCR text back.