ez.no / exponential / documentation / reference / template operators / pdf / table
{pdf(table, $rows, hash( [ showLines, value, ]
[ firstRowTitle, boolean,
[ titleCellCMYK, cmyk_color, ]
[ titleTextCMYK, cmyk_color, ]
[ titleFontSize, font_size, ] ]
[ cellCMYK, cmyk_color, ]
[ textCMYK, cmyk_color, ]
[ rowGap, row_gap, ]
[ colGap, col_gap, ]
[ cellPadding, cell_padding, ]
[ width, table_width, ]
[ repeatTableHeader, repeat_table_header, ] ) ) }
| Name | Type | Description | Required |
|---|---|---|---|
| showLines | integer | Draw options : 0 - none, 1 - inner lines only, 2 - all lines | no |
| firstRowTitle | boolean | Sets if first row in table should be displayed as table header | no |
| titleCellCMYK | array | Title cell color option, range 0 .. 1 | no |
| titleTextCMYK | array | Title text color option, range 0 .. 1 | no |
| titleFontSize | integer | Title font size | no |
| cellCMYK | array | Cell color option, range 0 .. 1 | no |
| textCMYK | array | Text color option, range 0 .. 1 | no |
| rowGap | integer/float | Gap between table rows | no |
| colGap | integer/float | Gap between table coumns | no |
| cellPadding | integer/float | Padding around text in cells | no |
| width | integer/float | Table width | no |
| repeatTableHeader | boolean | Setting for repeating table header. Default 0. From 3.5 | no |
Inserts table into PDF document. The $rows parameter is provided by the ezxml template library, and must be included.
Availble from 3.3 and newer
All parameters except width available in 3.4 and newer
Displaying plain table with default rows :
{pdf(table, $rows, hash( showlines, 1 ) )}
Displaying default row with design properties set :
{pdf(table, $rows, hash( showLines, 0, rowGap, 1, colGap, 1, cellCMYK, array(0,0,0,0), textCMYK, array(0.96,0.3,0,0), firstRowTitle, 1, titleTextCMYK, array(0,0,0,0), titleCellCMYK, array(0.96,0.3,0,0), cellPadding, 4, width, 522))}
Displaying custom table :
{set-block variable=my_table} <tr> <td> {"Cell 1"|wash(pdf)} </td> <td> {"Cell 2"|wash(pdf)} </td> </tr> {/set-block} {pdf(table, $my_table)}
log in or create a user account to comment.
Comments