PHP
Download and install the ClearImage SDK.
PHP code uses ClearImage.dll through COM API. ClearImage DLL is registered as a COM object during installation. To register manually, run the following command as Administrator.
Add this section to php.iniif it has not been set yet.
Error 'Class ‘COM’ not found' indicates that the above is not configured.
ClearImage DLL API reports errors as an Exception object.
While developing your application, you can combine code examples on this page with methods described in ClearImage API documentation in the ClearImage COM API section.
This example reads code 39 and code 128 barcodes. Set barcode types used in your application. Setting reader->AutoDetect1D=true; automatically finds the barcode type, but it is slower and is not recommended for production.
This example reads PDF417, DataMatrix, and QR code.
2D barcodes might contain binary data in $Bc->Data property as an integer array. To access all elements:
This example reads Postal Barcodes from an image file page.
This example reads the Driver's License barcode from an image file page.
This example reads barcodes from a single-page file or all pages of a multi-page image file.
This example uses some of the most popular image-processing functions. In a production application, the specific sequence of functions should be selected based on specific application needs.
This example repairs all images in a multi-page file and saves the result in the fileOut file.