# A PDF trailer diagnostic, in six small files

Version 1.0.0. Recorded October 27, 2026. Jonathan Simone, directing AI assistance.
MIT-licensed synthetic experiment; no archival files or issue attachments copied.

## What the comparison shows

JHOVE 1.34.0 with PDF-hul 1.12.8 accepted all three legal-ending controls.
It also accepted one 19-byte cross-reference row, despite the 20-byte rule.
Two 19-byte rows produced PDF-HUL-71, "No file trailer", even though the
complete trailer remained present. The genuinely missing-trailer control
produced the same identifier. These are results for these exact files/tools.

The source-derived explanation is in case.json. It is not an instrumented
trace. Opening in a reader, passing validation, and suitability for preservation
or migration are different claims. Keep originals; this is not a repair tool.

## Reproduce

Extract this package into a new folder. Install or use an existing Python 3.10+
and Java runtime (our run used Eclipse Temurin 21.0.9+10 on Windows).
The script uses only Python's standard library and does not download anything.

1. Make a tools folder and download these official JHOVE release JARs into it:
   - https://repo.maven.apache.org/maven2/org/openpreservation/jhove/jhove-apps/1.34.0/jhove-apps-1.34.0.jar
   - https://repo.maven.apache.org/maven2/org/openpreservation/jhove/modules/pdf-hul/1.12.8/pdf-hul-1.12.8.jar
2. From the extracted package folder, run:

    python reproduce.py generate generated
    python reproduce.py check generated
    python reproduce.py run generated --tools tools

Use python3 instead of python if that is your interpreter name. If Java is not
on PATH, add --java followed by its absolute executable path. The script verifies
the two JAR hashes against case.json, then records fresh outputs in
generated/reports/. It refuses existing output/report folders. Use a new folder
name for another run. The configuration loads OPF's HTTPS schema; offline
operation has not been qualified.

Expected: six fixture checks, then six matching statuses and identifiers.
All original commands exited 0, including invalid files. The checker therefore
examines report contents and stderr, not process success alone. Fresh output
timestamps and file locations differ; this does not change the expected statuses.
Any disagreement is a failed reproduction, not a reason to discard the output.

## Inspect without running Java

case.json is the canonical evidence: fixture bytes (base64), SHA-256 hashes,
sizes, row lengths, versions, source links, twelve recorded reports, limitations
and correction history. The individual PDFs and report text files are decoded
from that record. The PDFs are blank one-page documents because this experiment
isolates structural bytes, not page appearance.

Recorded reports normalize line endings to LF and omit only Date/LastModified
clock times and time zones. Diagnostic content is preserved. Each published
report has its own hash; originalCaptureSha256 refers to a retained private
capture, not another included file. Raw original captures are not in this package.

## Credit and review

This is a controlled explanation of a known upstream issue, not first discovery:
https://github.com/openpreserve/jhove/issues/1081
The issue was reported by awaldlza; Carl Wilson clarified the diagnostic cause.
OPF maintains JHOVE, format-corpus, its error wiki and By JHOVE! Explain Yourself.
The handbuilt PDF corpus already contains 88 structural cases, including related
short-row and missing-trailer examples:
https://github.com/openpreserve/format-corpus/tree/366f068cec399d0cdfd61fa473de3ab6dc858098/pdf-handbuilt-test-corpus

A separate AI agent checked the specification/bytes and reran the six files in
the same environment. That is not outside expert or institutional reproduction.
No upstream endorsement is claimed. Existing issue discussion and the site's
contact page are available for corrections:
https://simoneresearch.com/contact/

See case.json for exact specification references, source-derived explanation,
the corrected initial prediction and all remaining limits.
