TCPDFBarcode Klassenreferenz

Öffentliche Methoden

 __construct ($code, $type)
 
 getBarcodeArray ()
 
 getBarcodeSVG ($w=2, $h=30, $color='black')
 
 getBarcodeSVGcode ($w=2, $h=30, $color='black')
 
 getBarcodeHTML ($w=2, $h=30, $color='black')
 
 getBarcodePNG ($w=2, $h=30, $color=array(0, 0, 0))
 
 setBarcode ($code, $type)
 
 dec_to_hex ($number)
 
 hex_to_dec ($hex)
 

Geschützte Methoden

 barcode_code39 ($code, $extended=false, $checksum=false)
 
 encode_code39_ext ($code)
 
 checksum_code39 ($code)
 
 barcode_code93 ($code)
 
 checksum_code93 ($code)
 
 checksum_s25 ($code)
 
 barcode_msi ($code, $checksum=false)
 
 barcode_s25 ($code, $checksum=false)
 
 binseq_to_array ($seq, $bararray)
 
 barcode_i25 ($code, $checksum=false)
 
 barcode_c128 ($code, $type='')
 
 get128ABsequence ($code)
 
 barcode_eanupc ($code, $len=13)
 
 barcode_eanext ($code, $len=5)
 
 barcode_postnet ($code, $planet=false)
 
 barcode_rms4cc ($code, $kix=false)
 
 barcode_codabar ($code)
 
 barcode_code11 ($code)
 
 barcode_pharmacode ($code)
 
 barcode_pharmacode2t ($code)
 
 barcode_imb ($code)
 
 imb_crc11fcs ($code_arr)
 
 imb_reverse_us ($num)
 
 imb_tables ($n, $size)
 

Geschützte Attribute

 $barcode_array
 

Ausführliche Beschreibung

PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).

Definiert in Zeile 50 der Datei tcpdf_barcodes_1d.php.

Beschreibung der Konstruktoren und Destruktoren

__construct (   $code,
  $type 
)

This is the class constructor. Return an array representations for common 1D barcodes:

  • $arrcode['code'] code to be printed on text label
  • $arrcode['maxh'] max barcode height
  • $arrcode['maxw'] max barcode width
  • $arrcode['bcode'][$k] single bar or space in $k position
  • $arrcode['bcode'][$k]['t'] bar type: true = bar, false = space.
  • $arrcode['bcode'][$k]['w'] bar width in units.
  • $arrcode['bcode'][$k]['h'] bar height in units.
  • $arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)
Parameter
$code(string) code to print
$type(string) type of barcode:
  • C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
  • C39+ : CODE 39 with checksum
  • C39E : CODE 39 EXTENDED
  • C39E+ : CODE 39 EXTENDED + CHECKSUM
  • C93 : CODE 93 - USS-93
  • S25 : Standard 2 of 5
  • S25+ : Standard 2 of 5 + CHECKSUM
  • I25 : Interleaved 2 of 5
  • I25+ : Interleaved 2 of 5 + CHECKSUM
  • C128 : CODE 128
  • C128A : CODE 128 A
  • C128B : CODE 128 B
  • C128C : CODE 128 C
  • EAN2 : 2-Digits UPC-Based Extention
  • EAN5 : 5-Digits UPC-Based Extention
  • EAN8 : EAN 8
  • EAN13 : EAN 13
  • UPCA : UPC-A
  • UPCE : UPC-E
  • MSI : MSI (Variation of Plessey code)
  • MSI+ : MSI + CHECKSUM (modulo 11)
  • POSTNET : POSTNET
  • PLANET : PLANET
  • RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
  • KIX : KIX (Klant index - Customer index)
  • IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200
  • CODABAR : CODABAR
  • CODE11 : CODE 11
  • PHARMA : PHARMACODE
  • PHARMA2T : PHARMACODE TWO-TRACKS

Definiert in Zeile 73 der Datei tcpdf_barcodes_1d.php.

Benutzt setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Dokumentation der Elementfunktionen

barcode_c128 (   $code,
  $type = '' 
)
protected

C128 barcodes. Very capable code, excellent density, high reliability; in very wide use world-wide

Parameter
$code(string) code to represent.
$type(string) barcode type: A, B, C or empty for automatic switch (AUTO mode)
Rückgabe
array barcode representation.

Definiert in Zeile 938 der Datei tcpdf_barcodes_1d.php.

Benutzt get128ABsequence().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_codabar (   $code)
protected

CODABAR barcodes. Older code often used in library systems, sometimes in blood banks

Parameter
$code(string) code to represent.
Rückgabe
array barcode representation.

