![]() |
Aspose.Barcode for PHP via Java
21.7
Aspose.Barcode for PHP via Java Generation and Recognition API docs
|
Inherits BaseJavaClass.
Public Member Functions | |
| __construct (?int $encodeType,?string $codeText) | |
| getParameters () | |
| getBarcodeType () | |
| setBarcodeType (int $value) | |
| generateBarCodeImage (int $format) | |
| save (string $filePath, int $format) | |
| getCodeText () | |
| setCodeText (string $value) | |
BarcodeGenerator for backend barcode images generation.
supported symbologies: 1D: Codabar, Code11, Code128, Code39Standard, Code39Extended Code93Standard, Code93Extended, EAN13, EAN8, Interleaved2of5, MSI, Standard2of5, UPCA, UPCE, ISBN, GS1Code128, Postnet, Planet EAN14, SCC14, SSCC18, ITF14, SingaporePost ... 2D: Aztec, DataMatrix, PDf417, QR code ...
This sample shows how to create and save a barcode image.
| __construct | ( | ?int | $encodeType, |
| ?string | $codeText | ||
| ) |
BarcodeGenerator constructor.
| args | can take following combinations of arguments: 1) Barcode symbology type. Use EncodeTypes class to setup a symbology 2) Text to be encoded. Should be encoded in UTF-8 encoding |
| BarcodeException |
| generateBarCodeImage | ( | int | $format | ) |
Generate the barcode image under current settings. This sample shows how to create and save a barcode image.
| format | value of BarCodeImageFormat (PNG, BMP, JPEG, GIF) Example: $generator = new BarCodeGenerator(EncodeTypes::CODE_128); $image = $generator->generateBarCodeImage(BarCodeImageFormat::PNG); |
| getBarcodeType | ( | ) |
Barcode symbology type.
| getCodeText | ( | ) |
Text to be encoded.
| getParameters | ( | ) |
Generation parameters.
| save | ( | string | $filePath, |
| int | $format | ||
| ) |
Save barcode image to specific file in specific format.
| $filePath | Path to save to. |
| format | value of BarCodeImageFormat (PNG, BMP, JPEG, GIF) Example: $generator = new BarCodeGenerator(EncodeTypes::CODE_128); $generator->save(file_path, BarCodeImageFormat::PNG); |
| setBarcodeType | ( | int | $value | ) |
Barcode symbology type.
| setCodeText | ( | string | $value | ) |
Text to be encoded.