PDF to Text & OCR - Scanned PDFs, Images, Word, Japanese avatar

PDF to Text & OCR - Scanned PDFs, Images, Word, Japanese

Pricing

from $2.10 / 1,000 documents

Go to Apify Store
PDF to Text & OCR - Scanned PDFs, Images, Word, Japanese

PDF to Text & OCR - Scanned PDFs, Images, Word, Japanese

PDF to text and OCR: extract text from PDFs, scanned PDFs, images (PNG, JPEG, WebP) and Word by link, upload or key-value store. Scans and photos go through AI OCR. Lines joined, headers and page numbers removed, Japanese-ready. $0.003 per 20 text pages, $0.004 per OCR page + AI cost.

Pricing

from $2.10 / 1,000 documents

Rating

0.0

(0)

Developer

Quiet Works Lab

Quiet Works Lab

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 days ago

Last modified

Features

Limited permissions

Share

Get clean text out of PDF and Word (DOCX) files, and with OCR out of scanned PDFs and images (PNG, JPEG, WebP), from direct file links, a key-value store in your Apify account or files you upload: wrapped lines are joined back into paragraphs (no extra spaces between Japanese characters), headers, footers and page numbers are removed, and you get one dataset row per document or per page.

Price: $0.003 per 20 PDF pages with a text layer (or per 50,000 characters of a Word file), and $0.004 per OCR page (a scanned page or an image read by the AI), on the FREE tier, less with Apify Store discounts (see Pricing). The AI model used for OCR is billed separately to your Apify account by Apify's apify/openrouter Actor at OpenRouter's price, without any markup (about $0.0005-0.002 per page on paid Apify plans, about 10 times that on the Free plan). The built-in samples, files that fail, blank pages, pages the OCR could not read and pages left by your limits have no charge of this Actor; Apify's Actor start event ($0.00005 with the default 1 GB of memory) applies to every run. With ocr: "off" nothing is sent to any AI.

What the built-in sample PDF gives (3 pages, Japanese and English). Before, as the lines sit in the PDF, page 1:

Quiet Works Lab — 見本の文書 / Sample document
- 1 -
PDF Text Extractor の見本 / Sample document
この文書は、PDF Text Extractor の動きを確かめるための見本です。日本語の文章は、PDF の中で
は行ごとに切れて入っています。この Actor は、折り返しの改行を段落にまとめ直し、漢字やかな
の間に余計な空白を入れません。そのまま検索や要約、RAG の材料に使えます。

After (the default settings; the running header stays where it first appears and is removed from pages 2 and 3):

Quiet Works Lab — 見本の文書 / Sample document
PDF Text Extractor の見本 / Sample document
この文書は、PDF Text Extractor の動きを確かめるための見本です。日本語の文章は、PDF の中では行ごとに切れて入っています。この Actor は、折り返しの改行を段落にまとめ直し、漢字やかなの間に余計な空白を入れません。そのまま検索や要約、RAG の材料に使えます。

The row of the built-in scanned sample (a page picture without any text layer; in the default run its OCR text is prepared, so there is no AI call; text shortened and a few fields left out here):

{"status": "ok", "source": "sample", "fileName": "sample-scan.pdf", "format": "pdf", "pageFrom": 1, "pageTo": 1, "pageCount": 1,
"text": "Quiet Works Lab - Scanned Sample\n\nThis page is a picture of printed text, made for PDF Text Extractor. …\n\nこのページは、PDF Text Extractor の見本として作った文字の画像です。…",
"charCount": 324, "emptyPages": 1, "needsOcr": true, "textSource": "ocr", "ocrPages": 1, "ocrPrepared": true,
"ocrNote": "Built-in sample: the OCR text is prepared (no AI call, not charged).", "chargedEvents": 0, "chargedOcrPages": 0, "errorCode": null}

Click Try for free (free Apify account), then Start. Without links, a store or uploads, the Actor reads its three built-in samples (the PDF above, a small Word file with a heading, two paragraphs and a table, and the scanned page, all written for this Actor) and writes three rows within seconds. The scanned page is drawn for OCR like any scan, but its text comes from the sample's known text: no AI call, no charge.

