To convert a string of characters into the bars and spaces required for the barcode requires converting the character string into another string – made up of only the characters present in the PDF font.
The PDFDF.DLL will perform this conversion, and provides three function calls which can either return the required string, copy it to the clipboard, or save it to a named disk file. These functions may be called from Visual Basic (including Visual Basic for Applications in Microsoft Office), Visual C++, Visual Foxpro, Delphi, C++ Builder, and in fact virtually any language that can make DLL calls.
The functions are called with parameters that specify the options available for the barcode:
Code – a pointer to an integer that specifies the barcode type:
|
Code parameter |
Symbol type |
|
0 |
PDF417 barcodes |
|
1 |
MicroPDF barcodes |
|
2 |
Truncated PDF417 |
szIn – is a pointer to a string containing the bytes used as data to create the barcode. While passed as a text string, the string can contain non-text bytes (including ASCII 0) provided that the length parameter (n) is used to specify the length of the data. If n is 0, then the string is assumed to be a null-terminated ASCII string.
n – a pointer to an integer which is either 0 or specified the length of the data in szIn.
columns – a pointer to an integer which specifies the number of codeword columns in the barcode pattern generated. Allowed values are 0 – 100. For PDF417 values less than 3 are ignored. For MicroPDF only values 1 – 4 are permitted.
level – a pointer to an integer specifying the security level of the barcode generated. Allowed values are shown in the table above.
start – a pointer to an integer specifying the mode in which the barcode starts. The allowed values are shown below.
|
Start parameter |
Start mode |
|
0 |
EXC Alpha |
|
1 |
EXC Lower |
|
2 |
EXC Mixed |
|
3 |
EXC Punctuation. |
|
4 |
Binary/ASCII Plus |
|
5 |
Numeric mode |
For MicroPDF barcodes the Start parameter (or Compaction mode) may be
|
Start Parameter |
Start Mode |
|
0 |
Text compaction |
|
1 |
Byte compaction |
|
2 |
Numeric compaction |
More: