Repository navigation
pdfce v0.12.0 - OCR that works, and two silences broken
OCR that works, and two silences broken
OCR had never worked. Now it does.
pdfce has shipped an OCR engine since 12 August. It produced garbage on
every page — not degraded output, noise — and nothing had ever measured it
end to end.
The cause was one wrong model file. pdfce bundles two neural networks: one
that finds where the words are, one that reads them. The detection model was
a build that does not work with the library version pdfce uses. Isolated by
swapping one file at a time, which is why the answer is known rather than
merely fixed — the recognition model was never at fault.
What it does now, measured on a synthetic scan (200 dpi, blurred, skewed
0.35°, sensor noise, grey paper):
| words read correctly | 47 of 47 |
| invisible layer vs. the ink | 0.90 pt median — about 1/80 inch |
That is the first real accuracy figure this project has had. Every earlier
number was a word count.
Try it:
pdfce-cli ocr scan.pdf --page 1 -o searchable.pdf
pdfce-cli find-text searchable.pdf --needle "a word on the page"
There is nothing to look at afterwards — the text is invisible by design,
sitting under the image so the page prints exactly as before. That is what
Acrobat does too. Check it by searching, not by looking.
How the scan was made, because it could not be downloaded
Licensing forbids checking a real-world PDF into this repository, which is why
OCR quality went unmeasured for two weeks. So the scan is manufactured:
pdfce renders a page it authored, degrades the raster the way a sheet-fed
scanner does, and wraps the result as an image-only PDF.
The useful part is that the answer key comes free. The vector original says
where every word really is, from real font metrics; the OCR'd copy says where
OCR put it. Two rectangles, two completely different routes, which must agree —
and that catches the failure a word count cannot: a text layer that reads every
word perfectly and lands in the wrong place.
tools/ocr-accuracy.py scores content and position separately, for that reason.
Two silences broken
A search that found nothing and a redaction that marked nothing look
identical whether the term is absent or the document's text was never readable
in the first place. Some PDFs render text perfectly that no software can
search — which is exactly why the failure is invisible.
Both now say so, naming each font and the reason.
★ The redaction one is the serious half. You ask for every occurrence of a
name to be removed, the run reports success, and the file still contains it.
It now warns even when it marked something, because the partial case is the
dangerous one: "2 marks created" reads as success and says nothing about a
third occurrence the search could never reach.
Also
- Image quality on ordinary pages matches Acrobat again — a downsampling
default changed on a side-by-side comparison against Acrobat Reader. - Rendering presets for the PDF subset standards (
list-standards,
render-page --standard pdf-x4). Each value states whether it is sourced to
a clause of the standard or is pdfce's own judgement where the standard is
silent. For PDF/X-4, one of six is a claim about the standard at all. - Rotated pages no longer put OCR text in the wrong place.
fetch-ocr-modelsdownloads the weights, verified against a pinned
checksum, for builds that do not carry them. It is opt-in at build time
(--features download) and is not in this release's binaries — which
therefore contain no network code at all. You do not need it: the weights
are in the folder.- The OCR weights now actually ship inside the portable folder. They did
not before, so OCR failed in every release build while working in every
development one.
A note on the downloadable build
This release carries no network code. pdfce does not need a network to do
anything, and the default build does not contain an HTTP or TLS stack — a
claim you can check against the THIRD_PARTY_LICENSES.md in the folder. The
OCR model downloader exists but has to be asked for at build time.
One change that is not additive
MinifyFilter's default moved from point-sampling to smoothing. If you compare
renders byte-for-byte against a previous version, minified images will differ.
That is the intent — it is what "matches Acrobat again" means — but it is a
real change rather than an addition.
Known, and named rather than left to be found
- Redaction covers what the search found, not what a reader can see.
On a scanned page only the OCR layer is searchable, and OCR is a guess. A
misread word cannot be marked, and no warning will tell you. - Type 3 text still cannot be edited. Neither can Acrobat edit it.
Windows x64, single folder, no installer, no registry writes. Extract and run
pdfce-gui.exe or pdfce-cli.exe. MIT licensed; third-party attributions ship
in the folder, and the OCR model weights carry their own PROVENANCE.md
recording their CC-BY-SA-4.0 terms and creator.