Percerno Skillsbeta
← everything it can do · documents

Scan To Text PDF

Reads scanned PDFs and document photos with OCR and returns the text, a searchable PDF, or both.

2 uses this weeksource Percernolicence MIT
Tested 2026-10-24: did the job in 2 of 2 requests through a real assistant · security scan clean.

Try asking

Say it in your own words; the assistant finds this recipe by itself. Examples:

“I uploaded invoice-scan.pdf, a scanned invoice with no text layer. Give me the text as Markdown.”
“Make this scanned contract searchable so I can find clauses in it, and give me the PDF.”
“Læs den scannede faktura (dansk) og giv mig teksten som en tekstfil.”
“Read pages 1 to 3 of the uploaded scan and tell me the total; I don't need the whole file in the chat.”
Without Percerno: A scan has no text to copy; on a managed laptop you would need Acrobat Pro or an OCR program you cannot install, or retype the pages by hand.
Try this skill from Claude, ChatGPT or a chat on your own page. Free plan, no credit card.Get started free

Details

When it is the right choice

Read a scanned PDF or a photo of a document in ONE command (OCR with tesseract, tuned for speed): the text as Markdown or plain text, a searchable PDF (the scan with an invisible text layer, so it can be searched and copied), or both; English by default, Danish on request, one page or a range. Use for: this PDF is a scan and I need the text, make this scanned contract searchable, read the invoice photo, pull the text out of these scanned pages. Triggers: scan, scanned, OCR, image-only PDF, photo of a document, searchable PDF, tekstgenkendelse, scannet, læs scanningen.

The full recipe the assistant reads

Scan to text (one command)

python3 /skills/scan-to-text/scripts/scan.py <verb> IN OUT [--lang eng|dan|eng+dan] [--pages 1-3] [--dpi 150] rasterises the pages with poppler and reads them with tesseract. Inputs are in /work/in (PDF, PNG, JPG, TIFF), results in /work/out. Every verb prints one OK … line (pages, words, seconds) or one ERROR … line.

Need Command
The text as Markdown (one heading per page) scan.py text /work/in/scan.pdf /work/out/scan.md
Plain text instead scan.py text /work/in/scan.pdf /work/out/scan.txt
A searchable PDF (looks the same, text layer underneath) scan.py searchable /work/in/scan.pdf /work/out/scan-searchable.pdf
Both at once scan.py both /work/in/scan.pdf /work/out/scan → scan.md + scan-searchable.pdf
Danish document add --lang dan (or --lang eng+dan when both occur)
Only some pages add --pages 1-3 (or --pages 2)
Is it a scan at all? scan.py probe /work/in/file.pdf (says whether the PDF already has text; if it has, use pdftotext or office-convert instead)

Speed: about 3.5 s per page at the default 150 dpi with one language; --dpi 200 for small print, --lang eng+dan costs roughly a third more. Up to ~20 pages run directly with sandbox_run; for longer scans use start_job with the same command and poll job_status. Give the person the download link(s) from the OK line; do not paste whole pages into the chat unless they asked for the text itself.

Files in this skill (4)
  • SKILL.md
  • gate.json
  • scripts/__pycache__/scan.cpython-313.pyc
  • scripts/scan.py
Where it comes from

Written by Percerno, MIT licence.