[luatex] LuaTeX picky about internal PDF encoding, breaks self-hosted embedded documents

Henri Menke henrimenke at gmail.com
Sun Mar 29 01:51:40 CET 2020


On 27/03/20, 13:46, Hans Hagen wrote:
> On 3/27/2020 1:16 PM, Johannes Hielscher wrote:
> 
> > You are 100% right. That's why I did not call it a bug in the first
> > place, because everyone does their job right, and nothing has to be
> > fixed. I have found this out the hard way, and just wanted to leave
> > it somewhere: it might be helpful for someone else scratching their
> > heads about the sparse evidence of pdftex being less pedantic about
> > buggy PDFs than luatex.
> 
> That's indeed the danger of programs being tolerant. Mupdf. qpdf, xpdf all
> have some (different) strategies in loading files, sometimes they ignore the
> xref, sometimes they fix and recover, etc. The problem with such heuristics
> is that bad pdf stays around (if one already knows what gets 'ignored'.
> There are also similar tricks for dealing with bad fonts cq. font embedding
> and annotations and such. So one never really knows if the opdf file one
> makes is ok (also because validators don't check everything).

In fact, PDF tools being too tolerant with broken files has led to some
serious security vulnerabilities regarding PDF encryption and signing.

Website: https://www.pdf-insecurity.org/
Talk: https://media.ccc.de/v/36c3-10832-how_to_break_pdfs

Cheers, Henri

> > As already stated, no mercy for people who have their PDF encoding/
> > xref tables not under control, and even a bit less in luatex (which
> > is not necessarily a bad thing!). Fall-out wrt. hard to detect edge
> > cases in high-level environments included.
> 
> Indeed. The most one can expect is a message that something is wrong. Of
> course there can be real bugs in the inclusion, which then need to be
> solved, but we've tested with many thousands of files so it looks ok so far.
> 
> Hans
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------


More information about the luatex mailing list.