Debugging HTML to PDF

You can use the built-in JavaScript debug console or developer tools to debug the page you are trying to convert.

Using JavaScript Debug Console

JavaScript debug console captures debug message output from your JavaScript code. See here for more information on how to use this feature.

Using Developer Tools

Internally EO.Pdf uses the same Chromium browser engine from EO.WebBrowser, so it can utilize advanced debug feature such as the built-in Developer Tools provided by EO.WebBrowser. The following code demonstrates how to start the built-in debug UI.

//Display the developer tools UI
EO.WebBrowser.WebView.ShowDebugUI();

//Set the trigger mode to manual so that the converter
//will not convert the page immediately after the page
//has been loaded, this is necessary because otherwise
//we would not have time to debug
HtmlToPdf.Options.TriggerMode = HtmlToPdfTriggerMode.Manual;

//Set the conversion time out value to a large value.
//This is necessary so that the conversion won't time
//out while we are debugging the page
HtmlToPdf.Options.MaxLoadWaitTime = 1000000;

//Start the converter
HtmlToPdf.ConvertUrl("http://www.google.com", result_pdf_file);

Once the debug UI is displayed, please follow the steps here on how to use the debug UI.