We are using Aspose PDF version 4.1.0.0 and we are trying to generate a PDF from the HTML text and PDF is not generated properly. It has some special characters like “#$NL”.
Please see the below code which we used to generate the PDF document and also attached generated PDF document.
string sourceTextBody = "<b>First Line</b>\nSecond Line";
Pdf generatedPdf = new Pdf();
Aspose.Pdf.Section sectionSourceText = generatedPdf.Sections.Add();
Text textSourceText = new Text(sourceTextBody.Points);
textSourceText.IsHtmlTagSupported = htmlSupport;
textSourceText.text.textInfo.RenderingMode = RenderingMode.FillText;
sectionSourceText.Paragraphs.Add(textSourceText);
generatedPdf.Save("c:\\output.pdf");
As a side note, This was working fine with the old version DLLs (4.0.0.0).
I have tested the issue and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFNET-13096. We will investigate this issue in detail and will keep you updated on the status of a correction.
Many greetings for the New Year and thanks for considering Aspose.
Our development team is working hard to get this issue resolved. I've contacted the development team to share the ETA regarding its resolution and soon you will be updated with the status of correction.
Your patience and comprehension is greatly appreciated in this regard.
I'm pleased to inform you that the issue reported earlier PDFNET-13096 is resolved in the attached HotFix. Please try using it and in case you still face any problem or you've any further query, please feel free to contact.
I've also attached the resultant PDF that I've generated. Please take a look.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.