We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose pdf Error when adding invalidate text HTML

Hi,


When i’m adding an invalidate text HTML to an Aspose.Text like that

Aspose.Pdf.Generator.Text descContenu = new Aspose.Pdf.Generator.Text();
descContenu.Segments.Add(“
  • hi.
  • what’s up.”);

  • I got this error :

    System.NullReferenceException: Object reference not set to an instance of an object.

    My Text is not valid, I know. What can i do to ignore this problem?

    Please Help.

    Hi zozoanraje,

    Thanks for your interest in our products.

    I tested the scenario with provided code using Aspose.Pdf for .NET v6.8 and unable to find any exception while executing code. Kindly use the latest version and check it fits your need. In case you still face any issue kindly create a sample application and post here to show us the issue. This will help us to regenerate the issue and get the cause of the issue soon.

    We apologize for your inconvenience.

    Thanks & Regards,