Answer the question
In order to leave comments, you need to log in
How to send a command to print a document through the browser?
Good day! How to send a command to print a document using javascript in a browser? It is necessary that when you click on the button on the page, the document immediately goes to print.
I found such a comment, it says that everything is simple, but it is not yet clear how to do
habrahabr.ru/post/240775/#comment_8083783
Answer the question
In order to leave comments, you need to log in
It is necessary that when you click on the button on the page, the document immediately goes to print.this is a game, and thank the eggs that sane browsers do not allow this.
window.print();
and there the user himself decides what to do. for example, on OSX, instead of printing, you can save the page to pdf.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question