https://bugs.documentfoundation.org/show_bug.cgi?id=42673

--- Comment #88 from Thomas Passin <[email protected]> ---
I was one of the many who reported this problem in one from or another.  The
problem is Windows-specific. I have found out that the problem actually comes
from the Windows print system. There is no way to check that a printer is
actually active or working or even present without incurring a long time-out in
case the printer is not present or powered. Trying to check the defualt printer
will incur the same time-out.

Calc apparently wants to check the printer to know how to construct its layout,
and has to wait for the time-out to continue.

Some of the comments that claim that Calc hangs and never returns have probably
not waited long enough for the timeout.

On my new Windows 11 computer, this printer system behavior has been changed
and I no longer experience a delay while opening Calc.

My Windows 10 computer is defunct so I can't go back to check so there is an
element of memory here, but here's a Python program I used to experiment with
the printer issue.  It used to incur the time-out but now in Windows 11 it
returns right away if the printer isn't available. Note that in Windows 11 (or
possibly later versions of PyQt6; I can't check that at present), the printer
is reported as being valid and in the idle state even though that isn't
actually so. 

This program uses PyQt6 printer support but it could be checked separate from
PyQt6.

from PyQt6 import QtPrintSupport as printsupport

pinfo = printsupport.QPrinterInfo()
default_printer = pinfo.defaultPrinter()
printer = printsupport.QPrinter(default_printer)
print(printer.isValid())

if default_printer.isNull():
    print('Printer is missing or off')
else:
    print(default_printer.state())

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to