Typical uses

  • Turn PDF reports, manuals, contracts and papers into plain text for search, summaries or an LLM.
  • Read scanned PDFs, photos of documents and screenshots, also dark-mode ones (a phone screenshot is one OCR page; a long screenshot is cut into parts of up to 2,800 px).
  • Prepare documents for RAG: one row per page (splitBy: page), or Markdown with headings.
  • Extract Japanese PDFs without the stray spaces and broken lines that make them hard to search or chunk.
  • Read the PDFs, Word files or images that another Actor saved in its key-value store, right after it finishes.

Only use files you have the right to use.

How it works

  1. Files in: give direct links to PDF, DOCX, PNG, JPEG or WebP files (one GET per link, see File links), choose a key-value store (optionally only the keys that start with a prefix), and/or upload files in the input form. They are read one at a time: the store, the uploads, then the links. Store records that are not PDF, DOCX or (with OCR on) images are skipped. The format is detected from the file's first bytes, not from its name.
  2. Checks before any charge: the file size (100 MB; images 25 MB and 60 megapixels, read from the header before the image is decoded), the memory the file needs, the page count (2,000 per file, or the pages you choose) and whether your maximum cost per run still covers the work. A file that fails a check gets a row with the reason and is not charged.
  3. Reading the text layer: PDFs are read with pdf.js (fonts are never run as code, no scripts) in a separate worker that is stopped after 120 seconds per file, or as soon as the run uses more than 60% of its memory (some small PDFs unpack to gigabytes): that file fails with TOO_LARGE_FOR_MEMORY and the run goes on with the next one. The Japanese character maps that come with pdf.js are used. DOCX files are unpacked with size and count limits; document type declarations are refused, so no external entities are ever read.
  4. OCR (ocr: auto, the default): the pages without a usable text layer go to OCR: all pages of a scan (a PDF with fewer than 10 characters of text, or whose characters are all unreadable), or the empty pages of a PDF where half or more of the pages have no text (the other pages keep their text layer), and every image. With ocr: always, every PDF page goes to OCR. Each page is drawn at about 2,000 px on its long side (A4 at about 170 dpi) in another worker under the same memory watchdog, with pdf.js's own decoders for JPEG, JPEG 2000, JBIG2 and CCITT fax scans. An image is drawn at its own size (scaled down only when it is wider than 2,000 px). An image up to about 2,000 x 2,800 px is one OCR page (a phone screenshot of 1,080 x 2,400 or 1,170 x 2,532, a US Legal page too); a taller one (a long screenshot, a receipt) is cut into parts of at most 2,800 px at the lightest band of rows (the gap between two lines when there is one; a photo or a pattern without a gap may be cut across a line), and each part is one OCR page. The width is never made smaller to have fewer parts: past 40 parts in one image or page, the rest is not read and not charged (the row says so). A page or part with almost no ink, darker or lighter than its background (so light text on a dark background counts), is blank: it is not sent and not charged. The others are sent as JPEG to the AI model Google Gemini 3.1 Flash-Lite (google/gemini-3.1-flash-lite; if OpenRouter has no endpoint for it, google/gemini-3.5-flash-lite) through Apify's official apify/openrouter Actor, up to 4 at a time, with fixed instructions: transcribe all text exactly in reading order, every character and punctuation mark as printed and no word changed, no spaces between Japanese characters, vertical Japanese top to bottom and right to left, one line per paragraph (lineJoin: smart, the wrapped lines joined) or the page's line breaks (keep), tables as Markdown tables (Markdown) or as lines with tab-separated cells (plain text). The answer must start with a fixed marker line: anything before it is dropped, an answer without it (a comment instead of the text) is asked for once more and then fails that page (not charged), and a fixed word after it means "no text" (not charged). With lineJoin: smart, lines the AI left broken inside a paragraph are joined as in the text layer (never table rows, list items or headings). An answer cut by the AI's output limit (2,048 tokens) is redone in two halves (and a half again in two); a half that fails keeps the text of the other. The results are put back in page order with the text-layer pages.
  5. Cleaning (text layer): the pieces of each line are put together without spaces between kanji and kana; vertical text (tategaki) is read column by column, right to left; page numbers are removed (a bare number only when it goes up with the page); a line at the top or bottom that is exactly the same on at least half of the pages stays on the first page where it appears and is removed from the others; a line that differs only in a number going up with the page is removed (see the FAQ); wrapped lines are joined into paragraphs, and an English word broken by a hyphen at a line end is mended. Then all text, OCR text too, is tidied (normalize).
  6. Rows and charge: the rows of a document are saved, then the progress, then the document is charged. A file is never charged twice, also when Apify moves the run to another server; OCR pages already read are not sent to the AI again after such a move.

