# PDF text extraction vs OCR fixture

This directory contains a controlled four-page PDF built for the BookTranslator article “PDF Text Extraction vs. OCR: Choose the Right Path Before Translation.”

The pages are deliberately different:

1. born-digital text;
2. an image with no text layer;
3. an image with a correct hidden text layer;
4. an image whose hidden text contains three deliberate errors.

`results.json` records page-level output from Poppler `pdftotext` and from Tesseract run on a 300 dpi rendering. The PDF contains only original test sentences. It is not an OCR accuracy benchmark.

## Reproduce

Run the generator from this directory with Python 3 and the Pillow, pypdf, and reportlab packages installed. Poppler (`pdftotext` and `pdftoppm`) and Tesseract are also required.

```sh
python3 build-fixtures.py
```

The script uses the OFL-licensed Noto Sans file already stored in the neighboring `fix-pdf-copy-paste-text/fonts` fixture directory.
