Searchable PDF OCR — Add a Text Layer to Scanned PDFs avatar

Searchable PDF OCR — Add a Text Layer to Scanned PDFs

Pricing

Pay per event

Go to Apify Store
Searchable PDF OCR — Add a Text Layer to Scanned PDFs

Searchable PDF OCR — Add a Text Layer to Scanned PDFs

Turn scanned or image-only PDFs into fully searchable, selectable, copy-pasteable PDFs. Keeps the original page image untouched and adds an invisible OCR text layer underneath.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Austin Cooley

Austin Cooley

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Share

Convert scanned or image-only PDFs into fully searchable, selectable, copy-pasteable PDFs. The page you get back looks identical to the one you sent — the original image is preserved byte-for-byte at the default settings — with an invisible OCR text layer added underneath it.

This is the step most PDF tools skip. Text extractors give you a .txt file and throw the document away. This gives you back the same PDF, now searchable, so Ctrl+F works, your document management system can index it, and copy-paste selects real words.


What it does

  • Adds an invisible text layer under the existing page image (OCRmyPDF + Tesseract)
  • Preserves the original scan — the visual page is untouched at optimisation level 0–1
  • Skips pages that already have text, so mixed digital/scanned documents cost less
  • Straightens crooked scans and auto-rotates sideways pages before reading
  • 26 languages, including Chinese, Japanese, Korean, Arabic, Hebrew, Cyrillic
  • Returns the extracted text too, if you want it in the dataset

What it is not

It does not fill forms, split, merge, sign or translate. It does one job.


Typical uses

  • Make a scanned contract archive searchable before loading it into a DMS
  • Prepare invoices and receipts so an extraction pipeline can actually read them
  • Turn scanned books, court filings or research papers into searchable references
  • Fix fax-quality documents that no search engine or indexer can read
  • Preprocess documents before feeding them to an LLM or RAG pipeline — models cannot read an image-only PDF

Input

FieldTypeDefaultNotes
pdfUrlsarrayDirect links to PDFs. Must point at the file, not a viewer page.
languagestringengThe document's language. Wrong language produces garbage — set this.
modestringskip-textskip-text, force-ocr, or redo-ocr.
deskewbooleantrueStraighten tilted pages before reading.
rotatePagesbooleantrueAuto-correct sideways/upside-down pages.
cleanBeforeOcrbooleanfalseRemove speckle for recognition only; output image unchanged.
optimizeinteger10 = none, 1 = safe lossless, 2–3 = smaller but lossy.
includeTextInDatasetbooleantrueReturn the recognised text alongside the PDF link.

Choosing a mode

  • skip-text (default) — only OCRs pages with no text layer. Safest and cheapest, because you are not charged for pages that were already searchable.
  • force-ocr — rasterises every page and re-reads it. Use when a PDF has a bad existing text layer, e.g. from a poor scanner. Existing vector text is flattened.
  • redo-ocr — discards the existing text layer and re-reads without rasterising. Preserves vector quality. Incompatible with deskew, rotate and clean, which are disabled automatically if you select it.

Output

One dataset row per input PDF:

{
"url": "https://example.com/scan.pdf",
"status": "succeeded",
"pagesTotal": 12,
"pagesOcred": 9,
"pagesAlreadyHadText": 3,
"searchablePdfUrl": "https://api.apify.com/v2/key-value-stores/.../searchable-0000.pdf",
"outputKey": "searchable-0000.pdf",
"text": "..."
}

status is succeeded, skipped (already searchable) or failed (with an error explaining why). One bad URL never aborts the run — the rest still process.


Pricing

Pay per event:

EventWhat it means
Actor startOnce per run
Document processedOnce per PDF successfully made searchable
Page OCR'dPer page that actually needed OCR

You are billed for pages that were actually read, not pages in the file. A 40-page PDF where only 3 pages are scans bills 3 pages. Documents that fail, or that were already searchable under skip-text, cost nothing beyond the run start.

If you set a maximum charge for the run, processing stops cleanly at that ceiling rather than overrunning it, and the log tells you where it stopped.


Limits and honest caveats

  • Maximum 250 MB per PDF.
  • OCR accuracy depends on scan quality. 300 DPI clean scans are near-perfect; a photographed page under bad lighting will not be. No engine fixes an unreadable source.
  • Password-protected PDFs are rejected, not cracked.
  • Handwriting is not supported. Tesseract reads printed text. Cursive returns noise.
  • Set the language. English OCR on a German document is the single most common cause of bad output.

Notes

Built on OCRmyPDF and Tesseract, both open source. This Actor touches no third-party website and scrapes nothing — it processes files you supply.

Something not working? Report an issue on the Actor page. Issues get a response, and broken Actors get fixed rather than abandoned.