Input

FieldWhat it doesDefault
fileUrlsDirect links to PDF, DOCX, PNG, JPEG or WebP files (not web pages), up to 100 per runempty
keyValueStoreIdA key-value store in your account with PDF, DOCX or image files (store picker)empty
keyPrefixOnly the store's keys that start with this textempty (all)
uploadedFilesFiles uploaded in the input form (PDF and DOCX up to 100 MB, images up to 25 MB)empty
pagesPDF pages to read, e.g. 1-5,10 or 20-all pages
splitBydocument: one row per file; page: one row per PDF pagedocument
lineJoinsmart: join wrapped lines into paragraphs (OCR text too); keep: keep the line breaks of the pagesmart
removeHeadersFootersRemove repeated headers and footers and page-number linestrue
normalizebasic, japanese (also full-width letters, half-width katakana, dashes) or nonebasic
outputFormattext or markdown (headings, lists, tables)text
maxFilesStop after this many filesno limit
ocrauto: OCR the pages without a usable text layer, and images; always: OCR every PDF page; off: text layer only, nothing is sent to an AIauto
maxOcrPagesThe most OCR pages sent to the AI in one run (1-5,000)200 on a paid plan, 20 on the Free plan

With no links, store or uploads, the built-in samples are read (no charge of this Actor, no AI call). Example input for the API:

{
"fileUrls": ["https://example.com/reports/annual-report-2026.pdf", "https://example.com/scans/receipt.jpg"],
"pages": "1-50",
"splitBy": "page",
"normalize": "japanese",
"maxOcrPages": 50
}
  • Use the link to the file itself (it usually ends in .pdf, .docx, .png or .jpg), not a page that shows or links to it. A link that returns a web page fails with NOT_A_DOCUMENT. Files sent as application/octet-stream are fine: the first bytes decide.
  • Each link is fetched once, with up to 5 redirects; private and local network addresses are refused, also after a redirect. The Actor does not log in or send cookies: a link that needs a login fails with AUTH_REQUIRED. Put such files in a key-value store or upload them.
  • Limits per link: 100 MB, 60 seconds for the whole download, at least 250 KB/s on average. A server error is retried twice; 429 (too many requests) is not retried.
  • Rows and logs show links without their query string (it can hold a token); linkNumber says which line of your list a row belongs to.
  • After 20 links in a row have failed, the rest of the list is not tried (no rows, no charges).

Uploaded files

A file uploaded in the input form is stored in a new key-value store of your account. If your account keeps its storages private (the default), this Actor, which runs with limited permissions, may not open it: the row then names that store. Choose it in Key-value store and start again; its files are read once.

Output

One row per document or image (or per PDF page with splitBy: page). Every row has the same fields:

