I am developing an application that prints labels using Zebra GK420t printer.
I successfully could print Barcode with the text value in the bottom of the Barcode.
However, I was not be able to print extra text above the Barcode.
I am using this command
^XA
^FO20,20^BY2
^BCN,100,Y,N,N
^FDvar^FS
^XZ
[Translated to ZPL from program code]
Which, if var is 'abc123', prints the Barcode with abc123 underneath.
Q: How can for example can I print my name above the Barcode???
If you mean "abc123 above the barcode" then change ^BCN,100,Y,N,N to ^BCN,100,Y,Y,N.
If you mean "Print 'Nabeel' above the barcode" then insert
^CFD^FDNabeel^FS
^FO20,50
After the ^FO20,20 line.
This would select internal font "D" (CFD) and print "Nabeel" at offset 20,20 (the preceding (^FO)) then set the position of the barcode to 20,50 since 20,20 is really close to top-left of the label.
I'll presume you know how to modify your program code.
Related
I am trying to print a barcode (code 39) to a label (2" x .75") on a Zebra ZT610 (600 DPI) printer, but none of our 3 barcode scanners will decode the barcode. We are encoding a 14-character alphanumeric value. I created the label using ZebraDesigner, and passed the ZPL to the printer using Zebra Setup Utilities. I also use Labelary to check the label, and change parameter values.
I have tried every conceivable combination of the ^BY and ^B3 commands I can think of, that would fit on the label, including shortening the data for testing (encode only 8 characters). Here is the latest ZPL with a barcode that should be well within the label's printable area, but scanners will not read it:
^XA~JSN^LT0^MNM^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ
^XA^MMT^PW1200^LL0449^LS0^XZ
^XA^BY4,3,143^FT82,192^B3N,N,,N,N
^FD2116A83034137M^FS
^FT39,258^AAN,45,25^FH^FD2116A83034137M^FS
^PQ1,0,1,Y^XZ
Unreadable label image:
We also have an old Zebra R110Xi4 (203 DPI) printer that we also print code 39 barcodes to, on the same labels. The barcodes on these labels are perfectly readable by the scanners. This is the ZPL for it:
^XA~JSN^LT0^MNM^MTT^PON^PMN^LH0,0^JMA^PR8,8~SD30^JUS^LRN^CI0^XZ
^XA^MMT^LL0102^PW379^LS0^XZ
^XA^BY1,3,40^FT50,54^B3N,N,,N,N
^FD2116A83034137M^FS
^FT0,73^ABN,11,7
^FD2116A83034137M^FS
^PQ1,0,1,Y^XZ
Are there any suggestions as to what I might try next?
Thank you!
I have the following code which I print a label with the information of a product. But I have the problem that the product name is not centered. It happens to me that if the name is very long, it goes outside the limits of the label and does not appear. What I want is for the name to start from the center and expand along the label and if it exceeds the limits to continue writing on the next line.
I would appreciate any help
^XA
^CF0,30
^FO150,30^FDNombre del Producto^FS
^CF0,60
^FO200,90^FDPrecio^FS
^FX Third section with bar code.
^BY2,2,50
^FO170,180^BC^FD1234789^FS
^XZ
NOTE: This only works if you are using dots as the unit of measurements (this is the default but specified as ^MUd in the example below). If mm is used (^MUm) the center-thingy does NOT work properly (tested on labelary.com and Zebra S4m).
Use ^FB to define a Field Block. From the manual:
The ^FB command allows you to print text into a defined block type
format. This command formats an ^FD or ^SN string into a block of text
using the origin, font, and rotation specified for the text string.
The ^FB command also contains an automatic word-wrap function.
You could view this example at labelary.com or tryit out yourself:
^XA
^MUd
^LH10,10
^CF0,50
^GB500,500,10^FS
^FO0,50 ^FDNormal^FS
^FO0,150 ^FB500,,,L ^FDLeft^FS
^FO0,250 ^FB500,,,C ^FDCenter^FS
^FO0,350 ^FB500,,,R ^FDRight^FS
^XZ
I have some information I want to print out with a label size of 600 however I can't seem to get it to print the opposite way.
zpl code
! U setvar "ezpl.media_type" "mark"
setvar "zpl.label_length" "600"
END
^XA^LH110,10^FWR
^FO400,0^ASR,18,10^FDInformation^FS
^FO350,0^ASR,18,10^FD Instructions:^FS
^FO350,200^ASR,18,10^FD [instructions] ^FS
^FO250,0^ASR,18,10^FD address:^FS
^FO200,0^ASR,18,10^FD [address]^FS
^FO150,0^ASR,18,10^FD [street]^FS
^FO100,0^ASR,18,10^FD [city]^FS
^XZ
the issue I am having is it prints like.
"space" instructions : do this inste
and cuts it off after a few words. I can't seem to do negative x axis values to just force it to start at the beginning.
So is there a way to make it print in reserve?
so its
"way less space now" .xob siht htiw daetsni siht od : snoitcurtsni
Use ^LL to sent the Label Length. You are not setting that in the ZPL that you show as your example. You can see the Zebra ZPL Programming guide to see details on how to use the command. If you want 600 pixels long, then this should be your first line of ZPL:
^XA^LH110,10^LL600^FWR
I have a client who wants their barcode to look like this:
it currently looks like this:
^FX^A0N,40,30^BY1^BCN,90,Y,N,N,D
^FD5057913162382^FS
i have tried to change the type of barcode however this makes the barcode unreadable.
^A0N,40,30^BY3^B9N,90,Y,N,Y
^FD5057913162382^FS
Does anyone have an idea on how to achieve a barcode that looks like (img 1)?
Your first example prints a Code 128 barcode using the ^BC command and your second example prints a UPC-E barcode using the ^B9 command.
The image at the top, however, shows an EAN-13 barcode. This means that you should use the ^BE command.
I tried this on my SATO CLNX printer (running a ZPL emulator)
^XA
^FO100,100^BY3
^BEN,100,Y,N
^FD5057913162382^FS
^XZ
This is the printout:
enter image description here
I have looked at the Zebra documentation for ZPL as well as searched here on SO to no avail. My scenario is this, I wish to print a barcode on a label using a Zebra printer and ZPL print language but instead of the interpretation line (the human-readable bit below the barcode) being the human-readable version of the barcode I would like it to be a totally different value, e.g. a persons name.
This is the ZPL II guide I am using for reference: http://www.ypsylon.com/download/ZPLII_Guida.pdf
You cannot override the text that prints as part of the interpretation line (aka human readable), however you can turn the interpretation line off and add second text field:
^XA
^BY3,3,146^FT52,166^BCN,,N,N
^FD>:your_barcode_data_here^FS
^FT241,309^A0N,28,28^FH\^FDyour_text_data_here^FS
^PQ1,0,1,Y^XZ
To turn off the human readable set the 3rd parameter of the ^BC command to N.
You can play with the position of the text field to get the desired effect.
Check page page 89 of the current manual for more info.