kendallb / PrintHtml

Open source command line program to print HTML pages using QtWebKit
MIT License
47 stars 18 forks source link

scripting problem #22

Open lazna opened 2 years ago

lazna commented 2 years ago

Just found the program start but hang in memory if is started from CGI scripting environment. From console window it work normally. My guess is it cant create GUI box with green progress bar in true scripting enviroment and wait for it, or something like this. Any other reason for such behaviour?

lazna commented 2 years ago

Just found workaround which allow run interactive UI program from non-interactive environment (e.g. SYSTEM account).

Processing of printing task itself could be monitored by:

powershell "Get-WinEvent -MaxEvents 4 -FilterHashTable @{ LogName = 'Microsoft-Windows-PrintService/Operational'; ID = 800,801,805,307} | Select-Object -Property TimeCreated,Message | ft -HideTableHeader | Out-String -width 999"

NOTE: printer spooler eventlogging have to be enabled first: https://www.quora.com/How-can-I-check-my-print-history-in-Windows-7