Hi,
I have a xml file from which I am generating the PDF. The xml is dynamic and it contains a field which can be html data. So, i made it to IsHtmlTagSupported=true.
The data is :
Test <and> , &
Test
Test
While generating the PDF i am getting the following exception :
org.xml.sax.SAXParseException: The entity "nbsp" was referenced, but not declared.
AsposeDelegate Error in main
[Fatal Error] :1:1757: The entity "nbsp" was referenced, but not declared.
java.lang.NullPointerException
at aspose.pdf.xml.Aba.a(SourceFile:180)
at aspose.pdf.xml.Aba.a(SourceFile:159)
at aspose.pdf.Pdf.bindXML(SourceFile:1565)
at ReadFromFile.generatePdfDataSections(ReadFromFile.java:105)
at ReadFromFile.main(ReadFromFile.java:121)
The code template is :
Pdf pdf = new Pdf();
String inputFile = "C:\\Documents and Settings\\Desktop\\testing.txt";
String data = readFile(new File(inputFile));
pdf.bindXML(new StringBufferInputStream(data), null);
pdf.save("C:\\AsposeTest\\config\\test\\My_TEST_PDF_12.pdf");
Attaching the testing.txt
Aspose Java Version 2.7.0/2.9.0 (tried in both)