On my website, printing has stopped work with Google Chrome (version 81 on Linux, if that matters). The print preview window is stuck with showing "Loading preview...".
While doing this, Chrome prints the following message on the console:
[30378:30378:0424/004907.441044:ERROR:CONSOLE(2990)] "Uncaught TypeError: Cannot read property 'marginTop' of null", source: chrome://print/print_preview.js (2990)
When I open the developer tools and set the CSS media type emulation to "print", the page is shown correctly as it would be printed, and there are no errors in the console.
How can I find out where the problem comes from and how to fix it?
If your Chromebook can't load the print preview, restart your laptop, printer, and router. Additionally, remove and set up the printer again. If the issue persists, clear your Chrome cache, and disable your extensions. You can also reset your browser to default settings.
It has to do with if Chrome initially shows you a page preview (e.g., if web connection is initially unreliable, or if the website's server is delayed). You'll see "Preview" appear in the URL bar when this happens.
Click File > Print. On the right, you'll see a preview of your file.
Resetting Chrome did not solved the issue in my case, I had to disable the Print Preview by adding a key in Windows registry.
As written in Pupuweb.com
Previously this print preview loading problem was able to resolve by disabling it in
chrome://flags/#enable-cloud-printer-handler. However, enable-cloud-printer-handler
, however it was removed in Google Chrome Version 84.
So to disable the Print Preview feature I had to add at HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
a DWORD
value named DisablePrintPreview
with data 1
, restart the machine and could start print again.
If you don't have the GPO Templates for Chrome you can create the keys manually or with the following line.
reg add HKLM\SOFTWARE\Policies\Google\Chrome
To add the value in command line, run as administrator the following line.
reg add HKLM\SOFTWARE\Policies\Google\Chrome /v DisablePrintPreview /t REG_DWORD /d 1 /f
Create a registry file ".reg" and add the following, run as administrator.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
@=""
"DisablePrintPreview"=dword:00000001
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With