[luatex] pdfpages and lualatex?
Hartmut Henkel
hartmut_henkel at gmx.de
Thu Dec 16 20:41:44 CET 2010
On Tue, 14 Dec 2010, Martin Schröder wrote:
> 2010/12/14 Hartmut Henkel <hartmut_henkel at gmx.de>:
> > ah, the /Resources 49 0 R are in the /Pages dictionary, somehow one
> > level higher than usual (is this allowed? Maybe, but not checked
> > yet).
>
> Yes, but it's deprecated.
No! (Until a few days ago i thought the same.) The inheritance of
Resources from ancestors of a Page is completely legal (with an
exception for linearized PDF) and regularly in use, and i couldn't find
any sign of obsolescence in the PDF reference, so it's a must for
luatex.
Also the warning by pdftex and luatex, "/Resources missing. 'This
practice is not recommended' (PDF Ref)" in pdftoepdf.cc is a wrong
citation pulled from another context, therefore i have now removed it
from pdftoepdf.cc in luatex. It's right, that missing Resources are bad.
But the sentence appears in the PDF reference (e.g. 5th ed., 3.7.2
Resource Dictionaries, p. 128) in the case that a form XObject (!) has
no Resources, and then the fallback is to use the Page resources (or
inherited ones from Pages). And this has nothing to do with the case,
that an external PDF page (which is not yet a form XObject at this time)
is embedded (the embedded page may contain also form XObjects, that's no
problem).
Btw., what may happen when a Page has its Resources dict, but also some
Pages dict above contains Resources? Would they be merged somehow by the
viewer? To try it out, i produced a PDF file, copying some Font
resources from the Page resources dict over to the top Pages resources
dict by \pdfpagesattr{}, and removed the font reference from the Page
resources dict by hand-editing the resulting PDF. The font resource
moved up is not found then (tried with xpdf)! But it's found when the
Page resources dict is removed. So it seems that there is no recursive
Resources search for a specific resource appearing in a page stream.
Instead just the 1st found Resources dict (typically the one in the Page
dict) is used, but all above are ignored.
Regards, Hartmut
More information about the luatex
mailing list