Line height / padding for wrapped text in a table

I was wondering whether it is possible to specify a line height or padding for text that wraps within a table cell?


The wrapping itself is fine but we want to increase the gap between the wrapped lines - the equivalent of specify a line height in HTML.

See attachment.

We are using Aspose.Pdf v9.2.1.0 and are using xslt templates to generate the files.

Hi Chris,


Thanks for contacting support.

In order to set line spacing between contents, please try using LineSpacing property of Aspose.Pdf.Generator.TextInfo class. Please take a look over following XML file. For your reference, I have also attached the resultant PDF generated over my end.

In case you still face any issue, please share your source XML file.

[XML]

<?xml version="1.0" encoding="utf-8" ?><o:p></o:p>

<Pdf xmlns="Aspose.Pdf">

<Section>

<Text MarginTop="30" BackgroundColor="Beige">

<Segment Alignment="center" Color="Red" FontSize="16">

this is text content

</Segment>

</Text>

<Text MarginTop="30" LineSpacing="15">

<Segment FontSize="20" FontName="Arial Narrow"

IsTrueTypeFontBold="true" IsTrueTypeFontItalic="true">

This is TrueType font 'Arial Narrow Bold Italic' with line spacing as 15 and line break which can depict the line spacing mechanism.

</Segment>

</Text>

</Section>

</Pdf>

Thanks for that - works great :slight_smile:

Hi Chris,


Thanks for your feedback. It is good to know that you have managed to accomplish your requirements.

Please keep using our API and feel free to ask any question or concern, we will be more than happy to extend our support.

Best Regards,