# PDF bookmark translation fixture

This directory contains a synthetic, CC0 fixture for the BookTranslator article “How to Translate PDF Bookmarks Without Breaking Their Destinations.” It is not a BookTranslator product output or a benchmark of any translation system.

The source and translated PDFs each contain four pages and six bookmarks:

- two top-level outline items;
- four children under the first item;
- page destinations;
- a named destination called `method`; and
- an external URI action.

Only the visible page text and bookmark titles differ between the two PDFs. The audit CSV records the intended one-to-one mapping and confirms that the destination identifier or URI stays unchanged.

## Rebuild

Run the committed generator with Python 3, `pypdf==6.10.0`, and `reportlab==4.4.9`:

```bash
python3 generate_fixture.py
```

The generator uses ReportLab's invariant mode and records the installed dependency versions plus SHA-256 values in `fixture-manifest.json`. Rebuilds with the recorded versions should be byte-stable; the manifest remains the authority for the committed files.

## Files

- `source-bookmarks.pdf`: English page text and outline titles.
- `translated-bookmarks.pdf`: Spanish page text and translated outline titles.
- `bookmark-destination-audit.csv`: source-to-target title and destination map.
- `fixture-manifest.json`: hashes, counts, and structural checks.
- `generate_fixture.py`: deterministic generator.

## What the fixture proves

It proves that the committed source and target examples have equal page counts, retain the named destination, and have a complete six-row editorial mapping. It does not prove that a particular PDF viewer supports every action, that BookTranslator preserves bookmarks automatically, or that the Spanish copy is suitable for a production publication.
