Javascript – Use System Print Dialog in Chrome in JavaScript

google-chromejavascriptprinting

We have an issue where Chrome's "Print Preview" does not print our pages correctly. If you use the "Use System Print Dialog link" (Ctrl+Shift+P), it prints our page fine (almost identically to Firefox).

We have a button on our page that calls window.print() to open the print dialog. However, in Chrome it opens to the "Print Preview" dialog which ends up not printing our page correctly.

Is there away with JavaScript to print directly to the "system print dialog" in Chrome?

P.S.
I do know how the end user can disable the Print Preview in chrome://flags, but what I want to know is there anyway to prevent it from showing when I programmatically call window.print() (or similar) regardless of user settings.

Best Answer

Print dialogs are not scriptable using JavaScript. They're proprietary parts of browsers themselves.