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.
Unfortunately, activation email could not send to your email. Please try again.

STA problem in ASP.NET

Thread ID:





68313 Sep 17,2007 10:26 PM Sep 26,2007 12:53 AM General Discussion 1
Tags: General Discussion
Asked On September 17, 2007 10:26 PM

I have tried to run this code but failed. And then i tried to include the AspCompat="true" hopefully would fix this problem however the bmp object return as null. I have no idea of it, could you please help.

HtmlConverter html = new HtmlConverter();

System.Drawing.Image bmp = html.ConvertToImage(Request.MapPath(order.OrderNumber + "sample.html"), ImageType.Metafile,500);

Melba Winshia [Syncfusion]
Replied On September 26, 2007 12:53 AM


I regret for the delayed response.

Could you please check the following?

1) Reference the interop assemblies "AxSHDocVw.dll and SHDocVw.dll" assembly to the project in addition to Syncfusion.Pdf.base.dll and Syncfusion.HtmlConverter.base.dll

2) Add the below page directive to provide COM interoperability in ASP .NET environment.

@Page directive AspCompat="true".

And also, kindly refer the below link to get more details for converting html to PDF:


Please follow the steps that is mentioned in the above link and let us know if the issue still exists.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.