Working with Cells that Span Multiple Columns

Attribute Usage
colspan The attribute is optional. It is defined with an integer value indicating the number of columns an entry element needs to span.

For tables with a row > entry element (thead or tbody), a colspan attribute is used when a given cell of the table needs to span multiple columns. The user indicates the number of columns to span by adding this attribute and entering the colspan value (integer).

Right click the entry element and select Add Attribute > colspan from the shortcut menu.

In the colspan attribute, enter an integer value to indicate the number of columns to span. There is no default value.

If the Tagged PDF option is selected (see Creating a Tagged PDF), the tag markup behaves differently for Data Tables versus Layout Tables.

Data Table

The tag for a cell entry with the colspan attribute is marked with the /ColSpan attribute in the attribute element (/A) to indicate to span the desired number of columns. The tag for a cell marked with the /ColSpan attribute only appears once in the tag tree (it is not repeated for the spanning columns).

In the following example, the tag for the cell with contents "Loan Terms" would include the attribute ‘/ColSpan 2’ to signify that this value relates to multiple columns.
Figure 1. Data Table with colspan Attribute


Figure 2. Table Header Cell Tag Spanning Two Columns


Layout Table

The use of the colspan attribute for a given cell entry in conjunction with the ReadOrder attribute value set to ColumnByColumn, a <span> cell tag is created for the colspan cell contents and for each spanning column at the locations required in the tag tree structure so it reads in logical order.
Figure 3. Layout Table with colspan and reading order is ColumnByColumn


The use of the colspan attribute in conjunction with ReadOrder attribute value set to RowByRow (RowByRow is also the default value if the ReadOrder element is not present), a single <span> cell tag is created for the spanning column cell contents.
Figure 4. Layout Table with colspan and reading order is RowByRow
Figure 5. Cell tag is duplicated so spanning column reads in logical order when ColumnByColumn