Hi siddhartha,
Thank you for your update.
I had created a sample with your code. I got the exception "System.Threading.ThreadStateException". But it can be solved
by including the attribute AspCompat="true" in the @Page directive. Please try to include the attribute and run the sample.
Please refer the video clip:
http://websamples.syncfusion.com/samples/Pdfvideoclip.ZipPlease follow the steps below that has to be done under Asp.net environment for converting HTML webpage to PDF document .
1) Include the attribute AspCompat="true" in the @Page directive.
Here is the code snippet
[Aspx]
<%@ Page Language="C#" AutoEventWireup="true" AspCompat="true" %>
2) Reference the "AxSHDocVw.dll, SHDocVw.dll" assembly to the project. This dll can be found along with the below sample that shipped with Essential studio.
[Install drive]:\Documents and Settings\Username\My Documents\Syncfusion\ EssentialStudio \version\Windows\Pdf.Windows\ Samples\2.0\HtmlToPdf\CS
3) Place these COM assemblies in the "BIN" directory of your project.
The above steps helps you to resolve the issues you have faced.
please try this and if the problem still exists could you please send us what issue you have reproduced
and also provide the stack trace so that we could give you a better solution?
Regards,
G.Yavana