Focal Point
[CLOSED] barcode encoding using code 128

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4487067786

September 15, 2017, 02:20 PM
Todd Margarita
[CLOSED] barcode encoding using code 128
does anyone have experience in WebFocus 8.x generating code 128 barcodes? my understanding is that we need to have a way to call an encoding algorithm to encode the data before using the stysheet to apply the font. looking for help or examples on how to call an external application (via url or java or c program) to the encoding

This message has been edited. Last edited by: FP Mod Chuck,


8.2.01m
Windows, All Outputs
September 15, 2017, 02:59 PM
BabakNYC
Do you own Code 128 Fonts? WebFOCUS prints bar codes using fonts.

Check out this URL
https://techsupport.informatio...om/sps/82622550.html

This message has been edited. Last edited by: BabakNYC,


WebFOCUS 8206, Unix, Windows
September 18, 2017, 06:34 AM
Wep5622
That's very hard to do in plain WebFOCUS, as you need to calculate a checksum (and decide on a code-page), for which you need to parse each character of the string to encode in sequence.

I have an NFR open with IBI to implement this, and it looks like they are indeed working on it.

In the meantime we created a custom library, written in C, to implement a function that returns a string encoded according to a font that we use. The specific combination of those two gets us our barcodes.

I've also written a sample implementation in Javascript that generates an SVG image (made up of 4 lines of different widths). That's mostly of academic use though...


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
September 18, 2017, 07:21 AM
Wep5622
@Babak: That works for Code39 fonts, but not for Code128.

Code39 simply wraps the string in asterisks and applies a font. There's no checksum, so barcodes can be read incorrectly or manipulated, and the character set is rather limited (the backslash character is not supported in Code39, for example).

Code128 remedies that by incorporating a checksum character in the barcode and having 3 different code pages (one for upper- and lowercase characters, one for uppercase only and control characters and one for numbers only).

It is possible to apply a font to a string to create a Code128 barcode, but you first have to create the correct string somehow. That's what the C library function in my previous post does. That's the hard part.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
September 18, 2017, 08:15 AM
BabakNYC
Todd, based on Wep5622's insight, my suggestion is for you to open a ticket with IB tech support to throw your weight behind a new feature to support Code128.


WebFOCUS 8206, Unix, Windows