Definiert in Zeile 1799 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von setBarcode().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_code11 (   $code)
protected

CODE11 barcodes. Used primarily for labeling telecommunications equipment

Parameter
$code(string) code to represent.
Rückgabe
array barcode representation.

Definiert in Zeile 1855 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von setBarcode().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_code39 (   $code,
  $extended = false,
  $checksum = false 
)
protected

CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. General-purpose code in very wide use world-wide

Parameter
$code(string) code to represent.
$extended(boolean) if true uses the extended mode.
$checksum(boolean) if true add a checksum to the code.
Rückgabe
array barcode representation.

Definiert in Zeile 373 der Datei tcpdf_barcodes_1d.php.

Benutzt checksum_code39() und encode_code39_ext().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_code93 (   $code)
protected

CODE 93 - USS-93 Compact code similar to Code 39

Parameter
$code(string) code to represent.
Rückgabe
array barcode representation.

Definiert in Zeile 540 der Datei tcpdf_barcodes_1d.php.

Benutzt checksum_code93().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_eanext (   $code,
  $len = 5 
)
protected

UPC-Based Extentions 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers 5-Digit Ext.: Used to mark suggested retail price of books

Parameter
$code(string) code to represent.
$len(string) barcode type: 2 = 2-Digit, 5 = 5-Digit
Rückgabe
array barcode representation.

Definiert in Zeile 1500 der Datei tcpdf_barcodes_1d.php.

Benutzt binseq_to_array().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_eanupc (   $code,
  $len = 13 
)
protected

EAN13 and UPC-A barcodes. EAN13: European Article Numbering international retail product code UPC-A: Universal product code seen on almost all retail products in the USA and Canada UPC-E: Short version of UPC symbol

Parameter
$code(string) code to represent.
$len(string) barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
Rückgabe
array barcode representation.

Definiert in Zeile 1307 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von setBarcode().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_i25 (   $code,
  $checksum = false 
)
protected

Interleaved 2 of 5 barcodes. Compact numeric code, widely used in industry, air cargo Contains digits (0 to 9) and encodes the data in the width of both bars and spaces.

Parameter
$code(string) code to represent.
$checksum(boolean) if true add a checksum to the code
Rückgabe
array barcode representation.

Definiert in Zeile 874 der Datei tcpdf_barcodes_1d.php.

Benutzt checksum_s25().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_imb (   $code)
protected

IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200 (requires PHP bcmath extension) Intelligent Mail barcode is a 65-bar code for use on mail in the United States. The fields are described as follows:

  • The Barcode Identifier shall be assigned by USPS to encode the presort identification that is currently printed in human readable form on the optional endorsement line (OEL) as well as for future USPS use. This shall be two digits, with the second digit in the range of 0–4. The allowable encoding ranges shall be 00–04, 10–14, 20–24, 30–34, 40–44, 50–54, 60–64, 70–74, 80–84, and 90–94.
  • The Service Type Identifier shall be assigned by USPS for any combination of services requested on the mailpiece. The allowable encoding range shall be 000http://it2.php.net/manual/en/function.dechex.php–999. Each 3-digit value shall correspond to a particular mail class with a particular combination of service(s). Each service program, such as OneCode Confirm and OneCode ACS, shall provide the list of Service Type Identifier values.
  • The Mailer or Customer Identifier shall be assigned by USPS as a unique, 6 or 9 digit number that identifies a business entity. The allowable encoding range for the 6 digit Mailer ID shall be 000000- 899999, while the allowable encoding range for the 9 digit Mailer ID shall be 900000000-999999999.
  • The Serial or Sequence Number shall be assigned by the mailer for uniquely identifying and tracking mailpieces. The allowable encoding range shall be 000000000–999999999 when used with a 6 digit Mailer ID and 000000-999999 when used with a 9 digit Mailer ID. e. The Delivery Point ZIP Code shall be assigned by the mailer for routing the mailpiece. This shall replace POSTNET for routing the mailpiece to its final delivery point. The length may be 0, 5, 9, or 11 digits. The allowable encoding ranges shall be no ZIP Code, 00000–99999, 000000000–999999999, and 00000000000–99999999999.
Parameter
$code(string) code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode)
Rückgabe
array barcode representation.

Definiert in Zeile 2035 der Datei tcpdf_barcodes_1d.php.

Benutzt dec_to_hex(), hex_to_dec(), imb_crc11fcs() und imb_tables().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_msi (   $code,
  $checksum = false 
)
protected

MSI. Variation of Plessey code, with similar applications Contains digits (0 to 9) and encodes the data only in the width of bars.

