[luatex] pdf.reserveobj()
Ulrike Fischer
luatex at nililand.de
Wed Apr 28 17:28:27 CEST 2021
Am Wed, 28 Apr 2021 13:50:31 +0200 schrieb Andreas Matthias:
> The example below should create two annotations. But actually just
> the first annotation (`annot1`) is written to the pdf, the second (`annot2`)
> is missing. Although the /Annots array contains two references, the
> second one dangling. Why is the second annotation missing?
>
> \pdfvariable compresslevel = 0
> \directlua{
> local annot1 = node.new(node.id('whatsit'), node.subtype('pdf_annot'))
> node.write(annot1)
>
> local annot2 = node.new(node.id('whatsit'), node.subtype('pdf_annot'))
> local objnum = pdf.reserveobj()
> annot2.objnum = objnum
> node.write(annot2)
> }
> \bye
The docu shows local objnum = pdf.reserveobj("annot")
and this seems to work (but it doesn't say why and if there are more
key words ;-))
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
More information about the luatex
mailing list.