Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying newline character in PDF generated with FOP

I'm generating a PDF document using FOP. The source XML contains some text data which contains newlines. But when its being shown in PDF, all new lines are converted into spaces. I tried replacing all \n characters with


 

in the java code but that is not helping too. How can I display the new lines in PDF document? Can you please provide your suggestions?

Thanks in advance.

like image 548
jobinbasani Avatar asked Jan 07 '10 22:01

jobinbasani


1 Answers

oopsie...figured it out..

linefeed-treatment="preserve"

Should be added to fo:block...thats all

like image 188
jobinbasani Avatar answered Oct 03 '22 08:10

jobinbasani