Aspose.Barcode for PHP via Java Generation and Recognition API docs

Inherits BaseJavaClass.

Public Member Functions

 getPatchCode ()
 
 getXDimension ()
 
 setXDimension (Unit $value)
 
 getBarWidthReduction ()
 
 setBarWidthReduction (Unit $value)
 
 getBarHeight ()
 
 setBarHeight (Unit $value)
 
 getBarColor ()
 
 setBarColor (string $value)
 
 getPadding ()
 
 setPadding (Padding $value)
 
 getChecksumAlwaysShow ()
 
 setChecksumAlwaysShow (int $value)
 
 isChecksumEnabled ()
 
 setChecksumEnabled (int $value)
 
 getEnableEscape ()
 
 setEnableEscape (bool $value)
 
 getWideNarrowRatio ()
 
 setWideNarrowRatio (float $value)
 
 getCodeTextParameters ()
 
 getFilledBars ()
 
 setFilledBars (bool $value)
 
 getPostal ()
 
 getAustralianPost ()
 
 getDataBar ()
 
 getGS1CompositeBar ()
 
 setGS1CompositeBar (GS1CompositeBarParameters $value)
 
 getCodablock ()
 
 getDataMatrix ()
 
 getCode16K ()
 
 getDotCode ()
 
 getITF ()
 
 getPdf417 ()
 
 getQR ()
 
 getSupplement ()
 
 getMaxiCode ()
 
 getAztec ()
 
 getCode128 ()
 
 getCodabar ()
 
 getCoupon ()
 
 getHanXin ()
 
- Public Member Functions inherited from BaseJavaClass
 __construct ($javaClass)
 
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Protected Member Functions

 init ()
 
- Protected Member Functions inherited from BaseJavaClass
 setJavaClass ($javaClass)
 

Private Member Functions

 setPatchCode (PatchCodeParameters $value)
 

Private Attributes

 $xDimension
 
 $barHeight
 
 $codeTextParameters
 
 $postal
 
 $australianPost
 
 $codablock
 
 $dataBar
 
 $gs1CompositeBar
 
 $dataMatrix
 
 $code16K
 
 $itf
 
 $qr
 
 $pdf417
 
 $maxiCode
 
 $aztec
 
 $code128
 
 $codabar
 
 $coupon
 
 $hanXin
 
 $supplement
 
 $dotCode
 
 $padding
 
 $patchCode
 
 $barWidthReduction
 

Detailed Description

Barcode generation parameters.

Member Function Documentation

◆ getAustralianPost()

BarcodeParameters::getAustralianPost ( )

AustralianPost barcode parameters.

◆ getAztec()

BarcodeParameters::getAztec ( )

Aztec parameters.

◆ getBarColor()

BarcodeParameters::getBarColor ( )

Bars color. Default value: #000000

◆ getBarHeight()

BarcodeParameters::getBarHeight ( )

Height of 1D barcodes' bars in Unit value. Ignored if AutoSizeMode property is set to AutoSizeMode::NEAREST or AutoSizeMode::INTERPOLATION.

Exceptions
BarcodeException

◆ getBarWidthReduction()

BarcodeParameters::getBarWidthReduction ( )

Get bars reduction value that is used to compensate ink spread while printing.

Returns
Unit value of BarWidthReduction

◆ getChecksumAlwaysShow()

BarcodeParameters::getChecksumAlwaysShow ( )

Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.

◆ getCodabar()

BarcodeParameters::getCodabar ( )

Codabar parameters.

◆ getCodablock()

BarcodeParameters::getCodablock ( )

Codablock parameters.

◆ getCode128()

BarcodeParameters::getCode128 ( )

Code128 parameters.

◆ getCode16K()

BarcodeParameters::getCode16K ( )

Code16K parameters.

◆ getCodeTextParameters()

BarcodeParameters::getCodeTextParameters ( )

Codetext parameters.

◆ getCoupon()

BarcodeParameters::getCoupon ( )

Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.

◆ getDataBar()

BarcodeParameters::getDataBar ( )

Databar parameters.

◆ getDataMatrix()

BarcodeParameters::getDataMatrix ( )

DataMatrix parameters.

◆ getDotCode()

BarcodeParameters::getDotCode ( )

DotCode parameters.

◆ getEnableEscape()

BarcodeParameters::getEnableEscape ( )

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.

◆ getFilledBars()

BarcodeParameters::getFilledBars ( )

Only for 1D barcodes.

Returns
bool Gets a value indicating whether bars filled.
Exceptions
BarcodeException

◆ getGS1CompositeBar()

BarcodeParameters::getGS1CompositeBar ( )

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);

Returns
GS1CompositeBarParameters GS1 Composite Bar parameters.

◆ getHanXin()

BarcodeParameters::getHanXin ( )

HanXin parameters.

◆ getITF()

