[tex-live] Bug: When nesting Form XObject reference in <box>, \pdfxform resources {<resources>} <box> -> missing user-provided <resources>

Alexander Grahn A.Grahn at hzdr.de
Mon Mar 19 11:20:48 CET 2018


Dear all,

it seems that I discovered a bug in connection with nested Form XObjects
(pdftex built-in \pdfxform) that occurs in pdfTeX as well as in LuaTeX.

The \pdfxform built-in provides the optional `resources {<resources>}'
argument, as in

  \pdfxform resources {<resources>} <box>

, in order to allow the user to insert additional entries in the /Resources
dictionary of the Form XObject to be produced from box register <box>.

This works as advertised for ordinary box content (1st \pdfxform in the code
below), but as soon as another Form XObject is referenced inside <box>, the
`resources {...}' argument is ignored and user-provided <resources> are missing
in the generated PDF code (2nd \pdfxform).

Here is a minimal example for pdfTeX and LuaTeX for demonstration. The PDF
object numbers mentioned in the comments are different in the PDF output from
LuaTeX.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bug: When nesting Form XObject reference in <box>,
%      \pdfxform resources {<resources>} <box>
%      --> missing user-provided <resources>

\input luatex85.sty

\pdfcompresslevel=0
\pdfobjcompresslevel=0

\setbox0=\hbox{World}
\edef\wrldwd{\the\wd0}

\pdfxform
attr {}
resources {/Properties <</Key1 (Val1)>>} % OK
0

%nesting Form XObject reference
\setbox0=\hbox{Hello \hbox to \wrldwd {\pdfrefxform\pdflastxform\hss}!}

\pdfxform
attr {}
% /Properties <<...>> missing in /Resources dict (object `8 0'), ref'ed in
resources {/Properties <</Key2 (Val2)>>}%       Form XObject (object `2 0')
0

\pdfrefxform\pdflastxform

\bye
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Kind regards,
Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nestedXForm.tex
Type: application/x-tex
Size: 633 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-live/attachments/20180319/0e416105/attachment.tex>


More information about the tex-live mailing list