LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV does not print barcode fonts

Solved!
Go to solution

LV Print Font.JPG

 

This is the VI I created to print a barcode. I set up the font type and size and then sent to the printer. But LV does not print the right font. When I did the same format in WORD and print, WORD can print correctly. 

 

The barcode font I used is not installed on the local PC, but it is available within the printer driver. I guess that's the reason why WORD can print all fine. WHY CANNOT LV?

0 Kudos
Message 1 of 30
(5,473 Views)

What do you want your label to look like? Have you considered sending native ZPL to the printer. The printer will generate the appropriate barcode. In addition, this has the benefit of sending much less data to the printer itself. I suspect that you are not sending the correct data to the printer even though you are going through the printer's driver. From what I know about Word and Zebra printers is that there is an interface between Word and the print driver which exposes things like the available fonts on the printer as well as printer specific items such as cutter control. I don't think the report generation toolkit is robust enough to do this.

 

You may want to experiment though and change your report type to Word and create a Word template and use that. That may give you access to what you want.

 

The most reliable way though would be to use native ZPL and send that to the printer.

 

What model printer are you using?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 30
(5,437 Views)

I am using Zebra ZM400 model. It prints at 203dpi.

 

I dont' really know how to use native ZPL. I noticed that Zebra got a programming guild on their website, but it is like a huge book. I don't want to spend all that much time to learn another language. All I need is to print one of the fonts named 'ZB 128B 15mil' on the printer. 

 

I tried to print from WORD template. But the trouble was the label size 2.5'' X 0.44'', every time printing from WORD template, it reports a margin error and that is just frustrating for other users. 

 

Do you happen to have a LV implementation of native ZPL? Thanks any way for the help.

0 Kudos
Message 3 of 30
(5,431 Views)

I don't have a LabVIEW library to generate ZPL. However, if you could provide an example of what you want your label to look like I could probably create the ZPL format for you. Did you load a font on the printer or is this a built in font. (I confess that I don't know all the names of the built in fonts.) Or are you simply trying to generate a specific barcode type? If so, which barcode?

 

Are you simply trying to print a CODE 128 barcode?

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 30
(5,419 Views)

The label size is 2.75''X0..44'', unprintable area is 0.06'' from each side. 

 

I want to print 2 lines on the label: Line 1: the hunman-readable barcode and line 2 the barcode itself. The barcode font is a built-in font. When I printed from WORD, I refer to this font as 'ZB 128B* 15mil' and it prints. 

 

I would appreciate it so much if you could come up a ZPL format for this. 

0 Kudos
Message 5 of 30
(5,410 Views)

Here is a format that should do what you want:

 

^XA
^COY,300
^LL90
^PW507
^LH0,0
^PR4
^LT0
^FO12,35^BCN,50,Y,Y^FD>:1234^FS
^PQ1
^XZ

 

In this format things you can adjust if this is not exactly what you want:

 

^FOx,y positions the barcode on the label. The units are dots.

The 50 in the ^BCN,50... is the height of the barcode in dots. Your total height is only 90 dots. Your label width is 507 dots.

The "1234" is your actual barcode data. Replace this with your data.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 6 of 30
(5,405 Views)

Mark, 

 

I have a network printer. How do I send this string to the printer? I remember seeing someone post a vi about how to send command to Zebra printer, but having trouble to find the post now. 

 

 

 

 

0 Kudos
Message 7 of 30
(5,386 Views)
Solution
Accepted by topic author MengHuiHanTang

You can simply use TCP to establish a connection to the printer on port 9100. The printer is configured to automatically close connections that are idle after 5 minutes. If you are only sending the label occassionally then you should close the connection and reopen it when you send the next label. If you are sending a fairly steady stream of labels you can leave the connection open.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 8 of 30
(5,367 Views)

Mark, 

 

That's incredible. It works perfect. Once you know it, it is so simpleSmiley Very Happy

 

Thanks so much. 

 

P.S. I noticed you have been helping people here with the Zebra printing issues for years already. And that is incredible too. Thanks so much. 

0 Kudos
Message 9 of 30
(5,359 Views)

 


@MengHuiHanTang wrote:

Mark, 

 

That's incredible. It works perfect. Once you know it, it is so simpleSmiley Very Happy

 

Thanks so much. 

 

P.S. I noticed you have been helping people here with the Zebra printing issues for years already. And that is incredible too. Thanks so much. 


Glad I could help out. Also, as a Zebra employee I feel I have an obligation to help people interface with our printers using LabVIEW.

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 10 of 30
(5,348 Views)