- Home
- Forum
- ASP.NET MVC - EJ 2
- Issues when converting HTML to PDF on deployed site
Issues when converting HTML to PDF on deployed site
Hi SF,
Everything is working fine on my local but when deployed to an IIS server the PDF generation times out.
This is from the server's event log:
An unhandled exception occurred and the process was terminated. Application ID:
/LM/W3SVC/3/ROOT Process ID: 8004 Exception: Syncfusion.Pdf.PdfException
Message: Failed to convert webpage StackTrace: at
Syncfusion.HtmlConverter.BlinkConverter.ConvertToPdf(String url,
PdfDocument& document) at
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,
ContextCallback callback, Object state, Boolean preserveSyncCtx) at
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state, Boolean preserveSyncCtx) at
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state) at
System.Threading.ThreadHelper.ThreadStart()
For what is worth, when I omit either the header or the footer, it does work on the server but it's still pretty slow (about a minute to generate the PDF).
So there's actually 2 issues here:
For what is worth, when I omit either the header or the footer, it does work on the server but it's still pretty slow (about a minute to generate the PDF).
So there's actually 2 issues here:
1. Fix the conversion error
2. Improve PDF generation time.
Thanks in advance.
Thanks in advance.
-Juan
Attachment: PDF_Conversion_error_781aad96.zip
SIGN IN To post a reply.
6 Replies
PV
Prakash Viswanathan
Syncfusion Team
December 20, 2019 02:03 PM UTC
Hi Juan,
Thank you for contacting Syncfusion support.
Currently we are trying to reproduce the reported issue by deploying the sample in server. We will check the reported issues and we will update further details by December 24, 2019.
Regards,
Prakash V
GK
Gowthamraj Kumar
Syncfusion Team
December 24, 2019 02:02 PM UTC
Hi Juan,
Thank you for your patience.
We have tried to reproduced the reported issue, but the provided sample is working properly and PDF document generated with header and footer in our server machine. The reported exception is not reproduced in our end. Kindly please let us know the server environment details such as OS, bit version, RAM, processor of the machine where the conversion take place. So, that we can also create same environment to check the reported exception.
Please refer the below troubleshooting steps for Blink,
Regarding performance issue:
We have also checked the performance of the conversion and it takes 18 seconds for converting HTML to PDF with header and footer in server machine. In local machine, the same conversion takes 14 seconds to complete. The performance factor may varies based on the processor of the server machine. So, please provide us the above environment details to check the performance issue in our end. It will be helpful for us to analyze and assist you further on this.
Regards,
Gowthamraj K
JJ
Juan Jiminez
December 24, 2019 02:57 PM UTC
Hi Gowthamraj,

This is my server setup:

Best,
JJ
Juan Jiminez
December 25, 2019 02:04 AM UTC
Hi Gowthamraj,
This issue was actually related to https://www.syncfusion.com/forums/150013/custom-icon-font-not-rendering-on-html-to-pdf-converter.
The site wasn't resolving the subdomain locally (on the server) and there was also a restriction over HTTPS. Using the Chrome browser directly on the server helped me realize these issues.
Things are working as expected now.
Thanks!
JJ
Juan Jiminez
December 25, 2019 02:06 AM UTC
By the way, it takes around 9 seconds to generate the PDF with header and footer using the URL to PDF approach on our DEV server which is acceptable as we expect it to be way faster on the live environment.
PV
Prakash Viswanathan
Syncfusion Team
December 30, 2019 05:39 AM UTC
Hi Juan,
Thank you for the update.
Please let us know if you need any further assistance on this.
Regards,
Prakash V
SIGN IN To post a reply.
- 6 Replies
- 3 Participants
-
JJ Juan Jiminez
- Dec 20, 2019 12:49 AM UTC
- Dec 30, 2019 05:39 AM UTC