Native PHP Barcode Generator Script User Manual

Buy License Support Download Demo Release Log

Installing the PHP Barcode Script

The PHP Barcode Generator is a server-side script that adds barcode generation capability to any PHP-compatible website. Once installed, linear barcode images are generated on the server in memory and streamed to the client without saving any temp files on the server.

  1. After extracting the install files from the demo or purchased download, copy the necessary files to a web server where PHP script processing is enabled. Each file contains the name of the barcode symbology that it supports.
  2. Open the file in a web browser and verify that a default barcode image is displayed. If it is not, ensure that the files are installed in the proper folder on the server and verify that PHP script processing is active in the folder where the file resides.
  3. Integrate the resulting URL into your web application as a dynamic IMG tag and add the D= parameter for the data that is being encoded into a barcode. This script may be streamed in the same way as the Streaming Barcode Server for IIS, which offers several examples for integrating streaming barcodes.
  4. Refer to the Barcode Script Parameters section of this user guide to modify additional parameters such as apply tilde, font size, and more. For example, the following parameters can be utilized to encode the text of "123456", disable the optional check digit in Code 39, and set the bar height to 30 pixels:

    https://support.idautomation.com/php-barcode/idautomation-code39.php?D=123456&CC=F&BH=30

PHP Barcode Script Parameters

Default values should be used for all properties unless specific requirements dictate otherwise.

Purpose Parameter Default Description
Apply Tilde PT F When True in Code 128 with the Auto character set, the format ~??? may be used to specify the ASCII code of the character to be encoded, and several other ApplyTilde Options are enabled including encoding of GS1-128 AIs.

*Valid in idautomation-code128.php only
Bar Height BH 40 The pixel height of the barcode.
Check Character CC T* Automatically adds the check digit to the barcode when equal to 'T'.

*F is the default in Code 39;  LOGMARS requires this parameter to be true.
Check Character in Text CT T Automatically adds the check digit that is encoded in the barcode to the human-readable text that is displayed when equal to 'T'.
Data Encoded D 123456789012 The data that is to be encoded in the barcode.
Narrow to Wide Ratio N 2 The narrow-to-wide ratio of symbologies that contain only narrow and wide bars such as Code 39, Interleaved 2 of 5, and MSI. Valid values are 2 and 3.
Orientation O 0 The orientation of the barcode. Valid values are 0, 90, 180, and 270.
ShowText ST T If set to F, the human-readable text interpretation will not be displayed with the barcode.
XDimension in pixels X 1 The number of pixels to determine the overall barcode width. Default = 1 which is 1/96 of an inch and about 12 MILS.
Font Size FS 12 The font size used for human-readable text.

*Only values of 10 and 12 are applicable. Other values must be implemented manually by displaying a text field below the barcode.
Data Matrix Specific Parameter Default Property Description
Process Tilde PT T When set to "F", the tilde "~" functionality will not be processed. As explained in the Data Matrix FAQ, the tilde is used for GS1-DataMatrix and encoding ASCII codes.
Encoding Mode MODE The Encoding Mode for data being encoded. Valid parameters are 0=BASE256, 1=C40, 2=TEXT and 3=ASCII. To encode GS1-DataMatrix, ensure MODE is set to "3", the default.
Preferred Format PFMT 0 Sets the preferred format represented by a number; valid values are from 1 (10X10) to 24 (144X144) and from 25 (8X18) to 30 (16X48); the default value of '0' is used for automatic formatting. If the component needs more space to create the symbol, this property will be ignored.
QR-Code Specific Parameter Default Description
Process Tilde PT T When set to "F", the tilde "~" functionality will not be processed. As explained in the QR-Code FAQ, the tilde is used for GS1-QRCode and encoding ASCII codes.
Error Correction Level ECL M The level of error correction. Valid values are L, M, Q & H.
Encoding Mode MODE B The Encoding Mode. Valid values are B (binary), A (alphanumeric), and N (numeric).
Process Mask PM T When set to F the mask is not optimized, which will improve processing time when generating many barcodes at the same time.
Version V 1 The version of the symbol. Setting this value to -3 can generate a Micro QR Code symbol.

Only commonly used parameters are included in the script generator files, ensuring quick and efficient PHP barcode generation. If additional properties or symbologies are needed, such as USPS IMb, DataBar, or PDF417, the functionality of this PHP product is also available as a service hosted on IDAutomation's fault-tolerant servers. The service is an easy way to generate barcodes without installing any software.

Technical Support Issues

Free product support may be obtained by reviewing the knowledgebase articles documented below and by searching the resolved public forum threads. Priority phone, email, and forum support is also provided via several contact methods within 30 days of purchase. Support after this complimentary period may be received with an active one-year Priority Support & Upgrade Subscription.

Popular Forum Post Resolutions: