[bug-pcl] use Barcode Font with ghostpcl
Paul Lechnar
paul at mis.com
Thu Jul 28 18:32:21 PDT 2005
Hi Dietmar.
I was the one asking the question reffered to in your link :)
If you follow the reply thread, you can see I had 3 choices. I took
choice #1, which was to create a custom
PCL font for the 3 of 9 barcode and prepend that font definition to each
PCL job I wanted to contain the
barcode characters. This produced a perfect match to the
cartridge/LaserJet 4 combination we used to use.
Basically, it works like this:
1. have on hand a PCL file that defines the 3 of 9 font
2. create a file that contains the PCL document you want to print.
3. create a new file by putting (1) and then (2) together, in that order
(e.g. cat file1.pcl file2.pcl > file3.pcl)
4. Send (3) to ghostpcl (e.g. pcl2pdf file3.pcl)
Now, the tricky part is step 1. I ended up spending about 20 hours with
the PCL5 handbook, creating a font definition file for each character
allowed in the 3 of 9 spec. (luckily, that's only about 60 characters,
not 127 or more).
It's kind of like this:
ESCe*cnnnnnDESC)s64w < -- This starts the font definition,
where ESC=ASCII 27 (escape char), and nnnnn=some arbritray number to ID
your font
Then each character is like:
ESC*cnnEESC(sxxxWaaaaaaaaaaa <--- Where aaaa is some packed info about
height, width, bitmap of dots for the letter, etc and xxx is the length
of aaaa and nn is the ASCII value of the letter (e.g. A=65, B=66, etc)
Then the end:
ESC*c5F
so the middle part is the part that takes a lot of figuring out. The
PCL5 handbook was invaluable to me, as were some web sites that
described the exact spacing of the vertical bars for each character in
the 3 of 9 font. It's a boatload of work, but the end result is a
usable font.
I'm not sure I can give out the font, as the work I was doing was under
contract and I don't actually own the font. I can help if you have tech
questions though, just post to the list.
Good luck Dietmar!
Paul
Dietmar Rottensteiner wrote:
>Hi,
>
>Does any one have a clue ( or better a detail description ) for me how I can
>use BARCODE fonts with pcl6 to create a PDF document.
>
>
>
>I have fount a description on this Mailinglist - but I can't work thru. And I
>am not sure If this is what I want.
>(
>http://ghostscript.com/pipermail/bug-pcl/2004-February/000174.html
>)
>
>
More information about the bug-pcl
mailing list