Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

including barcodes in PCL datastream - what are the means?

Status
Not open for further replies.

Yulka

Programmer
Sep 19, 2019
8
RU


Hi everyone,

I am trying to gather information about how do barcodes function in PCL and am a bit confused.

How do barcodes actually look like in a usual PCL datastream? I have some PCL file examples

where barcodes are described with just normal rectangles and numbers, but as far as I understand

this is not typical nowadays. Are they just another type of fonts and are included in PCL datastream

as soft fonts of special type or as a reference to the local printer fonts?

I am reading about some special barcode modules which are meant

to enable barcoding in PCL files. What do these modules do? I would be also gratefule for some

examples of PCL files with modern barcodes. Where could I find such examples?

Thank you very much in advance for your help,

Yuliana
 
Yuliana,


Yes, referencing the bar codes as you would a regular font is the most direct method.

You can:

(i) Purchase PCL Soft Fonts that have bar codes. For example, Morovia sells some:

Link

You would use these soft fonts like you would any other soft font, in that you would download them to the printer either before (and make 'permanent') or during your print job.

I've also used a technique in the past where I wrap the soft font in a macro, and then store that macro in the "0:\pcl\macros\" directory on any resident storage device you have (on the printer), and then just execute the macro. That saves having to include the soft font info every time.

(ii) Purchase hardware Bar Code fonts directly from HP:

Link

These would be selected just as you would any other hardware font on your printer.

(iii) Finally, you can use a 'hybrid' technique of taking a TrueType bar code font of your choosing, converting it to a hardware font using HP's WebJet Admin 10, and storing the converted font on your printer's resident storage device, provided you have one.

This method is a bit involved, but I actually think it's pretty neat. I detail it here:

Link


I hope this gives you some idea of your possibilities. And, I probably left other methods out, so perhaps some of the other guys here will contribute.

Good luck.




Hugh Hood
 
Hi Hugh,
thank you very much for your answer.
Ok, then, I do understand about barcodes as fonts.
But are there any other ways to include barcodes into PCL -
may be some extensions to the PCL Interpreter and additional
commands to PCL, which would allow to refer directly to
a barcode? Is there any such way, may be for some special
printers?
Negative answer is also an answer! I just want to
gather all the possible means, which I could meet
in a PCL.
Thank you to everyone in advance,
Yuliana
 
It really depends on your needs. Certainly, a soft font will provide the best economy and flexibility as to different barcode symbologies. Or you could buy a LaserJet from a company like TROY that makes modified LJs specifically for barcodes. Now if you are talking about several hundred printers across the enterprise, then the cash outlay for the hardware is a major consideration.

Speaking in the PCL context, PCL5 now, I know of no extensions to the language that will do anything for you. This brings us to the barcode symbology. Most require a checksum embedded in the barcode itself to catch a bad scan or what have you, so the application that generates the code comes into play. Typical barcode label printers, e.g. Zebra, Datamax, Sato etc., will calculate checksums internally and assemble the appropriate print string including start/stop codes and necessary checksums.

Can I assume that as this is a PCL forum you are going to generate the output yourself.

The other thing is the nature of your print job. Consider that a print run could have a different barcode data in each instance, OR maybe the barcode data doesen't change where it is a fixed barcode in a manual or a business reply envelope or somesuch. In the latter case. you could simply use the PCL rectangle command to draw the barcode manually.

If you tell us more about your we can probably give you specific advice.

It really depends on your needs. Certainly, a soft font will provide the best economy and flexibility as to different barcode symbologies. Or you could buy a LaserJet from a company like TROY that makes modified LJs specifically for barcodes. Now if you are talking about several hundred printers across the enterprise, then the cash outlay for the hardware is a major consideration.

Speaking in the PCL context, PCL5 now, I know of no extensions to the language that will do anything for you. This brings us to the barcode symbology. Most require a checksum embedded in the barcode itself to catch a bad scan or what have you, so the application that generates the code comes into play. Typical barcode label printers, e.g. Zebra, Datamax, Sato etc., will calculate checksums internally and assemble the appropriate print string including start/stop codes and necessary checksums.

Can I assume that as this is a PCL forum you are going to generate the output yourself.

The other thing is the nature of your print job. Consider that a print run could have a different barcode data in each instance, OR maybe the barcode data doesen't change where it is a fixed barcode in a manual or a business reply envelope or somesuch. In the latter case. you could simply use the PCL rectangle command to draw the barcode manually.

If you tell us more about your we can probably give you specific advice.


Jim Asman
 
Yuliana,

As Jim mentioned, I suppose you could use the PCL rectangle commands, or I suppose go into HP/GL and draw them graphically, but that could get to be a lot of work.

Jim also makes a good point about check digits.

In my initial reply to you I forgot to mention one other method of using bar codes as soft fonts that you wouldn't have to purchase, should you just want to experiment.

That would be the late Chris Hutchinson's [DansDadUK] wonderful PCL Utility program 'PCLParaphernalia'.

He's got a soft font generate tool that will take a donor TrueType font and generate a PCL Soft Font.

You'll find it here:

Link

It's nice to see that some folks are still using PCL. It's starting to feel a little lonely these days.
 
Hi Hugh, hi Jim,
thank you very much for your answers.
We do use PCL, we are reading them and creating them,
and this "barcode"-question of mine actually concerns
more the issue of interpreting PCL datastream.
I do now want create barcodes, I want to be able
to parse incoming PCL and to interpret barcodes
correctly if I meet them.
I can read and interpete soft fonts, can read
and interpret rectangles, so the main question
is - what else can I expect as barcode PCL elements?
Are there any special modes, extensions, commands?
For example, I have met command <Esc>(0Y
(Primary Font: Symbol Set (0Y = Barcode: 3 of 9)ю
Is this the only possible symbol set for barcodes
or are there others? Where is this symbol set
described? Are there other barcode-related commands
to find in PCL datastream.... Such questions.
Thank you all for you answers!
Yuliana

 
There aren't any barcode related commands as such. You referred to a symbol set, which if it is really contains only legal 3of9 characters, does little for you. It certainly does NOTHING in the way of barcodes themselves.

Only talking about 3of9 now. You need to first go out on the net and find the 3of9 spec. Get an appropriate soft font and it is up to your application to make sure that it selects the appropriate font and delivers only legal characters supported by the font.

About 20 years ago I created a 3of9 bitmap font for use with a database called filePro, and I have put the instructions for its use on my website at...
Read that and it should give you some idea of what you are up against. If you have any questions, fire away. Do recognize that other symbologies have their own rules and have nothing to do with 3of9.

Jim Asman
 
Yuliana,

HP's PCL 5 Comparison Guide lists the following Symbol Sets for Barcodes:

3 of 9 Barcode 0Y
Industrial 2 of 5 Barcode 1Y
Matrix 2 of 5 Barcode 2Y
Interleaved 2 of 5 Barcode 4Y
CODABAR Barcode 5Y
MSI/Plessey Barcode 6Y
Code 11 Barcode 7Y
UPC/EAN Barcode 8Y
MICR (CMC-7) 14Y
USPS ZIP 15Y

And, there may be more than that.



Hugh Hood
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top