Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - <b>dfbarcode()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dfBarCode()
Allow to print a BarCode
------------------------------------------------------------------------------
Syntax:

     dfBarCode( <cCode>, [<nBarCode>], [<nPrinter>],;
                  [<nWidth>], [<nRow>], [<nLMargin>],;
                  [<nCPI>] ) --> aBarCode

Parameters:

     <cCode>    Codebar to print
     <nBarCode> Type of codebar to print.
     DEFAULT BARCODE_39
     #include "dfBar.ch"
     +---------------------------------------------------+
     | Type          | Description     | Len | Type      |
     |---------------+-----------------+-----+-----------|
     | BARCODE_EAN13 | Ean 13          |  13 | Numeric   |
     | BARCODE_EAN8  | Ean 8           |   8 | Numeric   |
     | BARCODE_UPCA  | Upc A           |  12 | Numeric   |
     | BARCODE_UPCE  | Upc E           |   6 | Numeric   |
     | BARCODE_39    | 39              |   N | Character |
     | BARCODE_25INT | 2/5 Interleaved |   N | Numeric   |
     | BARCODE_25IND | 2/5 Industrial  |   N | Numeric   |
     +---------------------------------------------------+
     <nPrinter> Printer to use. DEFAULT PRN_EPSON_24
     #include "dfBar.ch"
     +-----------------------------------------+
     | Type            | Description           |
     |-----------------+-----------------------|
     | PRN_EPSON_9     | EPSON printer  9 pins |
     | PRN_EPSON_24    | EPSON printer 24 pins |
     | PRN_HPDJ        | HP Deskjet            |
     | PRN_HPDJPLUS    | HP Deskjet +          |
     | PRN_HP_LASERJET | HP Laserjet           |
     +-----------------------------------------+
     <nWidth>   Width of printed barcode. DEFAULT 20
     <nRow>     Heigth of printed barcode. DEFAULT 3
     <nLMargin> Left margin of printed barcode. DEFAULT 0
     <nCPI>     Character Per Inch of printed barcode. DEFAULT 10

Returns:

     <aBarCode> Array of BarCode

Description:

     Allow to print a BarCode

Example:

     SET PRINTER TO LPT1
     SET DEVICE  TO PRINTER
     
     AEVAL( dfBarCode( "1234567890123",;
            BARCODE_EAN13, PRN_HPDJ ), {|x|DEVOUT(x)} )
     
     AEVAL( dfBarCode( "12345678"     ,;
            BARCODE_EAN8 , PRN_HPDJ ), {|x|DEVOUT(x)} )
     
     AEVAL( dfBarCode( "123456789012" ,;
            BARCODE_UPCA , PRN_HPDJ ), {|x|DEVOUT(x)} )
     
     AEVAL( dfBarCode( "123456"       ,;
            BARCODE_UPCE , PRN_HPDJ ), {|x|DEVOUT(x)} )
     
     AEVAL( dfBarCode( "1234567890"   ,;
            BARCODE_39   , PRN_HPDJ ), {|x|DEVOUT(x)} )
     
     AEVAL( dfBarCode( "1234567890"   ,;
            BARCODE_25INT, PRN_HPDJ ), {|x|DEVOUT(x)} )
     
     AEVAL( dfBarCode( "1234567890"   ,;
            BARCODE_25IND, PRN_HPDJ ), {|x|DEVOUT(x)} )
     
     SET PRINTER TO
     SET DEVICE  TO SCREEN

See also:

     dfPrint()

See Also: dfPrint()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson