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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

htmlconverter ActiveX Control

Thread ID:

Created:

Updated:

Platform:

Replies:

52574 Nov 30,2006 02:07 PM UTC Dec 4,2006 05:20 PM UTC ASP.NET Web Forms (Classic) 9
loading
Tags: PDF
Bruno Gomes
Asked On November 30, 2006 02:07 PM UTC

Hi,

I am trying to use htmlconverter class but when my code gets to html = New HtmlConverter it gives the folowing error:

"Could not instantiate ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' because the current thread is not in a single-threaded apartment."

I'm developing in .net framework 1.1 and visual studio 2003. Can anyone helps me?

Bruno Gomes
Replied On November 30, 2006 04:49 PM UTC

I found the solution:

put AspCompat="true" in the page describe.

Administrator [Syncfusion]
Replied On November 30, 2006 05:59 PM UTC

Hi BGomes,

Thanks for the update. Yes, you are right that the error can be rectified by putting the AspCompat="true".

Here are some steps for your clarification.

1) Add to the @Page directive AspCompat="true" attribute to the page where we want to perform html to pdf convertion.

2) Reference the "AxInterop.dll and SHDocVw.dll" assembly to the project.

Here is the sample for your reference.
HTML_TO_PDF_CS_2005.zip

Could you please take a look at this and let me if you have any other queries.
Regards,
Prakash.

Administrator [Syncfusion]
Replied On November 30, 2006 06:01 PM UTC

Hi BGomes,

Thanks for the update. Yes, you are right that the error can be rectified by putting the AspCompat="true".

Here are some steps for your clarification.

1) Add to the @Page directive AspCompat="true" attribute to the page where we want to perform html to pdf convertion.

2) Reference the "AxInterop.dll and SHDocVw.dll" assembly to the project.

Here is the sample for your reference.
HTML_TO_PDF_CS_2005.zip

Could you please take a look at this and let me if you have any other queries.
Regards,
Prakash.

Bruno Gomes
Replied On November 30, 2006 09:59 PM UTC

Thanks for your answer, but i have another issue... it seems that htmlConverter doesn't work in asp .net applications... is this so?
it doesn't give any errors simply doesn't do anything. there's any way to make HtmlConverter in asp .net?

Administrator [Syncfusion]
Replied On November 30, 2006 10:48 PM UTC

Hi BGomes,

HtmlConverter will work in Asp .net too. The problem arrives because it might be referring old assemblies. Could you please do the following steps it will make your program working.

1] Delete these two dll ["AxInterop.dll and SHDocVw.dll" ] from the bin directory and then add from the following path.
C:\Program Files\Syncfusion\Essential Studio\4.3.0.30\Windows\Pdf.Windows\Samples\Data\Interop Assemblies

2] Add to the @Page directive AspCompat="true" attribute to the page where we want to perform html to pdf convertion.
Here is the sample for reference.
HTML_TO_PDF_CS_2005.zip

Regards,
Prakash.


Bruno Gomes
Replied On December 1, 2006 02:27 PM UTC

Still don´t works... I'm using the dll files that are in:
"C:\Program Files\Syncfusion\Essential Studio\4.4.0.46\Windows\Pdf.Windows\Samples\Data"

The ConvertToImage function don't returns any image, in attachment i send my solution for you to see maybe you can tell me what I'm doing wrong.

SyncFusionPDF.zip

Administrator [Syncfusion]
Replied On December 1, 2006 09:28 PM UTC

Hi BGomes,

I am afraid. I was not able to reproduce the issue. I tried to test your sample it is working fine here and I have made some changes in your sample please take a look into it.

Here is a sample for your reference.
SyncFusionPDF.zip

Please let me know if the problem still exists.
Regards,
Prakash.


Administrator [Syncfusion]
Replied On December 2, 2006 07:58 PM UTC

I was trying in framework 1.1 and it didn't work, I noticed that you tryed in framwork 2.0 and I did the same and it works. I rather work with framework 1.1 but if thats not possible...
Thanks for your help.

Administrator [Syncfusion]
Replied On December 4, 2006 05:20 PM UTC

Hi Vijay,

Currently we don’t have the support Html to PDF converter in 1.1 versions. We have already logged a bug report on this issue and we will try to fix the issue as soon as possible.

You can track the information regarding this issue from the following link.
http://www.syncfusion.com/support/issues/pdf/Default.aspx?ToDo=view&questId=2594

Sorry for the inconvenience caused.

Please let me know if you have any other queries.

Regards,
Prakash.

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

;