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. Image for the cookie policy date
close icon

STA problem in ASP.NET

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);



1 Reply

MW Melba Winshia Syncfusion Team September 26, 2007 04:53 AM UTC

Hi,

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:

http://www.syncfusion.com/products/pdf/windows/Articles/Html_To_PDF.aspx

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

Thanks,
Melba


Loader.
Live Chat Icon For mobile
Up arrow icon