[Dev-luatex] Max length of tokens?

Taco Hoekwater taco at elvenkind.com
Thu Aug 6 09:59:42 CEST 2009


Martin Schröder wrote:
> Hi,
> what's the maximum length of things like \pdfcatalog in luatex (and
> pdftex)? I.e. how long can a token register get?

For luatex, it was like this: pdf_print_toks_ln(), the function that
actually prints token lists to the PDF output, was using pdf_printf().

pdf_printf() was using vsnprintf with a buffer sized PRINTF_BUF_SIZE,
and that is where the cut-off came from.

I have now changed pdf_print_toks_ln() to use pdf_puts() instead,
and have altered pdf_puts() itself to accept arbitrary length strings
(it used to be limited by the active PDF buffer size). The commit
is #2959 if you want to have a closer look.

Best wishes,

More information about the dev-luatex mailing list