0

I am looking for a code which will display a number as well as print it without showing Printer Preview. I already did it but when I want to print the page it appear with Printer preview, and i want to print it directly using POS machine.

Is there anyone know I should solve it?

ts file

print(){

window.print();
}

html file

 <button type="button"  (click) = "createNumber();print();" class="btn btn-primary" >Create Number</button>
Najam Us Saqib
  • 3,190
  • 1
  • 24
  • 43
Amal
  • 1
  • Does this answer your question? ["Silent" Printing in a Web Application](https://stackoverflow.com/questions/21908/silent-printing-in-a-web-application) – derpirscher Feb 21 '21 at 10:12
  • 1
    Typically, because of security reasons, this is a browser setting. Imagine, any webpage could just randomly start printing ... – derpirscher Feb 21 '21 at 10:12

1 Answers1

0

You cann't disable preview print screen for all user. But if you want to disable it on your computer then read the following website Disable Print Preview of Receipts in Chrome

Minh Viet
  • 61
  • 1
  • 5