We use HtmlToPdfSession to convert a web page to PDF. We want to get the webview console logs written into a file, so that we can diagnose javascript errors in the web page. We see there is a DebugOption to write console logs with HtmlToPdf:
Code: C#
using (StreamWriter consoleLogFileWriter = new StreamWriter(Path.Combine(debugConsolePath, debugConsoleFileName)))
{
consoleLogFileWriter.AutoFlush = true;
HtmlToPdf.DebugConsole = consoleLogFileWriter;
HtmlToPdf.ConvertUrl(printURL, doc);
}
However, there is no DebugOption in HtmlToPdfSession. How can we write debug console logs when using HtmlToPdfSession?