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

Inherits BaseJavaClass.

Public Member Functions

 __construct ()
 
 init ()
 
 addECI (String $text, int $encoding)
 
 addAuto (String $text)
 
 addBinary (String $text)
 
 addURI (String $text)
 
 addText (String $text)
 
 addNumeric (String $text)
 
 addUnicode (String $text)
 
 addCommonChineseRegionOne (String $text)
 
 addCommonChineseRegionTwo (String $text)
 
 addGB18030TwoByte (String $text)
 
 addGB18030FourByte (String $text)
 
 addGS1 (String $text)
 
 getExtendedCodetext ()
 
- Public Member Functions inherited from BaseJavaClass
 __construct ($javaClass)
 
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Private Attributes

const JAVA_CLASS_NAME = "com.aspose.mw.barcode.generation.MwHanXinExtCodetextBuilder"
 

Additional Inherited Members

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

Detailed Description

Extended codetext generator for Han Xin Code for Extended Mode of HanXinEncodeMode



//Extended codetext mode
//create codetext
$codeTextBuilder = new HanXinExtCodetextBuilder();
$codeTextBuilder->addGB18030TwoByte("漄");
$codeTextBuilder->addGB18030FourByte("㐁");
$codeTextBuilder->addCommonChineseRegionOne("全");
$codeTextBuilder->addCommonChineseRegionTwo("螅");
$codeTextBuilder->addNumeric("123");
$codeTextBuilder->addText("qwe");
$codeTextBuilder->addUnicode("ıntəˈnæʃənəl");
$codeTextBuilder->addECI("ΑΒΓΔΕ", 9);
$codeTextBuilder->addAuto("abc");
$codeTextBuilder->addBinary("abc");
$codeTextBuilder->addURI("backslashes_should_be_doubled\000555:test");
$codeTextBuilder->addGS1("(01)03453120000011(17)191125(10)ABCD1234(21)10");
$expectedStr = "漄㐁全螅123qweıntəˈnæʃənəlΑΒΓΔΕabcabcbackslashes_should_be_doubled\000555:test(01)03453120000011(17)191125(10)ABCD1234(21)10";
//generate codetext
$str = $codeTextBuilder->getExtendedCodetext();
//generate
$bg = new BarcodeGenerator(EncodeTypes::HAN_XIN, $str);
$bg->getParameters()->getBarcode()->getHanXin()->setHanXinEncodeMode(HanXinEncodeMode::EXTENDED);
$img = $bg->generateBarCodeImage(BarcodeImageFormat::PNG);
$r = new BarCodeReader($img, null, DecodeType::HAN_XIN))
$found = $r->readBarCodes();
Assert::assertEquals(1, sizeof(found));
Assert::assertEquals($expectedStr, $found[0]->getCodeText());

Constructor & Destructor Documentation

◆ __construct()

HanXinExtCodetextBuilder::__construct ( )

Member Function Documentation

◆ addAuto()

HanXinExtCodetextBuilder::addAuto ( String  $text)

Adds codetext fragment in Auto mode

Parameters
textCodetext string

◆ addBinary()

HanXinExtCodetextBuilder::addBinary ( String  $text)

Adds codetext fragment in Binary mode

Parameters
textCodetext string

◆ addCommonChineseRegionOne()

HanXinExtCodetextBuilder::addCommonChineseRegionOne ( String  $text)

Adds codetext fragment in Common Chinese Region One mode

Parameters
textCodetext string

◆ addCommonChineseRegionTwo()

HanXinExtCodetextBuilder::addCommonChineseRegionTwo ( String  $text)

Adds codetext fragment in Common Chinese Region Two mode

Parameters
textCodetext string

◆ addECI()

HanXinExtCodetextBuilder::addECI ( String  $text,
int  $encoding 
)

Adds codetext fragment in ECI mode

Parameters
textCodetext string
encodingECI encoding in integer format

◆ addGB18030FourByte()

HanXinExtCodetextBuilder::addGB18030FourByte ( String  $text)

Adds codetext fragment in GB18030 Four Byte mode

Parameters
textCodetext string

◆ addGB18030TwoByte()

HanXinExtCodetextBuilder::addGB18030TwoByte ( String  $text)

Adds codetext fragment in GB18030 Two Byte mode

Parameters
textCodetext string

◆ addGS1()

HanXinExtCodetextBuilder::addGS1 ( String  $text)

Adds codetext fragment in GS1 mode

Parameters
textCodetext string

◆ addNumeric()

HanXinExtCodetextBuilder::addNumeric ( String  $text)

Adds codetext fragment in Numeric mode

Parameters
textCodetext string

◆ addText()

HanXinExtCodetextBuilder::addText ( String  $text)

Adds codetext fragment in Text mode

Parameters
textCodetext string

◆ addUnicode()

HanXinExtCodetextBuilder::addUnicode ( String  $text)

Adds codetext fragment in Unicode mode

Parameters
textCodetext string

◆ addURI()

HanXinExtCodetextBuilder::addURI ( String  $text)

Adds codetext fragment in URI mode

Parameters
textCodetext string

◆ getExtendedCodetext()

HanXinExtCodetextBuilder::getExtendedCodetext ( )

Returns codetext from Extended mode codetext builder

Returns
Codetext in Extended mode

◆ init()

HanXinExtCodetextBuilder::init ( )

Reimplemented from BaseJavaClass.

Member Data Documentation

◆ JAVA_CLASS_NAME

const HanXinExtCodetextBuilder::JAVA_CLASS_NAME = "com.aspose.mw.barcode.generation.MwHanXinExtCodetextBuilder"
private