DynaPDF Manual - Page 92
Previous Page 91 Index Next Page 93
Tables
Page 92 of 839
Tables
DynaPDF provides a very powerful table class that can be used to split an arbitrary area into rows
and columns. Every table cell can contain back- and foreground objects, as well as text, images,
templates, and other tables.
General properties
A table can be used on an arbitrary number of pages and in an arbitrary number of PDF files.
A table is an independent object that is not destroyed with the PDF file in memory. A table can be
used arbitrary often and the contents in it can be updated with new values whenever necessary.
Once a table was fully defined it can be drawn on one or on multiple pages. The output position can
be specified when the table is drawn. A table can also span multiple pages.
For tables which span maybe multiple pages it is possible to define header rows. Header rows will
be repeated when a page break occurs.
The table, rows, columns, and cells support many identical properties. The properties of a cell are
inherited from the table, column, and row, in this order. The formatting rules are comparable with
HTML but they are not identically.
A major difference is that the height of the table cannot be specified since this would complicate the
handling a lot. The height of a table depends only on the heights of the rows in it.
Foreground objects expand a cell if necessary while background objects are drawn into the available
cell space.
An empty table has no appearance. At least one row must be added to achieve a visible appearance.
Error Handling
A table stores error messages and warnings in the error log of the associated PDF instance. This is
the case when rows and columns will be created or when contents will be added to cells. When the
table is drawn, then the normal error handling of the PDF instance is used. That means, error
messages and warnings are passed to the error callback function if set.
If all error messages should be redirected to the error log then set the error mode to emUseErrLog.
See SetErrorMode() for further information.
Non-fatal errors do not break processing. If contents cannot be drawn, e.g. when an image is not
available, then the cell stays empty and the next cell will drawn.
Borders, Cell Spacing, Cell Padding
It is important to understand how borders are drawn, and how cell spacing and cell padding is
applied. A table supports three different kinds of borders: the table border, cell borders, and a special
kind of border: the cell grid.
Previous topic: Blend Modes
Next topic: Background Objects