Hi
We are using Aspose.PDF.dll version 10.3.0.0.
If we convert a string variable with HTML into a PDF, we get a “object ref not set” on the document.save() command.
You can find the html and the code in the attachment.
We had problems with “bad” html before, but we can’t quit figure out which html piece is wrong in this one, so we could use you’re help.
Hi Luc,
Thanks
for using our API’s.<o:p></o:p>
I have tested the scenario and I am able to reproduce the same problem that an exception is being generated when trying to convert TestBericht.txt file to PDF format. For testing purposes, I have used your code snippet (simplified it to remove custom variables) and also with following simple code lines and have managed to reproduce same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-38559. We will investigate this issue in details and will keep you updated on the status of a correction.
We apologize for your inconvenience.
[C#]
// Load source PDF document
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(@"C:\pdftest\TestBericht.txt", new HtmlLoadOptions());
// Save updated document containing table object
doc.Save(<span style=“font-size:9.5pt;
line-height:115%;font-family:Consolas;mso-fareast-font-family:“Malgun Gothic”;
mso-fareast-theme-font:minor-fareast;color:#A31515;background:white;mso-highlight:
white;mso-ansi-language:EN-US;mso-fareast-language:KO;mso-bidi-language:AR-SA”>@“C:\pdftest\TestBericht.pdf”);
Hi Nayyer
Here is another example for HTML that results in an “Object Ref Not Set”:
- Robuste, rouleur en métal avec bloc de prise 3x1.5mm
- parfait déroulement du câble même quand des appareils électriques sont branchés.
It’s the " " part that goes wrong.
I see the html did not convert correctly in the message, so I added it in the attachment.
Hi Luc,
Hi Tilal,
Hi Luc,
The issues you have found earlier (filed as PDFNET-38559) have been fixed in Aspose.PDF for .NET 21.1.