Highlighted
Absent Member.
Absent Member.
2363 views

[archive] Printing EAN128 barcode

[Migrated content. Thread originally posted on 10 March 2005]

Can someone give me a hint for finding the values that have to be send to any windows-printer or has a example.
I'm printing with WIN$PRINTER and use the font CODE128.TTF. On the printer is a barcode printed but the scanner does not recognise that it is EAN128.
The EANCODE must have 3 parts. The first is artikelnumber (01), the second a date (17) and the last count (37).
0 Likes
7 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Printing EAN128 barcode

There are three ways to accomplish barcodes.

The most difficult one is to produce them simply by doing graphics. I don't recommend that. Albeit it is doable with the graphic functions of ACUCOBOL-GT it is tedious and error prone.

The second option is to have an ActiveX component or a DLL that accomplishes this. You then typically control this by calling a method (ActiveX) or a function (DLL). While this usually works ok, it is an addon you normally would be without.

The third option, and in my opinion the best one, is to get hold of a barcode font. If you install this on a computer, activates it in your application, you can just send the normal sequence of characters to the printer (provided you go via the spooler) and the font will care for the rest, simple, efficient and neat. A barcode font may be purchased or obtained for free. I don't remember the 'where and how' 's about the free font, but I am sure someone else in the forum does. If not, try to search on the internet for font and barcode.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Printing EAN128 barcode

4th option - u use a printer which can handle the barcode.

If u use a font and print via "WIN$PRINTER" you need to calculate the checksume for your barcode.

I attached an old example for Barcode128b.

David Neidinger
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Printing EAN128 barcode

Sorry David, but I have to do it wich a HP laserprinter.

Gisle your option 3 I think it is the same as I wrote at the start?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Printing EAN128 barcode

Option 3 from Gisle is what you wrote and for that example you have to calculate the checksum for your own.

We used in past a Barcode Font 128B, calculated the checksum (with in the last posting attached code) and printed it like you on an HP Laserprinter.

In the programm we needed the barcode...

.
.
.

       77  conv-string            pic x(10).
       77  code128b               pic x(13).

.
.
.
              call "barcode" using conv-string
                                   code128b
                   cancel "barcode"

              move  code128b to print-line(15:13)
              write print-line before advancing 1 line


used it also to print with "WIN$PRINTER"


I got my infos from:
http://www.idautomation.com

Infos for Code128:
http://www.idautomation.com/code128faq.html#EAN128andUCC128

Source-Codes for several Languages:
http://www.idautomation.com/fonts/tools/sourcecode/


David Neidinger
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Printing EAN128 barcode

I just created a barcode report using the AcuBench Report which creates an HTML report. Choose the barcode font for the barcode field. The rest of the document is another font. Plus in the program, we had to have an * before and * after the code before the scanner could read it.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Printing EAN128 barcode

It is already a few weeks ago that I was in contact wich Teklynx Software Solutions, look for http://www.barcodelibrary.com (in Holland http://www.moxom.nl) and fond there Bar Code Library. First there where some troubles wich 2-byte or 4-byte. After that, stil no EAN128 on the printer but there was a high value returning by DrawBarcodeToHDC. The solution was that the field VALUE-BARCODE was 30 characters long and filled wich 30 characters. The problem was : no low-value at the end. So the low-value I add to the string statement and printing barcode EAN128 is solved.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Printing EAN128 barcode

Thanks for sharing your experiences with us Jaap.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.