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.

Mon Jun 08, 2015 8:47 pm

I am evaluating your Spire.PDF package for HTML to PDF conversion to replace a legacy component and am running into difficulty. The HTML to PDF conversion works properly when running from within a Visual Studio solution but it fails after deploying the component to Windows 2008 Server, 32-Bit standard edition. The component is using the .Net 2.0 framework and I have selected the corresponding Spire.PDF dlls. I have attached a copy of the HTML file as well as the PDF file that is generated. There is also another file generated with the same name but no suffix that is empty. I can find no diagnostics being generated. Any assistance would be appreciated.

Regards,
Bill Doviak

The code snippet in the calling component:

using (StreamReader sr = new StreamReader(fullPathFilename + ".html"))
{
string html = sr.ReadToEnd();
PdfDocument pdf = new PdfDocument();
PdfHtmlLayoutFormat layoutFormat = new PdfHtmlLayoutFormat();
layoutFormat.IsWaiting = false;
PdfPageSettings pageSetting = new PdfPageSettings();
pageSetting.Size = PdfPageSize.Letter;

Thread thread = new Thread(()=>
pdf.LoadFromHTML(html, false, pageSetting, layoutFormat));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();

pdf.SaveToFile(fullPathFilename + ".pdf");
}

doviakw
 
Posts: 4
Joined: Mon Jun 08, 2015 6:16 pm

Tue Jun 09, 2015 2:13 am

Hello,

Thanks for your inquiry.
Please try to change the application pool to allow 32-bit.
Sorry that I didn't find your attachment. If you still have issue, please kindly note that firstly you need to compress it and upload.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Jun 09, 2015 4:19 pm

Thanks for getting back to me. The server is a 32-bit processor running Windows 2008 Server 32-bit so the app pool is already at 32-bit. I have compressed the HTML source and PDF result and have attached them. Let me know if you need additional information.

doviakw
 
Posts: 4
Joined: Mon Jun 08, 2015 6:16 pm

Wed Jun 10, 2015 9:02 am

Hello,

Thanks for your information.
Please use the Spire.PDF Pack Version:3.4.
And please try the following new override method.
LoadFromHTML(string htmlSourceCode, bool autoDetectPageBreak, PdfPageSettings setting, PdfHtmlLayoutFormat layoutFormat, bool isLoadComplete);
If there are any questions, welcome to get it back to us.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Wed Jun 10, 2015 9:46 pm

Thanks, again, for your assistance. However, I am not able to make the new version of the LoadFromHTML method work at all. I cannot find any documentation about that overloaded form of the method. It is not listed in the API documentation. Can you please describe what the "bool IsLoadComplete" parameter does and how it should be used?

doviakw
 
Posts: 4
Joined: Mon Jun 08, 2015 6:16 pm

Thu Jun 11, 2015 6:05 am

Hello,

Thanks for your response.
The parameter "isLoadComplete" means "Webbrowser loads the html completely ". The method can resolve the issue that caused only "black" word displays on the PDF when convert HTML to PDF. The method does not exist until we released the commercial version Spire.PDF Pack(Hot Fix) Version:3.2.151.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Fri Jun 12, 2015 9:09 am

Hello,

Has your issue been resolved?
Thanks for your feedback.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Fri Jun 12, 2015 6:24 pm

NO. I just created a long reply and saved it but now I can't retrieve it. I will reply more fully when time permits.

doviakw
 
Posts: 4
Joined: Mon Jun 08, 2015 6:16 pm

Thu Jun 18, 2015 9:14 am

Hello,

Thanks for your reply.
We are looking forward to your more details reply.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Jun 25, 2015 7:45 am

Hello,

Could you please give us more details at your convenience?

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.PDF