RowSpan in XML

Hello,

We are a licenced customer of Aspose.PDF.

I am trying to use the following XML fragment in a template but keep getting the error “Unknown attribute in Cell Element”. I have tried using RowsSpan also, but to no avail:





The object model documentation seems to suggest that RowSpan on a Cell is supported, but we need to define it in our XML template.

Regards

George Holmes

Dear George,

Thank you for considering Aspose.

RowSpan is supported since version 2.3. Which version are you using?

Tommy,

We are using v2.2.8.0.

Thanks

George

Hi Tommy

I have just downloaded and installed the ltest version that includes the ability to span across rows.
My pdf is getting generated by binding to an xml document and the problem exists where the ‘spanned’ cell does not seem to be making use of the MarginTop setting.

Here is the table in question. This table is in fact nested within another table but I have also tried this as a separate table in a section.

<Table ColumnWidths=“5.4cm 1.6cm”>
<Row>

<Cell><Text MarginTop=“0.2cm” FontSize=“8” Color=“Black” IsTrueTypeFontBold=“False” LineSpacing=“1.0” Alignment=“Center”><Segment><xsl:value-of select="/LIM_MAP/SCALE_TEXT"/></Segment></Text></Cell>

<Cell Rowspan=“2” MarginTop=“0.1cm” MarginBottom=“0.5cm”><Image Type=“gif” FixWidth=“12” Alignment=“Center” >
<xsl:attribute name=“File”><xsl:value-of select="/LIM_MAP/NORTH_IMAGE"/></xsl:attribute>
</Image></Cell>
</Row>

<Row>
<Cell><Image Type=“gif” FixWidth=“5.35cm” Alignment=“Center”>
<xsl:attribute name=“File”><xsl:value-of select="/LIM_MAP/SCALE_IMAGE"/></xsl:attribute>
</Image></Cell>
</Row>

<Row>
<Cell/>
<Cell/>
</Row>
</Table>

Any thoughts on what is going wrong would be appreciated.

Best regards

Ralph Price
Rotorua
New Zealand

Hi to all

I have now managed to answer my own question and the answer is to use PaddingTop as follows:

<Table ColumnWidths=“5.4cm 1.6cm”>
<Row>

<Cell><Text MarginTop=“0.2cm” FontSize=“8” Color=“Black” IsTrueTypeFontBold=“False” LineSpacing=“1.0” Alignment=“Center”><Segment><xsl:value-of select="/LIM_MAP/SCALE_TEXT"/></Segment></Text></Cell>

<Cell Rowspan=“2” PaddingTop=“0.2cm” PaddingBottom=“0.2cm”><Image Type=“gif” FixWidth=“12” Alignment=“Center” >
<xsl:attribute name=“File”><xsl:value-of select="/LIM_MAP/NORTH_IMAGE"/></xsl:attribute></Image></Cell>
</Row>

<Row>
<Cell><Image Type=“gif” FixWidth=“5.35cm” Alignment=“Center”><xsl:attribute name=“File”><xsl:value-of select="/LIM_MAP/SCALE_IMAGE"/></xsl:attribute></Image></Cell>
</Row>

<Row>
<Cell><Text><Segment>here</Segment></Text></Cell>
<Cell><Image Type=“gif” Alignment=“Center”><xsl:attribute name=“File”><xsl:value-of select="/LIM_MAP/RDC_LOGO"/></xsl:attribute></Image></Cell>
</Row>

</Table>

Best regards

Ralph Price
Rotorua
NewZealand