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

HtmlConverter Class


Hi,
First of all, sorry for my English.

I need to convert html to pdf file. I have Syncfusion Essential Studio 10.2.0.75, but I can't instantiate the HtmlConverter class .
From where I can add this reference to my project?
Thanks in advance
 

5 Replies

GM Geetha M Syncfusion Team June 28, 2012 07:34 AM UTC

Hi Angel,

Thank you for your interest in Syncfusion products.

HtmlConverter makes use of WebBrowser control internally which can run only in STA mode. Hence you need to make use of the following code to facilitate conversion process:

var t = new Thread(Detail);

t.SetApartmentState(ApartmentState.STA);

t.Start();

t.Join();

I had placed a simple sample demonstrating the same in the following link:

http://www.syncfusion.com/downloads/Support/DirectTrac/96034/MVC_Sample1805649400.zip

Please try this and let us know if you have any questions.

Regards

Geetha



AM Angel Montero Rojas June 28, 2012 10:02 AM UTC

[Updated on 6/28/2012 5:10:33 AM by: angelmontero@monrojan.net]
Hi,
Thanks for the quick response.
I have reviewed the file "Syncfusion.AssemblyManager.40.txt" and GAC assemblies, and in the log there is an installation error:
"Warning: Assembly : Syncfusion.HtmlConverter.Base Framework : 40 Action: File not found in the disk path :C:\Program Files (x86)\Syncfusion\Essential Studio\10.2.0.75\precompiledassemblies\10.2.0.75\4.0\Syncfusion.HtmlConverter.Base.dll Status: failure."
In % windir% \ Assembly" there is no such dll.
The product I have is Syncfusion Essential Studio ASP.NET MVC Edition Binary obtained through CampusMVP.
Is it possible to be a promotional product does not contain those assemblies?
Syncfusion.AssemblyManager.40.txt attached file.
Thanks in advance.
Regards


Syncfusion.AssemblyManager.40_bc33c763.rar


SS Sivaguru S Syncfusion Team June 29, 2012 07:42 AM UTC

Hi Angel,

Thanks for using Syncfusion products.

We have updated the details for the reported query in the support incident 96034.Please refer the incident for further followup.

Please let us know if you have any queries.

Regards,
Sivaguru S


AB Abigail August 14, 2013 09:29 AM UTC

Here is the demo code to convert to html:
namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{

RasterEdgeImaging PDF = new RasterEdgeImaging();
public void ConvertPdftoHtml();
{
PDFInputFile = (@"C:/1.pdf");
PDFPageNumber = "1";
HTMLOutputFile = OutputFormat.html;
}
PDF.Save("OutputFormat.html", SaveFormat.Html);
}



GM Geetha M Syncfusion Team August 22, 2013 04:44 AM UTC

Hi Abigail,

Thank you for the details.

Essential PDF does not support exporting PDF files to HTML format. We have logged feature request on this and will back to you once implemented.

Please let us know if you have any questions.

Regards
Geetha

Loader.
Live Chat Icon For mobile
Up arrow icon