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

Esger Renkema post at elrenkema.nl
Fri Feb 25 22:23:28 CET 2022


Please see the attached patch; it solves this issue and also a similar 
one with pdf.setnames() that I have reported before in [1], but which 
apparently has not been seen.

Warm regards,
Esger Renkema

[1] https://tug.org/pipermail/luatex/2021-June/007543.html

Aldus Esger Renkema, op vrijdag 25 februari 2022 om 17:40:
>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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xformresources.patch
Type: text/x-diff
Size: 1678 bytes
Desc: not available
URL: <https://tug.org/pipermail/luatex/attachments/20220225/4a55e6cc/attachment.bin>


More information about the luatex mailing list.