Print to a label printer from a web site / web application?

36,477

Solution 1

Wow. I know this was asked over 4 years ago, but having burnt the better part of a week in search of a robust method of printing labels from a web app, I had to voice in here.

Here's what I've found:

  • DYMO seems the most likely candidate for excellence. But no, turns out it only prints from (a) its own app, or (b) something using its SDK. The DYMO SDK uses an XML drawing model that is both overly complex and limited in layout and styling. The documentation is scattered and incomprehensible (e.g. what are the <Bounds> values for the common label sizes? There's no description of the tag parameters anywhere!) So frustrating, so disappointing.

  • There's qz (was jzebra), which enables browser printing for devices that speak EPL, ZPL, FGL, ESC/POS, EPCL and CPCL ... which includes the Zebra series. It requires a load of integration (running a web server on device the label printer is attached to), but it works.

  • There's a well designed 3rd party app by Peninsula, which works for DYMO (among others), but requires a middle-step of printing from browser to PDF. They also assume you'll never scale what you want printed down less than 70%, which is incorrect.

The OP says "I would think that, eventually, there would have to be a solution as we move into a more browser-centric world." Four years later, I'd go a step further and suggest any label printer that can't print off a browser (or just behave like a regular printer with small paper) is falling WAY short of its potential. Layout in HTML+CSS is a snap. Browsers parse it perfectly, and render it at any resolution to any output device. It seems so obvious.

If anyone knows of a thermal label printer that prints from the browser instead of imprisoning you in archaic integration methodologies, I'd very much like to know!

Solution 2

The Dymo printers have a browser plugin that let you print from javascript. Very easy to use.

Revisiting this question a few years later.

The networked Zebra printers are easy to print to. In one project I had the webapplication open a socket to the printer and feed it instructions in ZPL.

Solution 3

You could also trying looking PrintNode which provide a cloud printing solution and means you can print straight to any printer over the internet.

Solution 4

A cross-browser/platform-compatible web page/web page script doesn't have the low-level access necessary to transmit printer language command (such as Zebra Printer Language [ZPL]) to the printer. In order to do this, an ActiveX control/browser plugin/applet/similar bit of executable code is required. This limitation is non-printer specific, coming from the browser not the printer manufacturer.

However, many label printers allow you to print to them as though they were normal printers--just ones that print to very small pieces of paper. You could layout your label using HTML/CSS. When displaying the results, instruct the user to go to "File > Print" and select their label printer before clicking print.

Hope this helps,
Ben

Solution 5

Zebra now has a tool called 'BrowserPrint' that works like PrintNode specifically for Zebra printers. (unlike Printnode, it's free to use with Zebra printers)

Some printers also have ppd files available and/or can be configured in cups on a linux platform system or otherwise connected and spoken too via linux. (which then means it's not impossible to use something from shell scripting, php, perl or other methods to print to it by building a simple server daemon or setting up something like apache or lighttpd on a linux box or even a raspberry pi connected to the printer)

Share:
36,477
toddb
Author by

toddb

Updated on July 09, 2022

Comments

  • toddb
    toddb almost 2 years

    Are there any known label printers that will accept print commands from a web site or web application?

    Specifically, the one-off label printers such as Dymo, Brother, Zebra, etc.

    Has anyone had success in printing to these printers (without using an Internet Explorer-Only hack or ActiveX control)

    I would think that, eventually, there would have to be a solution as we move into a more browser-centric world.

  • sleske
    sleske over 13 years
    +1 Good idea. Though it's probably better to send the labels as PDF, that way you have better control over output formatting than using HTML.
  • Tim Gautier
    Tim Gautier about 9 years
    We have a Dymo LabelWriter 450 Twin Turbo that we can print to from a browser. We're having issues controlling the margin when printing html, but it does print.
  • Mark Cooper
    Mark Cooper almost 9 years
    @TimGautier - can you get this printing from a browser silently? i.e. without the print dialog appearing?
  • Mark Cooper
    Mark Cooper almost 9 years
    This option is soon going to be unusable as various browser manufacturers restrict and then remove the ability for Java applets to run support.google.com/chrome/answer/1247383?hl=en
  • sleske
    sleske almost 9 years
    @MarkCooper: Thanks for the information; I edited my answer.
  • Tim Gautier
    Tim Gautier almost 9 years
    Nope. I think you'd need some sort of browser plugin to do something like that. Anything else will go through the browser's print dialog.
  • Skarsnik
    Skarsnik almost 9 years
    Dymo printers can print from javascript without a print dialog.
  • Sarah
    Sarah over 8 years
    @MarkCooper You can do this with chrome's kiosk printing mode. I've had success printing from page to zebra printer without requiring the user to do anything.
  • Mark Cooper
    Mark Cooper over 8 years
    @JayShepherd but that only works in Chrome I guess? - so limited use-case :-(
  • Someone
    Someone about 8 years
    Thanks for adding a link to this I would have had a hard time finding this without knowing it existed.
  • Julien M
    Julien M almost 8 years
    What's the status 1.5 years later? Found this for Zebra but it require a networkable device. developer.zebra.com/community/technologies/printers/…
  • Ashwani
    Ashwani about 7 years
  • Vahid Ghadiri
    Vahid Ghadiri about 6 years
    "many label printers allow you to print to them as though they were normal printers". Are there any printers that dosen't allow us to print to them just like normal printers!??
  • Jason Silver
    Jason Silver almost 6 years
    Can you expand your answer to elaborate how this could be implemented?
  • Matstar
    Matstar almost 6 years
    About the Dymo XML drawing model – we're putting a single PNG image (generated from a PDF) inside the XML, so we're not limited by their XML layout.
  • Jan Rychter
    Jan Rychter over 5 years
    I'm retracing your steps and I find it quite amazing how backwards the entire printer world seems to be. Enabling printing directly from browsers seems like such an obvious competitive advantage, and yet universal solutions are still few. I downloaded an SDK from Dymo for Mac, but I think it is a joke, after going through numerous VISE Installer screens I ended up with a bunch of applescript files. So far the best option seems to be the Zebra Browser Print SDK.