PDF417

Installation Guide

Binding with the Encoder

The AS/400 has two distinct development environments: OPM and ILE. The OPM (Original Programming Model) consists of language products like RPG/400, COBOL/400, and PL/I. ILE (Integrated Language Environment) consists of language products like ILE RPG, ILE COBL, and ILE C.

The way the PDF417 encoder library is used in these two environments is identical; however, the way the encoder is called differs. NeoMedia Technologies’ PDF417 Encoder was written in and compiled using ILE C. The software is distributed as an ILE service program. In ILE environments, linking with the encoder is straightforward; it is simply specified as a Bind Service Program to the Create Program command (CRTPGM). For example, if your calling ILE program were named MYLIB/MYPROGRAM, the program would be linked as follows:

CRTPGM PGM(MYLIB/MYPROGRAM) BNDSRVPGM(PDFVxxxx/PDFVxxSRV)

If the PDFVxxxx library has been added to the library list, you may instead wish to use the following:

CRTPGM PGM(MYLIB/MYPROGRAM) BNDSRVPGM(*LIBL/PDFVxxSRV)

Using the PDF417 encoder with an OPM language is a little different. An interface program

(PDFVxxxx/PDFENCOD) has been provided. This is a “stub” C program which, when invoked, in turn calls the PDFVxxSRV service program (since an OPM program cannot directly call an ILE service program). The PDFENCOD program was linked using the following command:

CRTPGM PGM(PDFVxxxx/PDFENCOD)

MODULE(PDFVxxxx/PDFENCOD)

BNDSRVPGM(*LIBL/PDFVxxSRV)

ACTGROUP(*CALLER)

TGTRLS(V3R2M0)

There is a subtle implication here; the PDFVxxSRV service program was linked from the library list (note the BNDSRVPGM parameter). Thus, if you are using an OPM language, the PDFVxxSRV service program must appear in the job’s library list.

The second interface program, PDFINITF, was linked in the same fashion.

Running the Sample Programs

A number of sample programs have been provided: a COBOL/400 program, an ILE COBOL program, an ILE C program, an RPG/400 program, and an ILE RPG program. For simplicity of compiling and running the samples, you may wish to change your current library to the PDFVxxxx library.

The sample programs use the same printer file, PDFVxxxx/PDF417. Before you can compile any of the sample programs, you must create the printer file the samples will use. Two DDS’s have been provided; one for 240 DPI printers and one for the 300 DPI family of printers. These DDS’s differ in two ways; each uses a different font and different vertical line spacing. Refer to the PDF417 Encoder Programming Guide for more information on font selection and line spacing.

When creating the printer file, you must use a device type of *AFPDS. To create the printer file for a 240 DPI printer, use the following:

NeoMedia Technologies, Inc.

Page 24

Page 28
Image 28
HP Encoder PDF417 manual Binding with the Encoder