HTML results in Object Ref Not Set when saving to PDF

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,


Thanks for your feedback. We have shared your sample HTML with our product team as well. It will help us in investigation and resolving of the issue. We will notify you as soon as we made some significant progress towards issues resolution.

We are sorry for the inconvenience caused.

Best Regards,

Hi Tilal,


Any update yet on PDFNEWNET-38559?

Kinds regards,

Hi Luc,


Thanks for your inquiry. I am afraid the reported issue is still not resolved. It is pending for investigation due to other issues already under investigation and resolution. We will notify you as as soon as we made some significant progress towards issue resolution.

Thanks for your patience and cooperation.

Best Regards,

The issues you have found earlier (filed as PDFNET-38559) have been fixed in Aspose.PDF for .NET 21.1.