![]() |
Aspose.Barcode for PHP via Java
22.4
Aspose.Barcode for PHP via Java Generation and Recognition API docs
|
Inherits BaseJavaClass.
Public Member Functions | |
| __construct (?string $image, $rectangles, $decodeTypes) | |
| containsAny (... $decodeTypes) | |
| getTimeout () | |
| setTimeout (int $value) | |
| getChecksumValidation () | |
| setChecksumValidation (int $value) | |
| getStripFNC () | |
| setStripFNC (bool $value) | |
| getCustomerInformationInterpretingType () | |
| setCustomerInformationInterpretingType (int $value) | |
| abort () | |
| getFoundBarCodes () | |
| getFoundCount () | |
| getDetectEncoding () | |
| setDetectEncoding (bool $value) | |
| setBarCodeImage (string $resource, ?Rectangle ... $areas) | |
| setBarCodeReadType (int ... $types) | |
| getBarCodeDecodeType () | |
| exportToXml (string $xmlFile) | |
| getJavaClass () | |
| getJavaClassName () | |
| isNull () | |
| printJavaClassName () | |
Static Public Member Functions | |
| static | construct ($javaClass) |
| static | importFromXml ($resource) |
Protected Member Functions | |
| init () | |
| setJavaClass ($javaClass) | |
BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes.
This sample shows how to detect Code39 and Code128 barcodes.
| BarCodeReader::__construct | ( | ?string | $image, |
| $rectangles, | |||
| $decodeTypes | |||
| ) |
BarCodeReader constructor. Initializes a new instance of the BarCodeReader
| string | $resource | image encoded as base64 string or path to image resource located in the file system or via http |
| int | array | null | $rectangles | array of object by type Rectangle |
| int | array | null | $decodeTypes | array of decode types |
| BarcodeException |
| BarCodeReader::abort | ( | ) |
|
static |
| BarCodeReader::containsAny | ( | $decodeTypes | ) |
Determines whether any of the given decode types is included into
| $decodeTypes | Types to verify. |
| BarCodeReader::exportToXml | ( | string | $xmlFile | ) |
Exports BarCode properties to the xml-file specified
| string | $xmlFile | The path to xml file |
| BarCodeReader::getBarCodeDecodeType | ( | ) |
| BarCodeReader::getChecksumValidation | ( | ) |
Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies This sample shows influence of ChecksumValidation on recognition quality and results
The checksum validation flag.
| BarCodeReader::getCustomerInformationInterpretingType | ( | ) |
Gets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType::OTHER.
| BarCodeReader::getDetectEncoding | ( | ) |
Reads BarCodeResult from the image.
| BarCodeReader::getFoundBarCodes | ( | ) |
Gets recognized BarCodeResult array
This sample shows how to read barcodes with BarCodeReader
Value: The recognized BarCodeResult array
| BarCodeReader::getFoundCount | ( | ) |
Gets recognized barcodes count
This sample shows how to read barcodes with BarCodeReader
Value: The recognized barcodes count
|
inherited |
|
inherited |
| BarCodeReader::getStripFNC | ( | ) |
Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
This sample shows how to strip FNC characters
| BarCodeReader::getTimeout | ( | ) |
Gets the timeout of recognition process in milliseconds.
|
static |
Import BarCode properties from xml file
| string | $resource | The name of the xml file or path to http resource |
| BarcodeException |
|
protected |
Reimplemented from BaseJavaClass.
|
inherited |
|
inherited |
|
final |
Sets bitmap image and areas for recognition. Must be called before ReadBarCodes() method.
This sample shows how to detect Code39 and Code128 barcodes.
| string | $resource | image encoded as base64 string or path to image resource located in the file system or via http |
| Rectangle | null | $areas | areas list for recognition |
| BarcodeException |
| BarCodeReader::setBarCodeReadType | ( | int ... | $types | ) |
Sets SingleDecodeType type array for recognition. Must be called before readBarCodes() method.
This sample shows how to detect Code39 and Code128 barcodes.
| array | $types | The SingleDecodeType type array to read. |
| BarCodeReader::setChecksumValidation | ( | int | $value | ) |
Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies
This sample shows influence of ChecksumValidation on recognition quality and results
The checksum validation flag.
| BarCodeReader::setCustomerInformationInterpretingType | ( | int | $value | ) |
Sets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType::OTHER.
| BarCodeReader::setDetectEncoding | ( | bool | $value | ) |
A flag which force engine to detect codetext encoding for Unicode codesets.
This sample shows how to detect text encoding on the fly if DetectEncoding is enabled
|
protectedinherited |
| BarCodeReader::setStripFNC | ( | bool | $value | ) |
Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
This sample shows how to strip FNC characters
| BarCodeReader::setTimeout | ( | int | $value | ) |
Sets the timeout of recognition process in milliseconds.
| value | The timeout. |