BarcodeParameters
BarcodeParameters class
Namespace: Aspose.Barcode.Generation
Barcode generation parameters.
Constructors
| Name | Description |
|---|---|
| __construct |
Methods
| Name | Static | Description |
|---|---|---|
| isChecksumEnabled | No | Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology |
| setChecksumEnabled | No | Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology |
Properties
| Name | Read/Write | Description |
|---|---|---|
| AustralianPost | Read-only | AustralianPost barcode parameters. |
| Aztec | Read-only | Aztec parameters. |
| BarColor | Read/Write | Bars color. Default value: #000000 |
| BarHeight | Read/Write | Height of 1D barcodes’ bars in Unit value. Ignored if AutoSizeMode property is set to AutoSizeMode::NEAREST or AutoSizeMode::INTERPOLATION. |
| BarWidthReduction | Read/Write | Get bars reduction value that is used to compensate ink spread while printing. |
| ChecksumAlwaysShow | Read/Write | Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. |
| Codabar | Read-only | Codabar parameters. |
| Codablock | Read-only | Codablock parameters. |
| Code128 | Read-only | Code128 parameters. |
| Code16K | Read-only | Code16K parameters. |
| CodeTextParameters | Read-only | Codetext parameters. |
| Coupon | Read-only | Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon. |
| DataBar | Read-only | Databar parameters. |
| DataMatrix | Read-only | DataMatrix parameters. |
| DotCode | Read-only | DotCode parameters. |
| EnableEscape | Read/Write | Indicates whether explains the character “" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, “" will be explained as a special escape character. Otherwise, “" acts as normal characters. Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \CR stands for CR. |
| FilledBars | Read/Write | Only for 1D barcodes. |
| GS1CompositeBar | Read/Write | GS1 Composite Bar parameters. This sample shows how to create and save a GS1 Composite Bar image. Note that 1D codetext and 2D codetext are separated by symbol ‘/’ $codetext = “(01)03212345678906/(21)A1B2C3D4E5F6G7H8”; $generator = new BarcodeGenerator(EncodeTypes::GS_1_COMPOSITE_BAR, $codetext); $generator->getParameters()->getBarcode()->getGS1CompositeBar()->setLinearComponentType(EncodeTypes::GS_1_CODE_128); $generator->getParameters()->getBarcode()->getGS1CompositeBar()->setTwoDComponentType(TwoDComponentType::CC_A); // Aspect ratio of 2D component $generator->getParameters()->getBarcode()->getPdf417()->setAspectRatio(3); // X-Dimension of 1D and 2D components $generator->getParameters()->getBarcode()->getXDimension()->setPixels(3); /// // Height of 1D component $generator->getParameters()->getBarcode()->getBarHeight()->setPixels(100); /// $generator->save(“test.png”, BarcodeImageFormat::PNG); |
| HanXin | Read-only | HanXin parameters. |
| ITF | Read-only | ITF parameters. |
| MaxiCode | Read-only | MaxiCode parameters. |
| Padding | Read/Write | Barcode paddings. Default value: 5pt 5pt 5pt 5pt. |
| PatchCode | Read-only | PatchCode parameters. |
| Pdf417 | Read-only | PDF417 parameters. |
| Postal | Read-only | Postal parameters. Used for Postnet, Planet. |
| QR | Read-only | QR parameters. |
| Supplement | Read-only | Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN. |
| WideNarrowRatio | Read/Write | Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard |
| XDimension | Read/Write | x-dimension is the smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode::NEAREST or AutoSizeMode::INTERPOLATION. |
BarcodeParameters__construct(BarcodeParametersDTO $barcodeParametersDto)
| Parameter | Type | Description |
|---|---|---|
$barcodeParametersDto | BarcodeParametersDTO |
isChecksumEnabledisChecksumEnabled()
Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology
setChecksumEnabledsetChecksumEnabled(int $value)
Enable checksum during generation 1D barcodes. Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology
| Parameter | Type | Description |
|---|---|---|
$value | int |
AustralianPost
Access: Read-only
AustralianPost barcode parameters.
Aztec
Access: Read-only
Aztec parameters.
BarColor
Access: Read/Write
Bars color. Default value: #000000
Bars color. Default value: #000000.
| Parameter | Type | Description |
|---|---|---|
$value | string |
BarHeight
Access: Read/Write
Height of 1D barcodes’ bars in Unit value. Ignored if AutoSizeMode property is set to AutoSizeMode::NEAREST or AutoSizeMode::INTERPOLATION.
Height of 1D barcodes’ bars in Unit value. Ignored if AutoSizeMode property is set to utoSizeMode::NEAREST or AutoSizeMode::INTERPOLATION.
| Parameter | Type | Description |
|---|---|---|
$value | Unit |
BarWidthReduction
Access: Read/Write
Returns: Unit value of BarWidthReduction
Get bars reduction value that is used to compensate ink spread while printing.
Sets bars reduction value that is used to compensate ink spread while printing.
| Parameter | Type | Description |
|---|---|---|
$value | ?Unit |
ChecksumAlwaysShow
Access: Read/Write
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
| Parameter | Type | Description |
|---|---|---|
$checksumAlwaysShow | bool |
Codabar
Access: Read-only
Codabar parameters.
Codablock
Access: Read-only
Codablock parameters.
Code128
Access: Read-only
Code128 parameters.
Code16K
Access: Read-only
Code16K parameters.
CodeTextParameters
Access: Read-only
Codetext parameters.
Coupon
Access: Read-only
Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.
DataBar
Access: Read-only
Databar parameters.
DataMatrix
Access: Read-only
DataMatrix parameters.
DotCode
Access: Read-only
DotCode parameters.
EnableEscape
Access: Read/Write
Indicates whether explains the character “" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, “" will be explained as a special escape character. Otherwise, “" acts as normal characters. Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \CR stands for CR.
Indicates whether explains the character “" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, “" will be explained as a special escape character. Otherwise, “" acts as normal characters. Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \CR stands for CR.
| Parameter | Type | Description |
|---|---|---|
$value | bool |
FilledBars
Access: Read/Write
Returns: bool Gets a value indicating whether bars filled.
Only for 1D barcodes.
Sets a value indicating whether bars filled. Only for 1D barcodes.
| Parameter | Type | Description |
|---|---|---|
$value | bool |
GS1CompositeBar
Access: Read/Write
Returns: GS1CompositeBarParameters GS1 Composite Bar parameters.
GS1 Composite Bar parameters. This sample shows how to create and save a GS1 Composite Bar image. Note that 1D codetext and 2D codetext are separated by symbol ‘/’ $codetext = “(01)03212345678906/(21)A1B2C3D4E5F6G7H8”; $generator = new BarcodeGenerator(EncodeTypes::GS_1_COMPOSITE_BAR, $codetext); $generator->getParameters()->getBarcode()->getGS1CompositeBar()->setLinearComponentType(EncodeTypes::GS_1_CODE_128); $generator->getParameters()->getBarcode()->getGS1CompositeBar()->setTwoDComponentType(TwoDComponentType::CC_A); // Aspect ratio of 2D component $generator->getParameters()->getBarcode()->getPdf417()->setAspectRatio(3); // X-Dimension of 1D and 2D components $generator->getParameters()->getBarcode()->getXDimension()->setPixels(3); /// // Height of 1D component $generator->getParameters()->getBarcode()->getBarHeight()->setPixels(100); /// $generator->save(“test.png”, BarcodeImageFormat::PNG);
GS1 Composite Bar parameters. This sample shows how to create and save a GS1 Composite Bar image. Note that 1D codetext and 2D codetext are separated by symbol ‘/’ $codetext = “(01)03212345678906/(21)A1B2C3D4E5F6G7H8”; $generator = new BarcodeGenerator(EncodeTypes::GS_1_COMPOSITE_BAR, $codetext); $generator->getParameters()->getBarcode()->getGS1CompositeBar()->setLinearComponentType(EncodeTypes::GS_1_CODE_128); $generator->getParameters()->getBarcode()->getGS1CompositeBar()->setTwoDComponentType(TwoDComponentType::CC_A); // Aspect ratio of 2D component $generator->getParameters()->getBarcode()->getPdf417()->setAspectRatio(3); // X-Dimension of 1D and 2D components $generator->getParameters()->getBarcode()->getXDimension()->setPixels(3); /// // Height of 1D component $generator->getParameters()->getBarcode()->getBarHeight()->setPixels(100); /// $generator->save(“test.png”, BarcodeImageFormat::PNG);
| Parameter | Type | Description |
|---|---|---|
$value | GS1CompositeBarParameters |
HanXin
Access: Read-only
HanXin parameters.
ITF
Access: Read-only
ITF parameters.
MaxiCode
Access: Read-only
MaxiCode parameters.
Padding
Access: Read/Write
Barcode paddings. Default value: 5pt 5pt 5pt 5pt.
Barcode paddings. Default value: 5pt 5pt 5pt 5pt.
| Parameter | Type | Description |
|---|---|---|
$value | Padding |
PatchCode
Access: Read-only
PatchCode parameters.
Pdf417
Access: Read-only
PDF417 parameters.
Postal
Access: Read-only
Postal parameters. Used for Postnet, Planet.
QR
Access: Read-only
QR parameters.
Supplement
Access: Read-only
Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN.
WideNarrowRatio
Access: Read/Write
Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard
Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard
| Parameter | Type | Description |
|---|---|---|
$value | float |
XDimension
Access: Read/Write
x-dimension is the smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode::NEAREST or AutoSizeMode::INTERPOLATION.
x-dimension is the smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode::NEAREST or AutoSizeMode::INTERPOLATION.
| Parameter | Type | Description |
|---|---|---|
$value | Unit |