EVO HTML to PDF Converter


EVO HTML to PDF Converter for .NET Documentation

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 conversion fails with 'Navigation interrupted', 'The remote host name was not found', 'The remote server refused the connection' or 'Unknown network error' error message

These error messages indicate a network problem when the converter tries to access the HTML page to convert on the server where the conversion runs. The first thing you can try is to check whether the HTML page you convert can be accessed in a browser on that server. It is important to login on that server and to access the HTML page from there because it is not uncommon that a page hosted on a server is accessible from outside the server but not from server itself, due to various security restrictions. If the HTML page is not accessible in a browser on server then you should work with your network administrator to make it accessible.

The 'Navigation interrupted' can also occur when the HTML page takes too long to be loaded. In this case you can simply increase the HtmlToPdfConverterNavigationTimeout property value.

If the HTML page is accessible but you still get a network error in converter then you should check if the browser on server uses any proxy settings to access the HTML page. If you find such proxy settings then you should set the same options in converter as explained in Proxy Options topic. If the HTML page requires authentication then you should resolve it based on the information from Authentication Handling topic.

If the cause of the issue is not any of the possible causes mentioned above, then you should search the issue in the identity of the user running the converter being different from the user running the browser. When you login on the server you run the browser in the context of the logged in user which usually is an Administrator. Many of the network mechanisms used in HTML page access can be based on user identity and network credentials. For example Integrated Windows Authentication or Proxy Authentication can be based on the credentials of the user running the converter. The converter is configured by default to use the credentials of the user running the converter, but if you run the converter in ASP.NET then the user running the converter is the IIS pool identity, which most probably is not an Administrator. To run the converter in the same context as the browser you have to either set the IIS pool identity to an Administrator or run the conversion in a Windows Forms desktop application on that server.

When you using the converter in ASP.NET the issue might be caused by impersonation you have set in your ASP.NET application. When you use impersonation you would expect the converter to run in the context of the impersonated user but this is not true unless you set the appropriate Impersonation Options in converter.

The conversion fails with 'Data receive error. Could not receive data. Exception of type 'System.OutOfMemoryException' was thrown', 'Memory allocation error. Try the 64-bit version', 'Data receive error. Could not receive data. Error code: 6', 'Data receive error. Could not receive data. Error code: 0', 'Data receive error. Could not receive data. Error code: 109' error messages or you see the 'Exception code: 0xc0000005' in Windows logs for evointernal.dat process

These error messages can indicate a memory allocation error in converter. In general you can avoid memory allocation issues by running the converter in a 64-bit environment. This is the recommended configuration for EVO HTML to PDF Converter. When you run the converter in ASP.NET you have to set the 'Enable 32-bit' flag of the IIS application pool on false to make sure the converter runs in a 64-bit process. It is also recommended to use the version of the converter optimized for 64-bit environments, which is provided as a separate download on our website. This version should also avoid the memory allocation issues that might occur during the navigation.

When I convert a HTML string to PDF, the external CSS files are not applied and the images are missing from the generated PDF document.

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.

The text font size and images appears to be smaller than they are in HTML page

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.

I set the purchased license in my code but I still get the demo warning in the generated PDF documents

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 session data and the values input by a user in a HTML page are lost during HTML to PDF conversion

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. You can find an example for this in our online demo.

The asynchronous content written from AJAX or JavaScript in HTML page is not rendered in 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.

In some situations the conversion takes a few seconds even when converting a simple HTML

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.