Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Jan 28, 2014 8:54 pm

doc.LoadFromHTML(FilePath, false, false, true);

using (var docStream = new MemoryStream())
{
doc.SaveToStream(docStream);

MergePdfPages(document, pdfGenerator, docStream);
}

I grabbed the latest code from the website today and I am trying to convert the HTML to PDF. The only big difference in my situation is the HTML is an actual .HTML file instead of a URL. This method times out when I attempt to do this conversion. Is there a different mechanic for converting HTML to PDF when the HTML is a local file?

*Edit sorry, the doc.LoadFromHTML is the method that times out. (doc is a new Spire.Pdf.PdfDocument())

Corey Miller

coreymiller
 
Posts: 1
Joined: Mon Jan 27, 2014 4:31 pm

Wed Jan 29, 2014 6:44 am

Hi Corey,

Thanks for your inquiry.
You should make sure that the FilePath represents a legal url, you can try to open the url with your IE browser. An url to a local file maybe looks like file:///C:/path/temp.htm.

If you have any other question, please let us know.

Thanks and Regards,
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar

harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Tue Feb 04, 2014 8:36 am

Hello Corey,

Have your issue been resolved? Could you please give us some feedback if convenient?
If you have any questions, welcome to get it back to us.

Regards,
Benjamin
E-iceblue support team
User avatar

Benjamin Du
 
Posts: 82
Joined: Thu Jul 25, 2013 2:38 am

Return to Spire.PDF