table

Summary

Insert table into PDF document

Usage

{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, ] ) ) }

Parameters

NameTypeDescriptionRequired
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

Returns

Description

Inserts table into PDF document. The $rows parameter is provided by the ezxml template library, and must be included.

  • repeatTableHeader - Will insert table header when a table is stretched over several pages.

Availble from 3.3 and newer

All parameters except width available in 3.4 and newer

Examples

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)}

Comments

log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
    PDF
       anchor
       createIndex
       filled_circle
       filled_rectangle
       footer
       footer_block
       frame_header
       frontpage
       header
       header_block
       image
       keyword
       line
       link
       newline
       newpage
       set_font
       set_margin
       strike
       table
       text
       text_box
       text_frame
       toc
       ul
    Arrays
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

14/05/2004
10:00:43 am
by Kåre Køhler Høvik

Last updated

23/09/2004
10:34:59 am
by Kåre Køhler Høvik

Authors

Kåre Køhler Høvik



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.