Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

CLI Error message - Could not obtain Printer properties - intermittent

Using CLI to print PDF files to a printer. Works fine 99% of the time. Then intermittently will receive the error message: “Could not obtain Printer properties”.

Further, it seems to occur when printing 2 documents back to back. The first document prints OK and the error occurs when printing the second document.

I am trying to find some info about what would cause this. Last time a system reboot alleviated it but it has re-occurred after about a week.

Thank you for any info. I could not find anything beyond basic references to the message within Sumatra.

It sounds like a timing issue e.g. the second call is rejected because the first one has not completed, Without sample calling files to test my best guess is, to add a watch for a completed signal (errorlevel=0 while 1=fault) or add a long enough worst case delay
e.g.
sumatrapdf -print-to-default “C:\MyData\delete me.pdf”
if %errorlevel%==1 echo failed
sumatrapdf -print-to-default “C:\MyData\deleteme.pdf”
if %errorlevel%==1 echo failed

The error condition could be due to the printer / spooler not able to accept another request for information whilst the network is still communicating with previous output.
In that case SumatraPDF would assume the first call was accepted and completed e.g. first error level would thus be 0 but the second call could be blocked thus throw a ““Could not obtain Printer properties”” error on the second call.

Note I see this has now been elevated to github at