Skip to main content

indic-pdf-check

Can a screen reader, a search engine or an AI read the text of this PDF?

Many PDFs in Indian and other South/Southeast Asian scripts look perfect on screen but carry a broken text layer: copy-paste, search, screen readers and AI pipelines get garbled words. Microsoft Word's "Save as PDF" is a common cause (see the research report). Others are scans with no text at all. This tool reads a PDF's own text layer and tells you which case you have, in a second, on your own computer.

Next steps after BROKEN: recover the text with Unshape; verify that extracted text matches what people see with SeenRead.

pip install indic-pdf-check
indic-pdf-check circular.pdf notice.pdf
circular.pdf: BROKEN             script=Malayalam letters=1994 broken=29.4% tagged=True creator='Microsoft® Word for Microsoft '
notice.pdf:   NO_TEXT            script=None letters=0 broken=0.0% tagged=False creator='Canon '
-- 2 PDFs: BROKEN 1, NO_TEXT 1
verdict meaning what to do
NO_TEXT almost no text at all: usually a scan or an image run OCR (e.g. OCRmyPDF with Tesseract language packs) before publishing
INSUFFICIENT_TEXT some text in a supported script, but under 200 letters: too little to judge check by hand (e.g. a short notice)
UNSUPPORTED_SCRIPT plenty of text, but none in a supported script (e.g. English only) this tool cannot judge it
BROKEN the main script, or any other supported script with 200+ letters, has more than 5% impossible spellings (e.g. a vowel sign or virama with no consonant before it) re-export with another tool and check again; or recover the text with Unshape (needs the document's original font)
OK no problem detected by these checks - (this is not a full accessibility check: reading order, headings, tables and alternative text are not checked)

Pages whose own text has a high share of impossible spellings are listed as suspicious_pages (with --json), so damage confined to some pages or to a second script is visible.

Also reported: the script, the share of broken words, whether the PDF is tagged for accessibility, and the program that made it. --json gives machine-readable output; the exit code is 1 if any file is NO_TEXT or BROKEN (useful in CI).

Scripts: Devanagari (Hindi, Marathi, Nepali...), Bengali/Assamese, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Khmer, Myanmar, Thaana (Divehi).

Python:

from indic_pdf_check import check, check_text
check("notice.pdf")["verdict"]          # 'BROKEN' | 'OK' | 'NO_TEXT' | 'INSUFFICIENT_TEXT' | 'UNSUPPORTED_SCRIPT'

How well it works (tested before release)

  • Word for Microsoft 365 PDFs with known-broken text in 14 scripts: 12 flagged BROKEN; Kannada was passed as OK (only 4% impossible spellings although many words are wrong - see limits).
  • Clean source text in the same 14 scripts: 0 false alarms.
  • Microsoft Edge PDFs of the same text are flagged in 3 of 4 scripts: they really do contain doubled vowel signs, which a screen reader also reads.

Limits

  • It finds impossible spellings. Garbled text can still be spelled legally (e.g. a wrong consonant), so OK means "no sign of breakage", not "verified correct".
  • Scripts not listed (Arabic, Hebrew, Latin, Chinese...) come out as UNSUPPORTED_SCRIPT (version 0.1.0 said NO_TEXT).
  • Version 0.2.0 kept every verdict of the release tests above unchanged; it only splits the old NO_TEXT into three clearer cases and adds per-script and per-page checks.
  • It reads only the text layer; it does not look at how the page renders.

Apache-2.0 · Novain Shibu · github.com/novain-shibu

It uses PyMuPDF (installed separately), which is licensed under AGPL-3.0 or a commercial licence from Artifex; using the two together is subject to PyMuPDF's licence.

Metadata

Release files for indic-pdf-check 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for indic-pdf-check 0.2.0
File Size Uploaded Provenance Actions
indic_pdf_check-0.2.0.tar.gz 13.7 kB With provenance Details for indic_pdf_check-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for indic-pdf-check 0.2.0
File Interpreter ABI Platform Actions
indic_pdf_check-0.2.0-py3-none-any.whl Python 3 none any Details for indic_pdf_check-0.2.0-py3-none-any.whl

Total release size: 27.3 kB

Release files / indic_pdf_check-0.2.0.tar.gz

Download URL indic_pdf_check-0.2.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3553a5e65006eeff97e61d7449ae43ab3abe49cb4300530f5d48f77caabf6510
BLAKE2b-256 checksum
How to use checksums
89e07d2105cb93ddb2000de965797d164c9d921be3358d8f84ae2291e0bfc15e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / indic_pdf_check-0.2.0-py3-none-any.whl

Download URL indic_pdf_check-0.2.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
354a0967f84ee20e70ad9885c285f08d3758c51f74f450293dffc6d892d17655
BLAKE2b-256 checksum
How to use checksums
5ddb51bf1847fecfe309e55f2eee9de5e4cc1fa1a06b931bae7a653f7acd0129
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for indic-pdf-check 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for indic_pdf_check-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page