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

Hans Hagen j.hagen at xs4all.nl
Fri Mar 27 13:46:39 CET 2020

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 

> 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 


                                           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.