A
A
abbaerro2011-06-03 16:28:38
Programming
abbaerro, 2011-06-03 16:28:38

Print to default printer from browser, how?

A retail trading company, we plan to install self-service terminals on the trading floor, where the client can pick up the goods of interest. And by pressing the "Print Receipt" button, print a sales receipt after placing an order.
So we thought, but after opening the print form, the printer selection window opens, although the printer is set by default.
As it turned out, this is a feature of browsers.
Does anyone know how to make the browser print immediately after clicking the corresponding button in the web form, without selecting the printer in the corresponding window?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
trueClearThinker, 2011-06-03
@trueClearThinker

There is an option to send a request to the server associated with the print server, which will output to the printer. In my opinion, the most reasonable decision in this case.

N
Nikolai Shayakhmetov, 2015-04-11
@Sh1kolay

I googled this topic for a long time and did not find a normal solution for automatic printing anywhere. And there is a solution if you need to print from a specific computer. Add the --kiosk-printing switch to the chrome launch line. After such a modification, the print selection window appears for a second and immediately closes, while printing is performed to the default printer.

H
himik, 2011-06-03
@himik

No.
one of the comments to a similar poll on the English forum:
“Sorry, afraid not. security thing. Imagine such a code in the hands of porn
spammer.”

X
xdenser, 2011-06-03
@xdenser

I did this by writing a program that used the IE engine and supplemented the DOM with its own object, which was responsible for printing. It prints both through the standard driver and through the COM port. It's just that a thermal printer usually prints very slowly through the driver. Since the print is in the form of a raster, and not using internal fonts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question