BarcodeParameters::getITF ( )

ITF parameters.

◆ getMaxiCode()

BarcodeParameters::getMaxiCode ( )

MaxiCode parameters.

◆ getPadding()

BarcodeParameters::getPadding ( )

Barcode paddings. Default value: 5pt 5pt 5pt 5pt.

◆ getPatchCode()

BarcodeParameters::getPatchCode ( )

PatchCode parameters.

◆ getPdf417()

BarcodeParameters::getPdf417 ( )

PDF417 parameters.

◆ getPostal()

BarcodeParameters::getPostal ( )

Postal parameters. Used for Postnet, Planet.

◆ getQR()

BarcodeParameters::getQR ( )

QR parameters.

◆ getSupplement()

BarcodeParameters::getSupplement ( )

Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN.

◆ getWideNarrowRatio()

BarcodeParameters::getWideNarrowRatio ( )

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

Exceptions
IllegalArgumentExceptionThe WideNarrowRatio parameter value is less than or equal to 0.

◆ getXDimension()

BarcodeParameters::getXDimension ( )

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.

◆ init()

BarcodeParameters::init ( )
protected

Reimplemented from BaseJavaClass.

◆ isChecksumEnabled()

BarcodeParameters::isChecksumEnabled ( )

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

◆ setBarColor()

BarcodeParameters::setBarColor ( string  $value)

Bars color. Default value: #000000.

◆ setBarHeight()

BarcodeParameters::setBarHeight ( Unit  $value)

Height of 1D barcodes' bars in Unit value. Ignored if AutoSizeMode property is set to utoSizeMode::NEAREST or AutoSizeMode::INTERPOLATION.

Exceptions
BarcodeException

◆ setBarWidthReduction()

BarcodeParameters::setBarWidthReduction ( Unit  $value)

Sets bars reduction value that is used to compensate ink spread while printing.

◆ setChecksumAlwaysShow()

BarcodeParameters::setChecksumAlwaysShow ( int  $value)

Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.

◆ setChecksumEnabled()

BarcodeParameters::setChecksumEnabled ( 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

◆ setEnableEscape()

BarcodeParameters::setEnableEscape ( bool  $value)

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.

◆ setFilledBars()

BarcodeParameters::setFilledBars ( bool  $value)

Sets a value indicating whether bars filled. Only for 1D barcodes.

Parameters
bool$valueSets a value indicating whether bars filled.
Exceptions
BarcodeException

◆ setGS1CompositeBar()

BarcodeParameters::setGS1CompositeBar ( GS1CompositeBarParameters  $value)

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);

◆ setPadding()

BarcodeParameters::setPadding ( Padding  $value)

Barcode paddings. Default value: 5pt 5pt 5pt 5pt.

◆ setPatchCode()

BarcodeParameters::setPatchCode ( PatchCodeParameters  $value)
private

PatchCode parameters.

◆ setWideNarrowRatio()

BarcodeParameters::setWideNarrowRatio ( float  $value)

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

Exceptions
IllegalArgumentException
Parameters
float$valueThe WideNarrowRatio parameter value is less than or equal to 0.

◆ setXDimension()

BarcodeParameters::setXDimension ( Unit  $value)

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.

Exceptions
BarcodeException

Member Data Documentation

◆ $australianPost

BarcodeParameters::$australianPost
private

◆ $aztec

BarcodeParameters::$aztec
private

◆ $barHeight

BarcodeParameters::$barHeight
private

◆ $barWidthReduction

BarcodeParameters::$barWidthReduction
private

◆ $codabar

BarcodeParameters::$codabar
private

◆ $codablock

BarcodeParameters::$codablock
private

◆ $code128

BarcodeParameters::$code128
private

◆ $code16K

BarcodeParameters::$code16K
private

◆ $codeTextParameters

BarcodeParameters::$codeTextParameters
private

◆ $coupon

BarcodeParameters::$coupon
private

◆ $dataBar

BarcodeParameters::$dataBar
private

◆ $dataMatrix

BarcodeParameters::$dataMatrix
private

◆ $dotCode

BarcodeParameters::$dotCode
private

◆ $gs1CompositeBar

BarcodeParameters::$gs1CompositeBar
private

◆ $hanXin

BarcodeParameters::$hanXin
private

◆ $itf

BarcodeParameters::$itf
private

◆ $maxiCode

BarcodeParameters::$maxiCode
private

◆ $padding

BarcodeParameters::$padding
private

◆ $patchCode

BarcodeParameters::$patchCode
private

◆ $pdf417

BarcodeParameters::$pdf417
private

◆ $postal

BarcodeParameters::$postal
private

◆ $qr

BarcodeParameters::$qr
private

◆ $supplement

BarcodeParameters::$supplement
private

◆ $xDimension

BarcodeParameters::$xDimension
private