How can I change printer using the chrome extension? - google-chrome

How can I change printer using the chrome extension?
EDIT:
I want to use the extension to change the printer depending on the report I want. For example: A4 printer, A5 printer, thermal printer (epson)

Related

Chrome and Edge blocks printing but on firefox it works

While I am in the browser page, https://mycompany.com/office365-editor/some-file-id, where I can edit and view some office document, I want to also use the printing functionality. So I click on print and see a pop up : but after I click on "Open PDF" a new tab in the browser opens with following error message:
ffc-word-edit.officeapps.live.com ist gesperrt
Diese Seite wurde von Chrome blockiert
ERR_BLOCKED_BY_CLIENT
I only experience this behavior on Chrome and Edge. On Firebox or Safari it just works.
My guess it has something to do with the chrome ad blocker.
When I look at the network tab and find the request
https://ffc-word-edit.officeapps.live.com/we/WordViewer/request.pdf?sometokens
and copy it manually in another tab, I see a pdf ready to print where I can choose the printer as I expected to be in the first place.

I need to disable the Save as PDF option from print in chrome browser?

I need to disable the option to "Save as PDF" in Chrome. If this option is selected, the user can then browse the file explorer, and we want to ensure we lock that down and have a single defined printer selection available. I have tried using the "PrintTypeDenyList" with no luck. I'm uncertain if it even works and can't find any other Chrome options through blogs online. https://chromeenterprise.google/policies/?policy=PrinterTypeDenyList
Has anyone been able to disable the Save as PDF print option in Chrome?
Thank you

Save As PDF Chrome using selenium

I am looking to automate "Save as PDF" of Chrome using selenium. AFAIK it is not supported by the Selenium out of the box. Therefore, i am trying to write my own. I am having an issue. Actually clicking on the Print button in my webpage opens a new window with printable area. I am trying to switch to this window using SwitchTo. But it is timing out always.
You can add the options.AddArgument("--kiosk-printing"); to have it automatically click the print button.
That is working for me but I have a problem setting the printer to Save as PDF. It is printing to the printer instead.
You could try to disable the Chrome PDF plugin and download promt window with desired capabilities. Something like this:
DesiredCapabilities cap = DesiredCapabilities.chrome();
cap.setCapability("download.default_directory","C:");
cap.setCapability("download.prompt_for_download","false");
cap.setCapability("directory_upgrade","true");
cap.setCapability("plugins.plugins_disabled","Chrome PDF Viewer");
WebDriver driver = new ChromeDriver(cap);

How to print pdf silently which is opened by Adobe Reader

Is there any setting for printing silently with Adobe Reader? I want to print pdf without print dialog box in chrome?
You can't... at least not with Adobe Reader.
First, Chrome no longer supports the Adobe Reader for displaying PDF so the PDF will either open in the built-in Chrome viewer or will download and open in Adobe Reader depending on your settings.
Second, the JavaScript methods to control printing from Adobe Reader are privileged functions that require user permission to execute.
You can get around these limitations but it requires that the recipient of the PDF establish trust with either a digital certificate that you sign the PDF with or trust your domain. But in all cases, the user must opt-in before printing will execute silently... so... it's not exactly silent.

Chrome --kiosk-printing has 1-2 minute lag/delay

I need print receipt in Chrome running in
--kiosk
mode. Of course I use
--kiosk-printing
to disable print dialog. I have to note this parameter only emulate automatic pressing Print button.
My printer is Rongta RP80 80mm Thermal Receipt Printer connected via USB to laptop with Windows 10, Chrome 57.
Printing mechanism is easy, printing launches by javascript on page.
When I don't use --kiosk-printing parameter printing starts immediately on Print button press in chrome print preview dialog.
I face to big problem with --kiosk-printing: printing starts only after 1-2 minutes since chrome printing dialog appear and disappear (as noticed, parameter only emulate automatic pressing Print button). It is not printer problem, cause new document appear in windows print queue after this lag.
Why there is a so big lag with --kiosk-printing parameter, how to minimize it?
I had the same problem here when I upgrade chrome to version 57 recently. The only solution at the moment is install an older version of chrome. http://www.geocities.jp/ecvcn/exam/chrome_installer.html
I had the same problem. Using Chrome Canary on a Windows 8.1 PC solved it for me.
mee too, but normal is quite slow, sometimes it not print anything... not only on --kiosk --kiosk-printing. after using Vivaldi (fork of
I had the same problem in April, same in canary, users report that it's fixed in 58 (stable), just update chrome (in help menu, about Google chrome) :
https://bugs.chromium.org/p/chromium/issues/detail?id=706180
So the bug is fixed now.
In the Google Chrome browser property:
-kiosk --disable-print-preview
This will remove your pain.