![](https://secure.gravatar.com/avatar/d8110a8a8a97be0803549ea5ee2e638b.jpg?s=120&d=mm&r=g)
Hi, what's the maximum length of things like \pdfcatalog in luatex (and pdftex)? I.e. how long can a token register get? We have a pdf where there are a multitude of entries made with \pdfcatalog and pdftex seems to chop the /Catalog at some point. The resulting pdf is quite broken. :-( Best Martin
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Hi, 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, Taco
![](https://secure.gravatar.com/avatar/d8110a8a8a97be0803549ea5ee2e638b.jpg?s=120&d=mm&r=g)
2009/8/6 Taco Hoekwater
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.
Thanks! Best Martin
participants (2)
-
Martin Schröder
-
Taco Hoekwater