Scan and Print Automatically

Article ID: 87286552

Issue / Question

How Can I Scan a barcode and automatically print a label containing this data?

Applicable To

ZPL, ZebraDesigner

Resolution / Answer

In order to scan a barcode with a barcode reader and automatically print it on the printer connected to the reader, you can proceed in 2 different ways, However you will need a barcode scanner that is able to store a header and a footer (prefix/suffix) in the device itself:

Method 1

  • Manually add the prefix
  • then add the suffix to the barcode scanner.
  • This code will recall the file "BARCODE.ZPL" stored on the printer memory, which contains the barcode format (type of barcode, position on the label, dimension..) so, when the barcode will be read, the data will be added just after the ^FD tag and, when the printer will receive the ZPL code, it will automatically print 1 barcode. If you need to print only 1 label, the command ^PQ1 is not needed; if you need to print more copies, you can just modify the number after the ^PQ command.
View Using ZPL Stored Formats if you need further information about how to store and recall a format from the printer memory

Method 2

  • Create a barcode containing just a carriage return and use it just to confirm the quantity, so you'll have to scan the barcode you want to print, scan the carriage return barcode and the printer will print the label. You can use ZebraDesigner to create the file.

+ Applicable Products

  • ZebraDesigner Pro v2