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...
After unzipping the file you have received or downloaded, the activeX needs to be registered in your windows environment by executing the install.bat file.
If you want to deinstall the OCX you can do it by means of uninstall.bat.
Boths programs just run the regsvr32.exe windows tool in order to register and unregister OCX's.
The ActiveX has been developed using Visual Basic 6.0. For this reason it needs the following files:
Visual Basic
In the subdirectory Examples/VB you will find a visual basic 6.0 project you can use to test the ActiveX. The project is already compiled, you can execute it by means of examplePDF417.exe.
The ActiveX can be inserted into your MSAccess forms and reports. If want to retrieve a value from the database before you create the barcode you can do it this way:
The ActiveX can also be used in your web applications when you use ASP. The following code shows how this can be done:
<%@ LANGUAGE="VBSCRIPT" %>
<%set bc=server.createobject("RPDF417.RPDF417X")
bc.standalone=true
bc.pdfcode=98765432
bc.saveToBMP("c:\inetpub\wwwroot\barcode")
set bc=nothing<HTML>
<BODY>
RBARCODEX<BR>
<img src="barcode.bmp">
</BODY>
</HTML>
this script uses RPDF417X in order to create a bmp image that can be display in the browser. If you want to use another format (not BMP) you can use external tools for the conversion. The following example uses the JanGraphics freeware library to convert the bmp to a png file:
<%@ LANGUAGE="VBSCRIPT" %>
<%set bc=server.createobject("RPDF417.RPDF417X")
bc.standalone=true
bc.pdfcode=98765432
bc.saveToBMP("c:\inetpub\wwwroot\barcode")
set bc=nothingset conv=createobject("janGraphics.Compendium")
conv.convert "c:\inetpub\wwwroot\barcode.bmp","c:\inetpub\wwwroot\barcode.png"
set conv=nothing
%>
Warnning: In some environments you can
get the following error:
Microsoft VBScript runtime
(0x800A01FB)
An exception occurred: saveToBMP()
this error is produced by a Bug in the file MSVBVM60.dll. We advise you to use version 6.00.0092.0037 , if you cannot get it, contact us and we will send you the correct version.
Methods
- paintBarcode(): forces the barcode to be repainted.
- saveToBMP(filename): saves the barcodes to a BMP file.
Properties
- pdfbackColor: background color.
- pdfforeColor: foreground color (color of the bars).
- pdfbarHeight: height in pixels of the bars (default is 7).
- pdfbarWidth: width in pixels of the bars (default is 1).
- pdfcode: string to be encoded.
- 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.
- pdfECLevel: Error correction level (default is 0). Valid values are 0, 1, 2, 3, 4 and 5.
- pdfleftmargin: left margin in pixels (default is 10).
- pdftopMargin: top margin in pixels (default is 10).
- pdfMode: encoding mode (default is 0). Value values are 0 (binary data), 1 ( for text data) and 2 (only for numeric data).