We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When does COM Exception arise while converting HTML to PDF in Azure?

The HTML to PDF converter makes use of mshtml.dll (IE Rendering Engine) to convert HTML to Vector Images and then the Vector Images are converted to PDF document. So, while hosting in Azure, when the mshtml.dll is not present, then COM exception occurs. To avoid that, refer to this assembly manually and set the CopyLocal to true by using the following code in csproj file.


<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">



As IE rendering engine needs elevated permission, it can be hosted only as Cloud service and not as website since Azure websites only have limited permissions.

The COM error may occur when the instances are not properly disposed. The following changes are needed:

  1. Proceed with the HTMLConversion within using statement.
  2. Dispose the PdfDocument instance after conversion.



Article ID: Published Date: Last Revised Date: Platform: Control:
4214 03/03/2015 03/05/2015 WinForms PDF
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon