Closed domenic closed 1 year ago
Thank you for reporting this! It is caused by a PDF parsing bug in pdfsizeopt. The input file print-prince13-unoptimized.pdf is a hybrid-reference file, meaning that its trailer contains an /XRefStm
entry. pdfsizeopt currently doesn't support such PDF files. I'm keeping this issue open to track adding support.
Fixed in 7cbb4643b91682bbad2f70eac9220ae1d279285d.
When I run print-prince13-unoptimized.pdf through pdfsizeopt (with default options), I get out print-prince13-optimized-broken.pdf, plus hundreds of warnings of the form
The broken PDF has all of its internal hyperlinks missing. Possibly other things are broken, but that's the most noticeable.
Also interesting: this PDF is produced using Prince from https://html.spec.whatwg.org/. When I use Prince 11 on that same site, I get print-prince11-unoptimized.pdf. pdfsizeopt has no problems optimizing that version; the result is print-prince11-optimized.pdf.