FieldMeaning
statusok (text from the text layer, OCR or both), no-text (no text found: a scan with OCR off, an OCR that found no text, a blank page or image, pages left by a limit; not charged) or failed (see errorCode, not charged). With one row per page, a page that OCR could not read, or a blank one, says so in its own row (failed or no-text, with errorCode) while the document is counted once
source, fileName, sourceUrl, linkNumberWhere the file came from; links are shown without their query string
formatpdf, docx, png, jpeg or webp
part1, or 2, 3 ... when the text of one row would pass 7 MB
pageFrom, pageTo, pageCountThe PDF pages in this row (1 for an image) and in the whole file (null for DOCX and images)
text, charCountThe text and its number of characters
textSourcetext-layer, ocr, text-layer+ocr (in page order) or docx
ocrPages, ocrBlankPages, ocrFailedPages, ocrPagesLeft, ocrNoteOCR pages read with text (each one page-ocr), blank pages not sent, pages OCR could not read, pages that needed OCR but were not sent (a limit or a stop), and a sentence on what happened
emptyPages, needsOcr, garbledSuspected, verticalTextPagesPages without a text layer; whether the file needs OCR (half or more of the pages without text, text that looks garbled, or almost no text); whether the text layer of a PDF looks garbled (kept and not charged, see the FAQ); text-layer pages of vertical text
title, author, producer, createdAtThe document information, if the file has it
removedLinesHeader, footer and page-number lines removed
chargedEvents, chargedOcrPagesdocument-extracted events (on the document's first row) and page-ocr events charged for this row
ocrPreparedtrue only for the built-in scanned sample (prepared OCR text, no AI call)
errorCode, errorMessageWhy a file is no-text or failed, and what to do

A 4-page scan with one blank page, read with OCR (ocr: auto, values as the local tests give them with a mocked AI):

{"status": "ok", "fileName": "scan.pdf", "format": "pdf", "pageFrom": 1, "pageTo": 4, "pageCount": 4, "textSource": "ocr",
"ocrPages": 3, "ocrBlankPages": 1, "ocrFailedPages": 0, "ocrPagesLeft": 0,
"ocrNote": "1 blank page(s) were not sent to the AI (not charged).", "chargedEvents": 0, "chargedOcrPages": 3, "errorCode": null}

Error codes: NO_TEXT_LAYER (a PDF with fewer than 10 characters of text, and OCR off or not done), GARBLED_TEXT (a PDF whose only characters are private-use or replacement ones), NO_TEXT (a DOCX without text), NO_TEXT_FOUND (OCR found no text), BLANK (a blank page or image), OCR_NOT_DONE (an image left by a limit), OCR_OFF (an image with OCR off), IMAGE_TOO_LARGE, UNSUPPORTED_IMAGE (TIFF, HEIC, AVIF, GIF, BMP), AI errors (AI_UNAVAILABLE, RATE_LIMITED, AI_REFUSED, AI_BAD_FORMAT (an answer twice without the required marker line), AI_OUTPUT_TOO_LONG, AI_AUTH_FAILED, AI_ACCOUNT_LIMIT, AI_FORBIDDEN), drawing errors (RENDER_FAILED, RENDER_TIMEOUT), ENCRYPTED, CORRUPT_FILE, TOO_MANY_PAGES, NO_PAGES_IN_RANGE, FILE_TOO_LARGE, TOO_LARGE, TOO_MANY_ENTRIES, TOO_LARGE_FOR_MEMORY, TIMEOUT, UNSUPPORTED_FORMAT, NOT_A_DOCUMENT, READ_FAILED, EXTRACTION_FAILED and, for links, NOT_FOUND, AUTH_REQUIRED, RATE_LIMITED, HTTP_ERROR, BLOCKED_ADDRESS, BLOCKED_URL, DNS_FAILED, DOWNLOAD_FAILED, SLOW_DOWNLOAD, TOO_MANY_REDIRECTS.

The run's key-value store has the summary in OUTPUT: status (COMPLETE, PARTIAL, FAILED), counts of extracted, no-text, failed and skipped files, PDF pages read, characters, rows, chargedEvents and chargedOcrEvents, OCR counts (ocr) and the AI's use (aiUsage: requests, tokens, and the cost OpenRouter reported). It is written at the start and after every file, so it also exists when a run is stopped. While a file is read with OCR, two small records (OCR-SENT, OCR-000001 ...) let a moved run go on without sending pages again; the second is removed after each file.

Run it after another Actor

If another Actor saves PDF, DOCX or image files in its key-value store, add this Actor in that Actor's Integrations tab and set the input field to the other run's store:

{ "keyValueStoreId": "{{resource.defaultKeyValueStoreId}}", "splitBy": "page" }

Set keyValueStoreId like this; a store that comes only in the integration's payload cannot be read under limited permissions, and the run stops before anything is charged with a message that says so. With OCR on, the images in that store are read too (and charged per OCR page); set ocr: "off" to read only PDF and DOCX files.

Pricing

The prices are on the Pricing tab of this Actor. This Actor uses pay-per-event pricing:

EventWhenFREEBRONZESILVERGOLD and above
document-extractedPer started 20 PDF pages whose text came from the text layer, or per started 50,000 characters of a DOCX$0.003$0.0027$0.0024$0.0021
Per 1,000 events$3.00$2.70$2.40$2.10
page-ocrPer OCR page whose OCR gave text: a PDF page, an image up to about 2,000 x 2,800 px, or one part (up to 2,800 px) of a taller page or image$0.004$0.0036$0.0032$0.0028
Per 1,000 events$4.00$3.60$3.20$2.80
apify-actor-start (Apify)Every run, also the samples: once per GB of memory (the default 1 GB = once)$0.00005$0.00005$0.00005$0.00005

The tier comes from your Apify plan, and your own price is shown on the Pricing tab. The start event has no tiers. Examples at the FREE price: a 1-page or 20-page text PDF $0.003, a 100-page text PDF $0.015, a 10-page scan $0.04, a 40-page PDF with text on 20 pages and scans on the others $0.003 + $0.08 = $0.083, a photo of a receipt or a phone screenshot (up to about 2,000 x 2,800 px) $0.004, a long screenshot of 1,080 x 6,000 px cut into 3 parts $0.012.

The AI model is billed separately. OCR sends page pictures to Google Gemini 3.1 Flash-Lite through Apify's official OpenRouter Actor (apify/openrouter). Apify charges that model use to your own Apify account, in a separate run of apify/openrouter, at OpenRouter's price rounded up to $0.00001, without any markup from this Actor: about $0.0005-0.002 per page on paid Apify plans (more for dense pages), and about 10 times that on the Free plan ($0.005-0.02 per page). Each run with OCR also starts one apify/openrouter run (about $0.0023 measured on the Free plan; about $0.0013 estimated on paid plans). OUTPUT.aiUsage.costUsd shows the cost OpenRouter reported for the run. A page whose OCR fails is not charged by this Actor, but the AI cost of trying may already be charged. Your maximum cost per run limits this Actor's events only, not the AI bill: that is what maxOcrPages is for (200 pages per run on a paid plan, 20 on the Free plan, when you leave it empty; resends after errors never pass twice that number).

  • Not charged: the built-in samples, failed files (password-protected, damaged, not a supported format, too large, a link that fails), no-text documents, blank pages, pages the OCR could not read, pages left by maxOcrPages or the maximum cost, text that looks garbled (garbledSuspected: true, kept as it is; see the FAQ), and the runs that stop at the input checks.
  • Maximum cost per run: before a page is sent to the AI, the rest of your limit must cover one more page-ocr for each of its parts (on top of the pages in flight), so nobody pays the AI for a page this Actor could not deliver. When it does not, OCR stops there, the document's row says how many pages were left, and the run stops with status PARTIAL; the document's text-layer pages are in its row, and only the document-extracted events that still fit are charged. A text PDF whose pages the limit does not cover is not read. A new run starts from the first file again.
  • Unpaid time: files that fail or have no text earn nothing, so after about 10 minutes of such run time at 1 GB (more for every event charged) the rest of the run is not read; drawing pages for OCR that turn out blank or cannot be read counts too, also inside one long file.
  • No double charges: each document is charged right after its rows are saved. If Apify moves the run to another server, or a run that failed is resurrected, it goes on after the last saved file and does not read or charge the earlier files again; OCR pages already read for the file in work are not sent to the AI again.

Limits

Measured on Apify with the default 1 GB of memory (version 0.1, text layer only), one file per run read from a key-value store (run time from start to end; reading = loading the file, starting the reader and extracting; peak memory as Apify reports it):

FileRun timeReadingPeak memoryEvents
200-page Japanese PDF (the sample's pages repeated, 1.7 MB)3.4 s1.8 s110 MB10
2,000-page Japanese PDF (17.7 MB)10.3 s8.8 s241 MB100
2,000-page English text PDF, 40 lines per page (7.9 MB, 5.3 million characters)6.3 s4.8 s194 MB100
50 pages, each a 532 KB photo and two lines of text (25.4 MB)1.9 s1.0 s122 MB3
200 pages that are only pictures, like a scan (37.6 MB, OCR off)1.7 s0.9 s143 MB0 (no-text)

OCR on Apify (build 0.2.1, 1 GB): a 6-page scan (English, Japanese, vertical Japanese, a table, one blank page) and a 1,080 x 6,000 px PNG in one run took 10.7 s with a peak of 169 MB. Locally (Windows), drawing one A4 page takes about 0.1-0.6 s. The built-in samples take a few seconds for the whole run.

Memory: a PDF with very much text per page needs more than the default 1 GB. Measured locally: 2,000 pages of 80 English lines each (17.6 MB, about 13 million characters) fail with TOO_LARGE_FOR_MEMORY at 1 GB and read with pages: 1-1000, or with 2 GB. On Apify with 2 GB, such a PDF read in 11.3 s with a peak of 484 MB. One file may give at most about 33 million characters at 1 GB (more with more memory). Drawing a scanned page for OCR needs more memory the finer it was scanned, because the page picture is unpacked at its own size first. Measured locally with 1 GB (A4 scans): 300 dpi about 160 MB more, 400 dpi about 243 MB, 600 dpi about 585 MB, which does not fit in 1 GB: give 2 GB to scans of 600 dpi. A page that would pass 60% of the run's memory fails with TOO_LARGE_FOR_MEMORY (not charged), and the row names the memory to choose.

Fixed limits: 100 MB per file; images 25 MB and 60 megapixels; 2,000 pages read per PDF (choose more with several runs and pages); 120 seconds per file for the text layer, 60 seconds per page drawn for OCR; 100 links per run; OCR pages per run as set by maxOcrPages (at most 5,000); 40 parts of at most 2,800 px per page or image (the rest is not read; a PDF page is drawn on at most 36 megapixels from its top); for DOCX, 200 MB of unpacked text parts and 10,000 parts in the file. The memory check needs about 3 times the file size plus 100 MB (for an image, about 5 bytes per pixel plus 100 MB); a file that does not fit fails with TOO_LARGE_FOR_MEMORY and the memory to choose.

What the extraction does not do:

  • OCR is done by an AI model, which can misread text, like any OCR: check important numbers. It is told to output only the text and never to translate or complete it. Handwriting, very small print and low-quality photos read worse. Pages of a PDF whose text layer is fine are not OCR'd in auto mode.
  • Images: PNG, JPEG and WebP only (TIFF, HEIC, AVIF, GIF and BMP fail with UNSUPPORTED_IMAGE: save them as PNG or JPEG, or put the pages in a PDF). A JPEG photo's EXIF rotation may not be applied; the model reads rotated text in most cases.
  • Reading order of the text layer follows the order of the text in the file. Most PDFs store it in reading order; PDFs with complex layouts (several columns, text boxes) may come out in another order. Tables in PDFs become lines with the cells separated by spaces (by OCR: Markdown tables or tab-separated cells).
  • Mixed documents: in a PDF with OCR pages, the pages are joined with an empty line between them, so a paragraph that goes on from one page to the next is not joined across the pages (also between two text-layer pages of such a PDF).
  • Headers and footers are found among the text-layer pages read: they need 3 pages or more (page numbers: 2 pages or more). OCR pages keep their headers and page numbers as the AI reads them. Headers, footers, footnotes and comments of a DOCX are not read.
  • Drawings: a PDF of plans or maps whose drawing instructions unpack to hundreds of megabytes can stop at the memory limit even when the file is small.
  • Password-protected files are not opened. Old .doc files, PowerPoint and Excel files are not read in this version. DOCX files are never OCR'd (pictures inside a Word file are not read).

Privacy

  • Files are read inside the run and the text is written only to the run's dataset. Nothing is kept anywhere else, and the Actor reads only the stores you choose (limited permissions).
  • With OCR, page pictures are sent to an AI model: the pages that need OCR (or every page with ocr: always) and images are sent as JPEG pictures, with fixed instructions, to Google Gemini 3.1 Flash-Lite (or, when OpenRouter has no endpoint for it, Gemini 3.5 Flash-Lite) through OpenRouter, via Apify's official apify/openrouter Actor, with this run's own Apify token. Nothing else of yours (no file names, links or text layers) is sent. OpenRouter and the model provider handle these pictures under their own terms. With ocr: "off" nothing is sent to any AI.
  • Links appear in rows and logs without their query string. OUTPUT keeps a short hash of the list of links (to continue after a migration), not the list itself; it has no salt, so someone who can guess the exact list could check a guess against it. The reason of the first link that failed, which can show that link without its query string, is in OUTPUT too (resume.firstUrlError). While a file is read with OCR, the text of the pages read so far is kept in the run's own key-value store (OCR-000001 ...) until the file's rows are saved, so a moved run does not send them again.

FAQ

Does PDF Text Extractor read scanned PDFs? Yes, with OCR (the default ocr: auto). A scan (fewer than 10 characters of text in all) is read page by page by the AI model and charged per OCR page with text; in a PDF where half or more of the pages have no text, only those pages are OCR'd and the others keep their text layer. With ocr: off a scan comes back as no-text with needsOcr: true and is not charged, as in version 0.1.

What does OCR cost in total? On a paid Apify plan, about $0.0045-0.006 per page: $0.004 for page-ocr (FREE tier) plus about $0.0005-0.002 that apify/openrouter bills for the AI model. On the Free plan the AI part is about 10 times higher. Blank pages are neither sent nor charged.

What does garbledSuspected mean? Some PDFs use fonts that do not say which letters they draw; their "text" comes out as runs of punctuation or a mix of alphabets inside one word. When most pages of a PDF look like that, the row says garbledSuspected: true: the text is still returned but not charged, and ocrNote suggests ocr: always to read those pages by OCR instead (in auto mode they are not OCR'd automatically, because the detection is best-effort and OCR costs money). A PDF whose characters are all unreadable (GARBLED_TEXT) is OCR'd in auto mode.

Why are there no spaces between Japanese characters? Japanese is written without spaces between words, and PDFs often put small gaps between characters. PDF Text Extractor never adds a space between kanji, kana or Japanese punctuation, also where it joins wrapped lines, and the OCR instructions ask for the same. Spaces between English words stay.

Does PDF Text Extractor read vertical Japanese text (tategaki)? Yes. Vertical columns in the text layer are read top to bottom and right to left, and verticalTextPages counts those pages; OCR is told to read vertical text the same way.

How are headers and page numbers found? At the top or bottom of a text-layer page: a decorated page number (- 12 -, Page 3 of 10, 第3頁) is removed; a bare number (12) only when it goes up with the page, so a year or an amount stays; a line that repeats on at least half of the pages is removed when its only changing number goes up with the page (Annual Report 2026 p.3). A line that is exactly the same at the top (or bottom) of at least half of the pages, and of 3 pages or more, stays on the first page where it appears and is removed from the others. A fixed heading at the top of every page in the body text's size, such as Question 1, Question 2 ... one per page, looks like a page header and is removed: turn this off with removeHeadersFooters: false.

Are files stored? No. They are read inside the run; only the extracted text goes into the run's dataset (and, while a file is read with OCR, the pages read so far into the run's own key-value store).

More from Quiet Works Lab

Support

Report a problem in the Issues tab: the input you used (without private links) and the run ID help most. Files that come out wrong are welcome as examples, if you may share them.

This Actor is developed and maintained with the help of AI (Claude Code). Issues are answered within a few days.

The sample PDFs embed characters of Noto Sans JP (SIL Open Font License 1.1, license in sample/LICENSE-NotoSansJP-OFL.txt).

日本語の概要

PDF と Word(DOCX)のファイルから、きれいなテキストを取り出します。スキャンした PDF と画像(PNG・JPEG・WebP)は OCR で読み取ります。ファイルの直接のリンク、Apify のキー・バリュー・ストア、アップロードから読めます。折り返しの改行を段落にまとめ(漢字・かなの間に空白を入れません)、ヘッダー・フッター・ページ番号を取り除き、縦書きは右の列から読みます。料金は文字の層のある PDF 20ページ(DOCX は5万字)ごとに $0.003、OCR 1ページ $0.004(FREE の価格)。OCR の AI(Google Gemini 3.1 Flash-Lite、Apify 公式の apify/openrouter 経由)の代金は、別に Apify のアカウントに付きます(有料プランで1ページ約 $0.0005〜0.002、無料プランは約10倍)。OCR ではページの画像が AI に送られます。ocr: "off" なら何も送りません。見本・失敗したファイル・白紙のページ・読めなかったページには、この Actor の料金はかかりません(Apify の開始の料金は別)。