This troubleshooting guide for EVO HTML to PDF Converter contains the necessary information to allow you identify and solve the possible issues that you might encounter during the usage of our software. If you cannot find the solution to your issue in this guide then you can contact our support at any time to help you solve the problem.
The error message 'Could not connect to server IP 127.0.0.1 on port 40001. Please check the HTML to PDF service is started and the port is not blocked by server firewall' indicates that the HTML to PDF Server is not installed or is not accessible at the TCP/IP address the HTML to PDF Client object was configured to use.
You can find details about installing the HTML to PDF Server in HTML to PDF Server Installation topic and details about initializing the HTML to PDF Converter client object in HTML to PDF Converter Client Overview topic.
Most frequently this issue occurs when the resources are referenced by relative URLs in your HTML code and you don't pass the correct base URL parameter to converter method. As an alternative you can use only full URLs in your HTML page.
Another situation is when you reference the images and CSS files with a full local path like C:\images\image.jpg. The correct URL to use for a local path is file:///C:\images\image.jpg.
This issue might also indicate an authentication or permissions problem on the server when accessing the external resources like images and CSS files. The HTML string is loaded into converter and the text is converted to PDF but the images and CSS files are still accessed from an URL and they might not be accessible. To troubleshoot this situation you can use the techniques from the first topic of this guide to troubleshoot network problems.
Most probably this issue occurs because the HTML content scaling done by the converter. The HTML content width is given by the HtmlToPdfConverterHtmlViewerWidth property which is 1024 pixels and is larger than the default A4 portrait PDF page width and therefore the HTML content is scaled down to fit the PDF page. A possible solutions is to set the HTML viewer width to about 800 pixels or to set the PdfDocumentOptionsFitWidth property to false. An object of PdfDocumentOptions type is exposed by the HtmlToPdfConverterPdfDocumentOptions property. You can find more details in the HTML Content Destination and Scaling in PDF topic and in our online demo.
The LicenseKey property of each HtmlToPdfConverter and Document object must be set with the purchased license key. If you are confident that all these objects have this property properly set then make sure that you don't set a demo license key somewhere else in your code and the purchased license key is the only one used in your code.
The converter executes the web page to be converted in a new session , different from the session in which your ASP.NET application runs. You can override the Render method of the ASP.NET page to intercept the HTML string being rendered and convert that string to PDF.
The HtmlToPdfConverterConversionDelay property can be used to specify an additional period of time in seconds to wait for asynchronous content to be loaded before starting PDF rendering.
If you cannot estimate the time to entirely load the HTML page, then you can use the manual triggering mode to trigger the conversion directly from the code of the HTML page being converted. You can find more details about manual triggering mode in the Conversion Triggering Modes topic.
Many HTML pages are using now various techniques to render the page content asynchronously. The converter adapted to this by automatically inserting a delay of a few seconds before starting the rendering to PDF. If your HTML page does not load content asynchronously then you can disable this behavior and speed up the conversion process by setting the HtmlToPdfConverterTriggeringMode property to Auto or by setting the HtmlToPdfConverterConversionDelay property to 0. You can find more details about triggering modes in the Conversion Triggering Modes topic.