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

STA problem in ASP.NET

Thread ID:

Created:

Updated:

Platform:

Replies:

68313 Sep 18,2007 02:26 AM UTC Sep 26,2007 04:53 AM UTC General Discussion 1
loading
Tags: General Discussion
Carso
Asked On September 18, 2007 02:26 AM UTC

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


CONFIRMATION

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.

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

;