Crash when using InLineHTML mode

Dear all

I am currently evaluating Aspose for use in our ASP.Net application. I am trying to convert a html document to pdf using the helpfile example "HTML to PDF using InLineHTML". I could not get this to work, everytime I attempt to save the file, the webserver crashes. When running it in the debugger everything works perfect up to the point it tries to save the pdf document, it creates the empty document on disk and then crashes.

There is obviously something in my html file that is confusing the system, however, I have tried to run this same file through other pdf converter products and it works fine.

Is there anyone that could maybe shed some light on why this file does not convert with Aspose?

Hello Tonie,

Thanks for considering Aspose.

In order to convert the HTML pages into PDF format, the input resource file must be in correct format i.e. proper starting and ending tags and currently this functionality does not support Inline CSS. The feature of supporting InLine CSS is already logged in our issue tracking system as PDFNET-14739. Our development team is looking into the details of this problem and will keep you updated on the status of implementation.

As a workaround, I have removed the InLine CSS information and corrected the source HTML file. During my testing, I have used Aspose.Pdf for .NET 4.4.1 (latest Hotfix shared over this link) and I am unable to notice any problem. The resultant PDF and the updated HTML file are in attachment. Please take a look.

In case of any further query, please feel free to contact. We apologize for your inconvenience.

Thanks for the reply.
Our generated documents make extensive use of css so it seem this will not be a good solution for us if the product does not support inline css declarations.

Anyway, thanks again for your answer.

Kind regards


Hello Tonie,

Thanks for your patience.

I am pleased to inform you that with the release of version 4.6.0 of Aspose.Pdf for .NET, the support for Inline style and external CSS is provided. But I am afraid all the styles are currently not supported. Our development team is still working hard to support rest of the style formattings and as soon as the feature becomes more stable, we would be pleased to share the information.

For more information on how to use CSS formatting in HTML, please visit the following link HTML to PDF using InLineHTML

In case you have any further query, please feel free to contact.

The issues you have found earlier (filed as 14739) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.