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

Html To PDF is not working when I upload the project on a server and use the ip address of that server.

Thread ID:

Created:

Updated:

Platform:

Replies:

147105 Sep 2,2019 06:09 AM UTC Sep 3,2019 12:07 PM UTC ASP.NET MVC - EJ 2 1
loading
Tags: PDF
Muath
Asked On September 2, 2019 06:09 AM UTC

Hi SyncFusion Team,

First of all, thanks for these great controls which you provide.

I have a issue in HtmlToPdf control, when I publish my asp mvc project to a server and call my website using ip address ex: 82.212.54.99/MyWebsite from any pc;  HtmlToPdf control doesn't work and takes too much time, but from the same server when I use localhost/MyWebsite it's working.

moreover styles and images doesn't loaded in the pdf when using ip address (in case it downloaded the file after 3 minutes for example)

Waiting you respose :) 

Thanks

Gowthamraj Kumar [Syncfusion]
Replied On September 3, 2019 12:07 PM UTC

Hi Muath, 

Thank you for using Syncfusion products. 

Our WebKit HTML converter internally creating temporary files in temporary folder for converting HTML to PDF. So, it requires read/write and execute permission for the temp folder. When hosting the application to IIS, our converter makes use of system temporary folder (By default, C://Windows//Temp). So, please make sure this path has required permission for the respective user group (IIS_IUSRS). If you are hosting the application in IIS, please try to add IIS_IUSRS user group and provide full access permission to the temp folder.  

Refer below UG link for more information. 

For resources loading issue

We have suspect that the published server URL is in HTTPS format, so that the baseURL was not able to find the resources (such as images, scripts, styles) of the HTML file. While accessing the HTTPS resources, WebKit HTML converter requires OPENSSL libraries to be installed in the machine. You can copy the OPENSSL libraries from development machine and paste it into server machine and then try the conversion in your project and let us know the result. Please ensured that the website url in browser for all the resources are loaded properly in server machine.   

Refer below UG links for more information, 

If the base URL is not HTTPS, then kindly try the additional delay to the converter for loading the external resources (styles, scripts, images etc.,). Can you please try the conversion with additional delay and let us know the result. Please refer below code snippet for set the Additional Delay property to converter settings, 

//Set additional delay; units in milliseconds 
webkitConverterSettings.AdditionalDelay = 2000; 

Please refer the below links for more information about Additional delay, 

Please let us know if you need any further assistance on this. 

Regards, 
Gowthamraj K 


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