PDF stands for “Portable Data File.” A two-dimensional symbology (2D), a single PDF417 symbol carries up to 1.1 kilobytes of machine-readable data in a space no larger than a standard bar code. And, unlike one-dimensional bar codes (1D), which are just a key linked to a database, PDF417 symbols contain the database itself. That means, you don't have to store an article number in the barcode but you can also store the name , the size , the color, the name of the manufacturer etc...
RPDF417 support:
There are 2 installation possibilities ActiveX version and Delphi source code.
In order to install the ActiveX version of the control:
In order to install from the Delphi source code (registered users only):
In the sample application you can set following properties all PDF and Macro PDF properties. If Segment is not -1, a macro pdf symbol will be created. Otherwise a normal PDF 417 symbol is created.
You can execute the following commands:
- Refresh: repaint the symbol using the new properties.
- Print.
- Save BMP: save the symbol in bmp format.
The TPDF417 component is a subclass of TGraphicControl and can therefore be placed on any form or container. This is the esiest way to use it , however you can also create an instance of the component by program and then paint the barcode on any canvas object using the paintBarcode() method.
The TPDF417 component has the following properties and methods:
Methods
- paintBarcode(canvas): paints the barcode on the provided canvas.
You can use the component in order to paint onto an external canvas. For example, in order to create a bitmap file you would use the following code:
var
bmp: TBitmap;
begin
bmp:=TBitmap.create();
bmp.height:=200;
bmp.width:=200;
{use paintBarcode() to paint onto an external Canvas}
barcode.paintBarcode(bmp.Canvas);bmp.saveToFile('barcode.bmp');
end;
- resetMacroPDF(): call this method before rendering a new Macro PDF barcode.
- prepareMacroPDF(): call this method after resetMacroPDF(). After this method is executed you can read the number of segments required to encode your data. The number of symbols can be read from the pfdMadroSegmenCount Property. For example:
pdf.reseltMacroPDF();
pdf.code:='this is the value to encode';
pdf.prepareMacroPDF();{paint all MACRO PDF segments}
for i=0 to pdf.MacroSegmentCount-1 do begin
pdf.pdfSegment:=i;
{paint barcode now}
pdf.paintBarcode(canvas);
end;
Properties
- backColor: background color.
- barColor: foreground color (color of the bars).
- barHeightPixels: height in pixels of the bars (default is 7).
- barWidthPixels: width in pixels of the bars (default is 1).
- code: string to be encoded.
- leftmargin: left margin in pixels (default is 10).
- topMargin: top margin in pixels (default is 10).
- pdfColumns: number of columns of the PDF417 symbol (default is 10)
- pdfRows: number of rows of the PDF417 symbol (default is 0). If 0 the number is automatically calulated.
- pdfMaxRows: maximum number of rows of the PDF417 symbol (optional).
- pdfECLevel: Error correction level (default is 0). Valid values are 0, 1, 2, 3, 4 and 5.
- pdfMode: encoding mode (default is PDF_BINARY). Value values are:
- PDF_BINARY: can encode any character.
- PDF_TEXT: can encode alphanumeric characters and the following punctuation characters: ! \ # $ % & ' ( ) * + , - . / { } | ~
- PDF_NUMERIC: encodes digits characters only.
- pdfTruncated: set it to true in order to create a compact/truncated PDF.
Macro PDF properties
- pdfMacroSegmentCount (read only): number of segments in the macro PDF. This value is calculated by prepareMacroPDF().
- pdfMacroSegment: Segment of the Macro PDF. Can be a value between 0 and SegmentCount-1.
- pdfMacroFileName: filename for Macro PDF control block (optional)
- pdfMacroFileID: file id for Macro PDF control block (optional)
- pdfMacroFileSize: file size for Macro PDF control block (optional)
- pdfMacroTimestamp: timestamp for Macro PDF control block (optional)
- pdfMacroSender: sender for Macro PDF control block (optional)
- pdfMacroAddresse: addresse for Macro PDF control block (optional)