[luatex] pdf.setxform(resources|attributes) nonfunctional

Esger Renkema post at elrenkema.nl
Fri Feb 25 17:40:19 CET 2022


Dear list,

The two functions pdf.setxform[attributes|resources] mentioned in 14.1.4 
of the manual appear to do nothing at all. The following file:

%% compile with plain luatex %%%%%%%%%%%%%%%%%%%%%%%%%%%
\pdfvariable compresslevel 0
\pdfvariable objcompresslevel 0
\pdfvariable xformresources {/Test1 /Value1}
\directlua {pdf.setxformresources('/Test2 /Value2')}
\setbox0=\hbox{Test}
\saveboxresource0
\useboxresource\lastsavedboxresourceindex
\bye
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

will result in the following pdf output:

> 1 0 obj
> << /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 18.597 6.808 ] /Matrix [ 1 0 0 1 0 0 ] /Resources 7 0  R /Length 51 >>
> stream
> BT
> /F1 9.96264 Tf
> 1 0 0 1 0 0 Tm [(T)83(est)]TJ
> ET
> 
> endstream
> endobj
> 7 0 obj
> << /Test1 /Value1 /Font << /F1 5 0 R >> /ProcSet [ /PDF /Text ] >>
> endobj

where, as you see, the token list set throught \pdfvariable is written, 
but the string given to pdf.setxformresources ignored.

The same holds mutatis mutandis for pdf.xformattributes.

Warm regards,
Esger Renkema



More information about the luatex mailing list.