Set a browser for a specific page

I am encoding network software. I am printing barcodes.

There are 2 printers on the PC, so the user always needs to select a barcode printer to print a barcode and a laser printer to print reports.

Is there a way to set the printer for the page. (From browser settings or via javascript)

For instance:

www.example.com/barcodeprint.php ----> Barcode Printer

www.example.com/reportprint.php ----> Laser Printer

thank

+4
source share
3 answers

- js firefox. dos firefox 56. , max firefox 56 , ( firefox 58), firefox, , . , .

.

0

JavaScript , , , .

, , , Google, API .

+5

No, unfortunately, this is a machine-specific configuration. Even users can have individual printer configurations.

However, there is little hope. You can run JS with printing special event handlers to print instructions for the user to select a specific printer. This will help them choose the right option.

https://developer.mozilla.org/en-US/docs/Web/Guide/Printing

+1
source

Source: https://habr.com/ru/post/1693744/


All Articles