How to print barcode labels to client-side Zebra thermal printers from ASP.NET
April 26, 2011 1 Comment
Print barcode labels to users’ Zebra thermal printers from ASP.NET (or any web server technology) is not an easy task. There are a couple of ways to try out but all share this workflow:
- User enters the webpage using his favorite browser (IE, Mozilla Firefox, Google Chrome, Opera, etc.)
- The webpage displays the barcode label in some “format”, let’s see:
- No Plugin approach:
- A simple HTML markup with <img> tags for barcodes and other common tags for text
- One single <img> tags where the barcode and text is on it
- Plugin approach:
- A PDF file containing the barcode and text
- A Flash swf file containing the barcode and text
- A Silverlight applet containing the barcode and text
- No Plugin approach:
- User prints the barcode label depending on the approach used in #2:
- For No Plugin approach, the “print page” functionality of the user’s browser is in charge.
- For Plugin approach, the “printing API” of the selected plugin platform (Adobe PDF Reader, Flash or Silverlight) is in charge.
Each of the above combinations has its pros and cons, for instance:
- No Plugin approach
- Pros: it does not require the user to have installed any Plugin on his machine
- Cons: because this approach leverages the “print page” functionality of the user’s browser, it requires lots of effort from both, the developer and the user, to configure and fine tune all stuff to get barcode label content correctly printed on thermal printers
- Plugin approach
- Pros: in general, the “printing API” provided by the Plugin is more rich and customizable from the developer perspective. This allows the barcode label content to be correctly printed on the user’s thermal printer with almost any intervention or configuration from the user.
- Cons: the user is forced to install the selected Plugin on his machine. Note: this is not always a restriction because Acrobat PDF Reader or Flash are widely installed out there.
Well after some tests here at Neodynamic, we have found the Plugin approach using Adobe PDF to be one of the most reliable ways to get your barcode labels printed on user’s thermal printers accurately. We have just published a guide providing some sample code about this topic using our ThermalLabel SDK 4.0 in ASP.NET client-side printing scenarios