Logo

PDFBlaze

Tables are the easiest way to show a list from your data, like the lines of an invoice, a list of orders or the items in a shipment. A table shows one row for every item of the list, keeps its columns aligned on every row and continues on the next page when it gets long.

The template editor with the line item table of an invoice selected

Adding a table

You find the table in the “Insert” tab. A new table comes with two columns and two example rows, so you can see what it looks like before you connect any data. Select the table to see its settings in the “Table” section of the sidebar.

Connecting the rows to your data

Under “Rows for each item of” you choose the list the table should show. This needs to be a list field in your data, usually a list of groups, for example items where each item has a description, a quantity and a price. Next to it you can change the name of the current row, which is item by default for a list called items. The cells then use fields like item.description or item.price.

If you go back to “Example rows”, the table shows the rows stored in the template itself again. That is mostly useful while you are still working on the layout.

Columns

The “Columns” list in the sidebar shows every column with its width. A width can be a fixed size, like 25 (in the unit you work in) or 30mm, or a share of the space that is left, written as 1fr. Two columns with 1fr and 2fr split the remaining space one to two. auto makes the column as wide as its content. A typical setup is a wide 1fr column for the description and fixed widths for the numbers.

“Add column” adds a column at the end, and the cross next to a column removes it. The header and the cell of a column are edited right on the page. Click the header text to change it, and click into a cell to insert the field it should show with “Insert field”. The text in the header and in the cells is styled like any other text, so a column of amounts would usually be aligned to the right and formatted as a currency.

A cell is not limited to one field. In the invoice preset, the description column shows the name of the item and below it a smaller note, which is only shown if the item has one.

Long tables

When a table doesn’t fit on the page any more, it continues on the next one. Rows are never cut in half. The header row is repeated at the top of every page, which you can turn off with “Repeat header on each page”. Row lines and a stripe color for every other row are set in the same section.

Totals usually go below the table as a separate box, like in the presets. If the totals should never be split from each other, turn on “Keep together on one page” for that box, see pages.