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
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
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