04-24-2012 08:05 AM
I created the label and got the prn file and the label prints using the generic text driver. However my problem is this, no matter what I do the spacing of the text is weird. For a ^FD command whatever text follows this command it is spaced weird.
For example, the code ^FDABT Moceluar Imaging, Incorporated^FS comes out as: ABT Molecular Imaging, Incorporated
For example, the code ^FDKnoxville, TN 37777^FS comes out as Knoxv ille, TN 37777
Any thoghts?
04-24-2012 10:03 AM
@DougFerguson wrote:
I created the label and got the prn file and the label prints using the generic text driver. However my problem is this, no matter what I do the spacing of the text is weird. For a ^FD command whatever text follows this command it is spaced weird.
For example, the code ^FDABT Moceluar Imaging, Incorporated^FS comes out as: ABT Molecular Imaging, Incorporated
For example, the code ^FDKnoxville, TN 37777^FS comes out as Knoxv ille, TN 37777
Any thoghts?
I am not sure what happens when you convert it to a prn. This may change your formatting. I would suggest using all ZPL and send that to the printer using the generic text. By passing it through the prn conversion you are allowing some other system to perform the formatting. Without seeing your complete label it is hard to tell if you are formatting everything correctly. Do you specify the font and size to use in the label? Are you specifying the positions correctly? How about justification? All of this is direclty supported in ZPL itself and it would be better to let the printer render the image rather than your PC.
04-24-2012 12:51 PM
I have tried a simple example as outlined in the ZPL guide and even it puts in these weird spaces. I think it has to do with the Report VIs. I am trying to send the string directly to the printer, but I am having problems finding the intrument address (printer is USB).
04-24-2012 12:58 PM
You can try printing directly to the printer, through the print driver, but without using the Report VI's. They do not work very well with Zebra printers since they have no knowledge of the internal fonts, bar codes, etc. I have printed using USB as described earlier without issue. The VISA can be a bit tricky to setup the first time but once that is done sending data to the printer is simply a call to VISA write.
04-25-2012 07:58 AM - edited 04-25-2012 07:59 AM
Using the Driver Wizard I did just that and it was so simple it was genius.
Now the challenge switches to decoding the prn file to pragmatically insert data.
04-25-2012 10:09 AM
Can you post the prn file? Is it ASCII only? What data do you need to replace?
04-25-2012 10:34 AM
Each label will have a date and lot number inserted. These will change daily.
I haven't even started to look at decoding the prn file since they were created by someone else.
04-25-2012 10:40 AM
Unfortunately that is not a format you will be able to easily modify. This format is basically sending bitmaps to the printer and placing them on the label for printing. You would be much better off defining the label itself in ZPL. Do you have an example of what you want the label to look like? ZPL is not that difficult to create once you have a little experience with it.
04-25-2012 03:05 PM
I have figured out a way to insert my text.
The engineer in charge of the visual layout makes the label in Zebra software minus all variable fields and exports the prn file. I import the prn file text and insert between the ^XA and ^XZ commands the field data I want. This required me to find the field origin coordinates for each field data entry through trial and error.
Maybe there is a more elegant way, but given my workload this was easy enough.
Thanks for the input.
04-25-2012 04:01 PM
FWIW, here's managed to modify labels reflect variable data:
I used the Zebra label designer software and placed text fields everywhere I wanted variable data. I used something easily recognizeable and roughly the same length as my expected data (e.g. "111111"). I then created the prn file through the Zebra driver. To print the label with updated/variable data I read the prn file as a text file and do sequential "search and replace" calls to replace all of the "111111", etc. I save the prn file to a temporary location and send that to the printer, preserving my original "template" prn.