# Dutch scan to searchable PDF in your browser

Open a historical Dutch scan, choose whether it contains a page, paragraph or line, and download a searchable PDF, plain text or word boxes. The reader runs Tesseract.js locally with the expanded Folio Dutch newspaper language file. The offline download includes the model, JavaScript and WebAssembly runtime, plus an 1827 rental notice from the Koninklijke Bibliotheek.

## Run locally

Download **dutch-scan-reader.zip** and extract it to a new directory. Start a local server from inside the extracted folder with Python 3.

```bash
python -m http.server 8000 --bind 127.0.0.1
```

Open `http://127.0.0.1:8000` in your browser and choose **Recognize text** to read the included notice. Use the file picker for your own PNG, JPEG or single-page classic TIFF. Pick **A single line** for a cropped heading or **A paragraph** for one text block. Each recognition run reads the original image bytes with a 300 dpi setting. Processing and downloads stay in the local browser session.

The PDF contains an image and a searchable text layer. The TSV uses pixel coordinates for the bounding boxes. To inspect word boxes, select rows with level 5 and read the `left`, `top`, `width` and `height` fields. The text area and TXT export show the same engine reading. The reader opens single-page TIFFs. Its Deflate decoder accepts stripped bilevel, 8-bit grayscale and 8-bit RGB scans, including horizontal prediction for 8-bit samples. Its limits for Deflate files are 40 megapixels and 128 MiB. The browser applies the scan’s supported orientation before returning word coordinates. For a multipage TIFF, use the native volume reader or split the frames into separate files. A full newspaper page may contain several columns, so check the reading order against the scan.

## Browser recognition on Dutch newspapers

We tested the same 200 line crops (6,018 reference characters) and 103 paragraph crops (37,836 characters) with the three language files below in Chromium 131. Each column counts character edits or empty readings on the same images. The downloadable reader uses expanded float weights.

| Weights | Line edits | Paragraph edits | Empty lines | Empty paragraphs |
|---|---:|---:|---:|---:|
| Stock Dutch | 1,698 | 5,296 | 9 | 1 |
| Expanded float | 574 | 2,422 | 9 | 1 |
| Expanded integer | 651 | 2,584 | 9 | 1 |

The same expanded float file produced different normalized readings in the browser and the native Tesseract 5.5.1 CLI on 29 of 200 lines and 55 of 103 paragraphs. One confirmation paragraph repeats an archive reference from the same page. Excluding that paragraph gave 1,760 browser edits for the expanded float weights. The page export example checks that search and word boxes work. Recognition scores cover the supplied crops.

The JavaScript runtime is Tesseract.js 6.0.1, with tesseract.js-core 6.0.0. Bilevel TIFF decoding uses Photopea UTIF.js 3.1.0 with the unused JPEG decoder omitted. Runtime licenses and third-party notices are in `vendor/`. Folio code and the language file use Apache-2.0. The sample scan is public domain from the IMPACT KB ground-truth collection. See `example/source.json`, `NOTICE.md` and `LICENSE` in the archive.
