to give print job directly to printer angular 6

11,071

As already mentioned by others, there's no easy, one-fits-all, solution to this.

The options I could find fall in the following 3 categories:

  1. Browser specific settings

    For some browsers (firefox, chrome) specific settings can be switched on/off or added for silent and/or kiosk mode printing. As these settings are so diverse and sometimes dependent on the version of browser, I'm not going to try to list them here. you can find the methods online for the browser you use under silent printing.

  2. Browser specific plug-ins

    Some plugins can be found too, but they might just do the same things as toggling the settings in the background as number 1

  3. Custom

    One very specific/involved/"hands-on" option that I have found is to work through a service whith custom designed url/file type handlers. you can find the video here: https://www.youtube.com/watch?v=MQMD4Pb7jzY

As you already mentioned. choices are not optimal, but maybe there's something you could work out from these.

Share:
11,071
Harshit kyal
Author by

Harshit kyal

Software Developer.

Updated on June 19, 2022

Comments

  • Harshit kyal
    Harshit kyal about 2 years

    When it comes to web-based POS (point-of-sales), nothing beats the necessity of printing the bill immediately.However, there are not so many options on how to command the printer directly from web page — particularly when developing with Angular framework.I searched everywhere on web but found nothing.

    Is there any third party library or something to accomplish my aim.?

  • Harshit kyal
    Harshit kyal over 5 years
    I want to give print to my default printer. Is it possible from this ?
  • Bhavik Patel
    Bhavik Patel over 5 years
    Hi @Harshitkyal, javascript can't bypass the browser print confirmation window. This is for security reasons. Otherwise, any website could print stuff to your printer without warning.
  • Bhuwan Adhikari
    Bhuwan Adhikari almost 4 years
    so only special type of printer which has direct connection with backend can only do this?
  • Nabel
    Nabel almost 4 years
    I was able to use any printer but I had to have a special host for the printer that connected to the backend. In my case, I used a raspberry pi. Otherwise, there is no way to bypass the print dialog
  • Nabel
    Nabel almost 4 years
    Yeah, I have. I looked into it but didn't use it for some issue. I was using a tablet and wanted to not have a print dialog. I'm sure you could use a server function to fire it off to the printer. I also worry about free google services like cloud print will one day be shutdown. I think cloud print is unsupported come the end of 2020