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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Issues when converting HTML to PDF on deployed site

Thread ID:

Created:

Updated:

Platform:

Replies:

150089 Dec 20,2019 12:49 AM UTC Dec 30,2019 05:39 AM UTC ASP.NET MVC - EJ 2 6
loading
Tags: PDF
Juan Jiminez
Asked On December 20, 2019 12:49 AM UTC

Hi SF,

I'm using the Blink converter to generate a PDF file from some partial views which at the same time use other EJ2 controllers. I'm also using the same approach on a single page layout to generate the header and footer (See attached sample for reference).
 

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:

1. Fix the conversion error
2. Improve PDF generation time.


Thanks in advance.


-Juan


Attachment: PDF_Conversion_error_781aad96.zip

Prakash Viswanathan [Syncfusion]
Replied On 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 


Gowthamraj Kumar [Syncfusion]
Replied On 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  

Juan Jiminez
Replied On December 24, 2019 02:57 PM UTC

Hi Gowthamraj,

This is my server setup:


Best,


Juan Jiminez
Replied On December 25, 2019 02:04 AM UTC

Hi Gowthamraj,


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! 

Juan Jiminez
Replied On 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. 

Prakash Viswanathan [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon