Results 1 to 9 of 9

Thread: Byte-level printing from the web

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,190

    Byte-level printing from the web

    Hi Barry,

    for "ticket printing" we do byte-level printing, setting codes in the printer, and then print strings out one line at a time.

    Is that kind of printing available from the web, or do we have to go to PhoneGap or Node modules (in electron) for that?

    thanks,

    Hank

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,360
    Blog Entries
    22
    Hi Hank,

    In browsers and mobile apps printing is handled by the browser and/or OS in the case of mobile.

    You do not have that level of control in web or mobile.

    What is it you mean by ticket printing? are you referring to bar code printing or? Where are the printers located in web/mobile?
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,360
    Blog Entries
    22
    Hi Hank,

    Bear in mind that you can call server-side procs transparently that you can write in Lianja/VFP that handles the printing for you.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #4
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,190
    Hi Barry,

    ticket printers, for putting tickets on products, are a special class of printers. We use a class that uses winspool.drv and memory heap classes from win32api, etc., to send stuff over to the printers.

    Now that we are introducing web apps, one of the most common uses would be in fact ticket printing while receiving products.

    It looks like PhoneGap and Node.js have printer modules that have a RAW setting, which I think corresponds to what we are using.

    thanks,

    Hank

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,360
    Blog Entries
    22
    Hi Hank,

    Well let us know how you get on with that.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,360
    Blog Entries
    22
    Hi Hank,

    It must be possible as these guys do it in a browser.

    https://www.zebra.com/ap/en/products...ser-print.html
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Hi Hank,

    When we started using mobile printers (Zebra and O'Neil), we took a hard look at all our printing. We weren't happy with the idea of a server having to be maintained with correct printer drivers and correct IP ports, seems you never have an admin when you need one, and the slow response times of Windows printer drivers. In the past, we have on occasion had to print directly to printers (as in ??? in VFP) in their native language (like ZPL on Zebra) to achieve the print speeds necessary for some applications. We found that most all network connected (wired and WiFi) printers listened on port 9100, so with just a little help from Rick's www classes, we now print everything this way.

    We use tables to store the friendly names of the printers, IP addresses, even brand. Since a mobile user picks up a printer at random, one of the first steps is pairing with the printer by scanning the serial number barcode on the printer, also stored in the table. All printing is then routed to that printer via IP. Printing occurs in milliseconds, very responsive. We also use it in our tabletop printers and it really makes administration very easy. Barcode printers have huge, option-laden drivers that can be a bear to setup and maintain correctly. We can send all setup directly to the printer from code and a non-technical user can fire up a new printer. We also query the printers to insure setup is correct to avoid continually sending setup commands.

    Sounds like you already have raw printer commands, so you should be ready to go. ZPL, DPL and even PostScript aren't that tough and with a few text/endtext lines you can generate a fine looking ticket, quickly. My experience is mainly with barcode labelers, but I don't see why this shouldn't also work with other types of networked printers (non-networked with an inexpensive print server). Calling an rsp from a web/mobile app, you are still using a server - you just don't have all that "untidy" printer driver maintenance and...you can use Linux, a huge plus for us.

    Print to port directly from mobile.....hmmm, I wonder....

    - James

  8. #8
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,190
    Hi James,

    yes, we have a library of well over 100 ticket formats for zebra and datamax generated over 16 years of printing tickets to customer specifications in our VFP applications, and for 15 years before that in FoxPro/Base applications. The issue here is only printing from mobile. Port 9001 looks promising: thanks for the lead.

    Hank

  9. #9
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,190
    Hi Barry,

    yes, it's possible. PrintNode does the same thing -- so much the same that I wonder whether Zebra cooked up a deal with them. But no matter. It's possible, so it's just a matter of a) the parts and b) making it easy for the user (which PrintNode doesn't do a swell job of).

    thanks,

    Hank

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us