Parameter
$code(string) code to represent.
$checksum(boolean) if true add a checksum to the code (modulo 11)
Rückgabe
array barcode representation.

Definiert in Zeile 743 der Datei tcpdf_barcodes_1d.php.

Benutzt binseq_to_array().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_pharmacode (   $code)
protected

Pharmacode Contains digits (0 to 9)

Parameter
$code(string) code to represent.
Rückgabe
array barcode representation.

Definiert in Zeile 1946 der Datei tcpdf_barcodes_1d.php.

Benutzt binseq_to_array().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_pharmacode2t (   $code)
protected

Pharmacode two-track Contains digits (0 to 9)

Parameter
$code(string) code to represent.
Rückgabe
array barcode representation.

Definiert in Zeile 1972 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von setBarcode().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_postnet (   $code,
  $planet = false 
)
protected

POSTNET and PLANET barcodes. Used by U.S. Postal Service for automated mail sorting

Parameter
$code(string) zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
$planet(boolean) if true print the PLANET barcode, otherwise print POSTNET
Rückgabe
array barcode representation.

Definiert in Zeile 1575 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von setBarcode().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_rms4cc (   $code,
  $kix = false 
)
protected

RMS4CC - CBC - KIX RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Customer index) RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service.

Parameter
$code(string) code to print
$kix(boolean) if true prints the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the house number must be sufficed with an X and placed at the end of the code.
Rückgabe
array barcode representation.

Definiert in Zeile 1648 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von setBarcode().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

barcode_s25 (   $code,
  $checksum = false 
)
protected

Standard 2 of 5 barcodes. Used in airline ticket marking, photofinishing Contains digits (0 to 9) and encodes the data only in the width of bars.

Parameter
$code(string) code to represent.
$checksum(boolean) if true add a checksum to the code
Rückgabe
array barcode representation.

Definiert in Zeile 802 der Datei tcpdf_barcodes_1d.php.

Benutzt binseq_to_array() und checksum_s25().

Wird benutzt von setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

binseq_to_array (   $seq,
  $bararray 
)
protected

Convert binary barcode sequence to TCPDF barcode array.

Parameter
$seq(string) barcode as binary sequence.
$bararray(array) barcode array. òparam array $bararray TCPDF barcode array to fill up
Rückgabe
array barcode representation.

Definiert in Zeile 844 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_eanext(), barcode_msi(), barcode_pharmacode() und barcode_s25().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

checksum_code39 (   $code)
protected

Calculate CODE 39 checksum (modulo 43).

Parameter
$code(string) code to represent.
Rückgabe
char checksum.

Definiert in Zeile 517 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_code39().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

checksum_code93 (   $code)
protected

Calculate CODE 93 checksum (modulo 47).

Parameter
$code(string) code to represent.
Rückgabe
string checksum code.

Definiert in Zeile 668 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_code93().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

checksum_s25 (   $code)
protected

Checksum for standard 2 of 5 barcodes.

Parameter
$code(string) code to process.
Rückgabe
int checksum.

Definiert in Zeile 717 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_i25() und barcode_s25().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

dec_to_hex (   $number)

Convert large integer number to hexadecimal representation. (requires PHP bcmath extension)

Parameter
$number(string) number to convert specified as a string
Rückgabe
string hexadecimal representation

Definiert in Zeile 2159 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_imb().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

encode_code39_ext (   $code)
protected

Encode a string to be used for CODE 39 Extended mode.

Parameter
$code(string) code to represent.
Rückgabe
encoded string.

Definiert in Zeile 466 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_code39().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

get128ABsequence (   $code)
protected

Split text code in A/B sequence for 128 code

Parameter
$code(string) code to split.
Rückgabe
array sequence

Definiert in Zeile 1268 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_c128().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

getBarcodeArray ( )

Return an array representations of barcode.

Rückgabe
array

Definiert in Zeile 82 der Datei tcpdf_barcodes_1d.php.

Benutzt $barcode_array.

getBarcodeHTML (   $w = 2,
  $h = 30,
  $color = 'black' 
)

Return an HTML representation of barcode.

Parameter
$w(int) Width of a single bar element in pixels.
$h(int) Height of a single bar element in pixels.
$color(string) Foreground color for bar elements (background is transparent).
Rückgabe
string HTML code.

Definiert in Zeile 147 der Datei tcpdf_barcodes_1d.php.

getBarcodePNG (   $w = 2,
  $h = 30,
  $color = array(0,0,0) 
)

Return a PNG image representation of barcode (requires GD or Imagick library).

