Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • putpdf table - exceed limit

    Hi everybody,

    I have to produce large PDF reports using “putpdf table”. So far, this was not a problem, but after reports have been extended, I get errors when trying to create a PDF. Stata 16 tells “maximum number of tables exceeded; limit 500”, Stata 17 “failed to set table width” or “failed to add table”. I assume these are different error messages for the same problem.
    Strangely, my report consists of 265 pages, on average there is about 1 table per page, so there should not be more than 265-300 tables. Does anybody know why less than 300 tables exceed the limit of 500 tables? Could there be additional, internal temporary tables that are taken into account for the limit? Or could it be that huge tables are counted as more than 1 table each? Beside “putpdf table” I also use “putpdf text” for text before and after tables, maybe the text is also counted as a table?
    Could anyone give me a hint or has experienced a similar problem?

    Unfortunately, I cannot provide Stata code, since there are thousands of lines.

    Thanks in advance for your help.
    Kurt

  • #2
    Originally posted by Kurt Schmidlin View Post
    Could there be additional, internal temporary tables that are taken into account for the limit? Or could it be that huge tables are counted as more than 1 table each?
    This is speculation based on your description of the problem and without seeing your code. To my knowledge, Stata doesn't create tables in the background (though admittedly I'm not certain of this when using the new -collect- system). What does count is if you create tables in memory, to be inserted into another table, then this counts as multiple tables. A work around I have used is to divide the report into manageable chunks, and then append the docx files after.

    Comment


    • #3
      Dear Leonardo, thanks for your answer. I think your suggestion to devide the report in 2 or more parts and then to combine is the easiest way to overcome the limit.

      Comment

      Working...
      X