Documentation
¶
Overview ¶
Package textquality detects text that was technically extracted from a document but is not actually usable - the classic "broken font encoding" failure mode of naive PDF/document text extraction, distinct from "there isn't much text" (see pdftext.Result.Sparse for that check). A PDF using a subsetted font with a missing or malformed ToUnicode character map can still yield plenty of characters per page, just not real ones.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGarbledText ¶
IsGarbledText reports whether s looks like broken text extraction rather than genuine content. Two independent signals, either sufficient on its own:
- literal "(cid:NNN)" placeholders anywhere in s
- more than 5% of runes falling in a Unicode Private Use Area
An empty or whitespace-only string is not "garbled" - that's a separate, simpler case (see pdftext.Result.Sparse) callers should check first.
Types ¶
This section is empty.