[luatex] Creating pdf objects in \latelua
taco at elvenkind.com
Fri Oct 2 15:53:34 CEST 2009
Paweł Jackowski wrote:
> Paweł Jackowski wrote:
>> can we somehow write pdf objects within \latelua? Obviously we cannot
>> use pdf.immediateobj() as it writes the data to a content stream
>> generating invalid output. If I use pdf.obj(), then how to reference
>> it without explcit \pdfrefobj somewhere later? I'd like to avoid it as
>> it does not actually write the object into the pdf output but inserts
>> a pdf_refobj node into the list, which will take an effect no sooner
>> then the next \shipout, right? But can we do better?
> I think I've got that... The code executed inside late_lua node may
> `know' the self-late_lua node object. If so, it may also call pdf.obj()
> AND insert pdf_refobj just after itself. Seems to work but I'm not sure
> if luatex expects rebuilding the list being currently during shipout.
Hartmut will know best, but afaik your code should work fine.
More information about the luatex