I'm trying to use the QT Plugin to convert a page to PDF. The page is an Angular application, which opens and renders correctly when opened directly from the browser.
The issue I'm having is Spire.Pdf is generating a blank PDF. I'm trying to troubleshoot why, but there is little to no documentation on this. So far here are my findings
* The page is making only 1 API call when using Spire.Pdf, there should be multiple
* I'm suspecting there are console errors happening (possibly due to QT Plugin not supporting modern JavaScript format or polyfills). Is there a way to save the output of the console?
Here is the code I'm using
- Code: Select all
//Specify the URL path
string url = "http://localhost:4200/print-mode";
//Specify the output file path
string fileName = "UrlToPdf.pdf";
//Specify the plugin path
string pluginPath = "C:\\temp\\QT_Plugin";
//Set the plugin path
HtmlConverter.PluginPath = pluginPath;
//Convert URL to PDF
HtmlConverter.Convert(url, fileName, true, 100000, new Size(1080, 1000), new PdfMargins(0));
Your help is appreciated, how can you troubleshoot QT Plugin issues?
I can provide a live Page privately if you need it for testing
Thanks,
Mark