Large tables
The following example shows how you can add to a table little by little, in order to keep the memory footprint low.
Limitations
The use of large tables is not recommended in the following use cases:
- Tables with complex content: For example, the use of form fields. This is because if the page is flushed too early, we can no longer update the needed data structures.
Extra Considerations:
- PDF/A, PDF/UA: To ensure documents conform to these standards, flushing is disabled since we need to check a lot of things upon closing the document. For example, does all text actually use embedded fonts etc. Therefore, we must retain all the pages in memory to perform these conformance checks. This will generate a warning informing you page flushing could not be performed. However, using the large tables feature still benefits from general speed and memory improvements, because we return unused objects to the garbage collector.
See https://stackoverflow.com/questions/78707405/itext7-large-table-pdf-a for more details on a real-world example.
incompletetable
##GITHUB:https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/IncompleteTable.java##
##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.samples/itext/samples/sandbox/tables/IncompleteTable.cs##