Line break in xsl

How do i provide line break using xsl?

Hi,

Thank you for considering Aspose.Pdf.

You may try “\n” in your xml for line break. If you face any issue, please share your template files and sample code with us. We will check it and get back to you soon.

Sorry for the inconvenience,

Thanks for your respone.


I am trying below code for line break but it is not working for me.


Let me I am coding in right direction.

Thanks for your respone.


I am trying below code for line break but it is not working for me.


Let me know, I am coding in right direction.

Hello Prithivi Rajan,

Sorry for the delayed response.

Please note that according to the Document Object Model of Aspose.Pdf, a PDF file is comprised of one or more sections where a Section contains one or more Paragraph objects. Text, Image, Attachment, Form field, Annotation, Graph, are paragraph-level elements, and a Text object contains one or more Segment elements. In order to add a line break, you need to use the #$NL replaceable symbol and place it inside the Segment object. Please take a look at the following XML file with the #$NL replaceable symbol and the resultant PDF generated with Aspose.Pdf.

For further information, please visit:

XML:

<Pdf xmlns="Aspose.Pdf">

<Section TextColor="Blue">
<Text>
<Segment>paragraph 1</Segment>
</Text>
<Text MarginTop="10">
<Segment>paragraph 2</Segment>
</Text>
<Text MarginTop="10" Color="Red">
<Segment>paragraph 3 segment 1 </Segment>
<Segment Color="Green">paragraph 3 segment 2</Segment>
</Text>
<Text MarginTop="10">
<Segment>paragraph 4</Segment>
</Text>
</Section>
</Pdf>