Commit 2dc0491
committed
docs(protocol): emit the spec PDF as 1.4 so older e-readers can open it
The PDF failed to open on some e-book readers, which reported the file as
damaged. The cause is structural, not corruption: xdvipdfmx defaults to PDF
1.5, which stores objects in object streams (/ObjStm) and replaces the classic
cross-reference table with a cross-reference stream (/XRef). The old file had
8 object streams, 1 xref stream and no `trailer` keyword at all. A parser that
only implements PDF 1.4 looks for `trailer`, does not find it, cannot follow
`startxref` into a compressed stream object, and reports the file as corrupt.
Plenty of e-ink firmware and e-book apps ship exactly such a parser.
`compile_pdf()` now passes `-output-driver="xdvipdfmx -V 4 -q"`, so the output
is PDF 1.4 with a classic xref table and a real trailer dictionary: 0
/ObjStm, 0 /XRef, 1 trailer.
The cost is size — 476 KB to 660 KB (+38%), since the object and xref
structure is no longer compressed. Everything else is byte-for-byte
equivalent: 90 pages, same 295,910 characters of text, all 10 figures, 787
link annotations and the outline intact, zero LaTeX errors, zero missing
glyphs, both drift guards pass.
The tradeoff is recorded in README.md next to the PDF entry so the flag is not
mistaken for an accident and reverted for the size win.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4FAzXMZFjdfqBPY3wSYJ71 parent 6f729f6 commit 2dc0491
3 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
643 | 647 | | |
644 | 648 | | |
645 | | - | |
| 649 | + | |
| 650 | + | |
646 | 651 | | |
647 | 652 | | |
648 | 653 | | |
| |||
Binary file not shown.
0 commit comments