Working with Table

<TableBlock>

Insert a table to document. It is typically used to present table of elements or element properties. You must combine the use of <TableRow> and <TableCell> in order to form a complete table. Most of the build-in templates are formed by tables and contains <TableBlock>. You can look for references easily.

Name Description/Usage Required?
tableStyle : string Specify the table style by its ID. You can find the ID of table styles in the Formats window of Doc. Composer.  
tableWidth : string The width of table. For example: '50%' means to occupy 50% of page width. There are four available units:
% (e.g. 50%)
cm (e.g. 10cm)
mm (e.g. 800mm)
px (e.g. 500px)
Optional
colWidths : integers Specify the widths of table columns in ratio, separate by comma. Note that the number of columns specify in @colWidths must match the number of <TableCell> to add under <TableRow>, under this table.

For example, specify "1, 1, 2" for a table with 20000 as width will result in creating a table with three columns, and have widths 5000, 5000, 10000.
Optional
rowBackgroundColors : colors Background color of rows in table. Optional
repeatTableHeader
{true | false | followOption}
True to repeat the table header row at the top of the next page for table that span multiple pages. Note that this option only works in PDF and Word document.

If "followOption", it will follow the setting set in Doc. Composer's document export window.
Optional
singlePage : boolean = false True to ensure that a table will not be split in two or more pages. When the remaining space of a page cannot display the whole table, Doc. Composer will try to show it in the next page. If the table height is longer than a page, the exceeding part of the table will be cropped. Optional
Attributes of <TableBlock>

<TableRow>

Enables you to add cells to a <TableRow>.

Name Description/Usage Required?
height : integer How tall it is for the table row.
Optional
backgroundColor : color Background color of row.
Optional
singlePage : boolean = false True to ensure that a table row will not be split in two or more pages. When the remaining space of a page cannot display the whole row, Doc. Composer will try to show it in the next page.
Optional
Attributes of <TableRow>

<TableCell>

Enables you to add cells to a <TableRow>.

Name Description/Usage Required?
topBorderEnable : boolean = true True to draw the top border of cell.
Optional
bottomBorderEnable : boolean = true True to draw the bottom border of cell.
Optional
leftBorderEnable : boolean = true
True to draw the left border of cell. Optional
rightBorderEnable : boolean = true True to draw the right border of cell. Optional
verticalAlignment

{top | center | bottom}
The vertical alignment of cell. Optional
color : color The background color of cell. Optional
colspan : integer Specify the number of cell this cell consumes horizontally. For example, a colspan of 2 means to consume this and the cell on the right. This is equivalent to HTML's colspan. Optional
Attributes of <TableCell>

Related Resources

The following resources may help you to learn more about the topic discussed in this page.

 
7. Conditional Expression Table of Contents 9. Working with Image

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.OK