Aspose pdf.net BindFO() not recognizing \n \t characters from formatted text

Hi, We recently upgraded PDF.Net from 3.6 to 7.4, Everything was smooth but BindFO() not rendering the format characters \n \t etc.

I have tried using #$NL #$TAB replacement characters as well, but no luck.. Any feedback would be appreciated.

Thanks
Srini

Hi Srini,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Well, you will need to use specific FO tags rather than HTML tags to achieve your desired results. Like is used to add the new line in XSL-FO. You may get the details regarding different FO objects from the following link as per your requirement.

http://www.ibm.com/developerworks/library/x-xslfo2app/

Please feel free to contact support in case you need any further assistance.

Thank You & Best Regards,

Hi, We haven’t changed the Text format n years and they were supported with version 3.6.0.0, but not working since upgrade to 7.4.0.0

Hi Srini,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please share your template file with us. We will further check your issue and get back to you soon.

Sorry for the inconvenience,

Please find email with necessary code, XML data and XSL file.

Hi,


I have tested the scenario using XML and XSL files which you have shared and as per my observations, I am getting “Data at the root level is invalid. Line 1, position 1.” I am also getting the same error with Aspose.Pdf for .NET 3.6.2.9. The source files seems to have some issue. Can you please take a look at your end.

[C#]

Pdf pdf = new Pdf();<o:p></o:p>

string strPath = @"D:\pdftest\";

StringBuilder strNewPathXsl = new StringBuilder();

strNewPathXsl.Append(strPath);

if (!strNewPathXsl.ToString().EndsWith("\\"))

{

strNewPathXsl.Append('\\');

}

strNewPathXsl.Append("ReportFileList_SRM_pdf.xsl");

var xmlDocument = new System.Xml.XmlDocument();

xmlDocument.LoadXml(@"D:\pdftest\SRM-XML.Xml");

var xslDocument = new System.Xml.XmlDocument();

xslDocument.Load(strNewPathXsl.ToString());

pdf.BindFO(xmlDocument, xslDocument);

pdf.IsTruetypeFontMapCached = true;

pdf.TruetypeFontMapPath = "d:/pdftest/";

pdf.Save(@"D:\pdftest\ReportFileList_SRM_pdf.pdf");