Troubleshooting

This guide for HiQPdf Chromium HTML to PDF Converter for .NET is intended to help you solve the possible issues you might experience when using of the software.

The styles from the CSS files are not applied and the images are missing from the generated PDF document or image

This issue can occur if the external resources are referenced by relative URLs in the HTML string you convert and you the appropriate base URL parameter is not given to convert method. You can solve this by setting the base URL for resources or by using full URLs in HTML string.

Some content from HTML page as displayed in a browser is missing in generated PDF or image

You can try to set the HtmlToPdfWaitBeforeConvert property with an additional delay in seconds to wait for asynchronous content to be created in HTML page before starting PDF rendering.

If the necessary delay cannot be estimated then you can use the manual triggering mode to trigger the conversion directly from the JavaScript code of the HTML page being converted. You can find more details about manual triggering mode in the Conversion Triggering Mode section.

The images are not loaded in the generated PDF or screenshot image

Some web pages might be designed using the lazy loading technique for images such that only the images visible in the viewport defined by the BrowserWidth and BrowserHeight properties are loaded.

For HTML to PDF Converter the solution is to make sure the HtmlToPdfLoadLazyImages property is set to 'true', which is the default value. Additionally, it is possible to choose between the browser’s internal mechanism and a custom algorithm for loading lazy images using the HtmlToPdfLazyImagesLoadMode property. By default, the Browser mode is used by the converter.

For HTML to Image Converter the solution is to make sure the HtmlToImageConvertEntirePage property is set to 'true', which is the default value. Additionally, it is possible to choose between the browser’s internal mechanism and a custom algorithm for capturing the entire page using the HtmlToImageConvertEntirePageMode property. By default, the Browser mode is used by the converter.

The conversion fails with the error message "Could not read the print status. Could not find file '{status_file_name}'"

This error indicates that the conversion ended unexpectedly for some reason, such as some required shared libraries not being available on the machine running the conversion. To find more details about the error, you can try manually running the loadhtml executable from the 'runtimes\win-x64\native' folder on Windows machines or from the 'runtimes\linux-x64\native' folder on Linux machines, using the command line.

See Also