Parameter
$w(int) Width of a single bar element in pixels.
$h(int) Height of a single bar element in pixels.
$color(array) RGB (0-255) foreground color for bar elements (background is transparent).
Rückgabe
image or false in case of error.

Definiert in Zeile 173 der Datei tcpdf_barcodes_1d.php.

getBarcodeSVG (   $w = 2,
  $h = 30,
  $color = 'black' 
)

Send barcode as SVG image object to the standard output.

Parameter
$w(int) Minimum width of a single bar in user units.
$h(int) Height of barcode in user units.
$color(string) Foreground color (in SVG format) for bar elements (background is transparent).

Definiert in Zeile 93 der Datei tcpdf_barcodes_1d.php.

Benutzt getBarcodeSVGcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

getBarcodeSVGcode (   $w = 2,
  $h = 30,
  $color = 'black' 
)

Return a SVG string representation of barcode.

Parameter
$w(int) Minimum width of a single bar in user units.
$h(int) Height of barcode in user units.
$color(string) Foreground color (in SVG format) for bar elements (background is transparent).
Rückgabe
string SVG code.

Definiert in Zeile 114 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von getBarcodeSVG().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

hex_to_dec (   $hex)

Convert large hexadecimal number to decimal representation (string). (requires PHP bcmath extension)

Parameter
$hex(string) hexadecimal number to convert specified as a string
Rückgabe
string hexadecimal representation

Definiert in Zeile 2183 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_imb().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

imb_crc11fcs (   $code_arr)
protected

Intelligent Mail Barcode calculation of Frame Check Sequence

Parameter
$code_arr(string) array of hexadecimal values (13 bytes holding 102 bits right justified).
Rückgabe
int 11 bit Frame Check Sequence as integer (decimal base)

Definiert in Zeile 2200 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von barcode_imb().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

imb_reverse_us (   $num)
protected

Reverse unsigned short value

Parameter
$num(int) value to reversr
Rückgabe
int reversed value

Definiert in Zeile 2236 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von imb_tables().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

imb_tables (   $n,
  $size 
)
protected

generate Nof13 tables used for Intelligent Mail Barcode

Parameter
$n(int) is the type of table: 2 for 2of13 table, 5 for 5of13table
$size(int) size of table (78 for n=2 and 1287 for n=5)
Rückgabe
array requested table

Definiert in Zeile 2253 der Datei tcpdf_barcodes_1d.php.

Benutzt imb_reverse_us().

Wird benutzt von barcode_imb().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

setBarcode (   $code,
  $type 
)

Set the barcode.

Parameter
$code(string) code to print
$type(string) type of barcode:
  • C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
  • C39+ : CODE 39 with checksum
  • C39E : CODE 39 EXTENDED
  • C39E+ : CODE 39 EXTENDED + CHECKSUM
  • C93 : CODE 93 - USS-93
  • S25 : Standard 2 of 5
  • S25+ : Standard 2 of 5 + CHECKSUM
  • I25 : Interleaved 2 of 5
  • I25+ : Interleaved 2 of 5 + CHECKSUM
  • C128 : CODE 128
  • C128A : CODE 128 A
  • C128B : CODE 128 B
  • C128C : CODE 128 C
  • EAN2 : 2-Digits UPC-Based Extention
  • EAN5 : 5-Digits UPC-Based Extention
  • EAN8 : EAN 8
  • EAN13 : EAN 13
  • UPCA : UPC-A
  • UPCE : UPC-E
  • MSI : MSI (Variation of Plessey code)
  • MSI+ : MSI + CHECKSUM (modulo 11)
  • POSTNET : POSTNET
  • PLANET : PLANET
  • RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
  • KIX : KIX (Klant index - Customer index)
  • IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200
  • CODABAR : CODABAR
  • CODE11 : CODE 11
  • PHARMA : PHARMACODE
  • PHARMA2T : PHARMACODE TWO-TRACKS
Rückgabe
array barcode array

Definiert in Zeile 233 der Datei tcpdf_barcodes_1d.php.

Benutzt barcode_c128(), barcode_codabar(), barcode_code11(), barcode_code39(), barcode_code93(), barcode_eanext(), barcode_eanupc(), barcode_i25(), barcode_imb(), barcode_msi(), barcode_pharmacode(), barcode_pharmacode2t(), barcode_postnet(), barcode_rms4cc() und barcode_s25().

Wird benutzt von __construct().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

Dokumentation der Datenelemente

$barcode_array
protected

Array representation of barcode.

Definiert in Zeile 56 der Datei tcpdf_barcodes_1d.php.

Wird benutzt von getBarcodeArray().


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.