No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Excuse me, Could I config printer setting in js?

    Help
    3
    3
    377
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      theara last edited by

      Hi all, I base on Meteor + Quasar.
      I tried to create Restaurant System.
      Now I would like to Config Printer Setting on JS.
      How to do?

      My problem is:

      • I have 2 printer connect My PC: One on reception and one in the cook
      • I create 2 button Print to Reception, Print to Cook
      • I would like to silence mode printing with specific printer name

      Thanks for your helping

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        AFAIK, printing is only within the realm of the browser and not the realm of JavaScript. So, you can’t control where a print goes directly. You might want to rethink your workflow. For instance, if you have control over the server, which it seems you do, you could just “send” the order to the kitchen/ cook. Let the cook decide which order to print out. So, you’ll need something like a kitchen queue. In it, you’d have the list of orders still open and some indication that the order was already printed out by the kitchen staff.

        Hope that makes sense. 😄

        Scott

        1 Reply Last reply Reply Quote 0
        • beets
          beets last edited by beets

          Although this is an ancient thread (and I only saw it due to the spam post above) you can achieve silent printing if you control the machine the printer is hooked up to via qz tray: https://qz.io/api/

          They have paid options, but it’s absolutely not needed. You do have to generate a self signed ssl cert, but you can then make JS print directly without any print prompt. I use it to print shipping labels to a thermal printer mostly.

          Hopefully this helps someone who might find this thread via search.

          Edit: Just for some more info, qz tray just sets up a websocket server that you can connect to via some simple JS, and send documents like HTML, or a URL to a pdf, img, etc. It takes about a day to get familiar with how to sign messages to send to the websocket server, but once you do it’s pretty nifty.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post