Class for encoding and decoding the text embedded in the MaxiCode code for modes 3. This sample shows how to encode and decode MaxiCode codetext for mode 3.
$maxiCodeCodetext->setPostalCode("B1050");
$maxiCodeCodetext->setCountryCode(056);
$maxiCodeCodetext->setServiceCategory(999);
maxiCodeStandartSecondMessage->
setMessage(
"Test message");
$maxiCodeCodetext->setSecondMessage(maxiCodeStandartSecondMessage);
complexGenerator.generateBarCodeImage(BarcodeImageFormat::PNG);
$maxiCodeStructuredSecondMessage->add("634 ALPHA DRIVE");
$maxiCodeStructuredSecondMessage->add("PITTSBURGH");
$maxiCodeStructuredSecondMessage->add("PA");
$maxiCodeStructuredSecondMessage->setYear(99);
$complexGenerator->generateBarCodeImage(BarcodeImageFormat::PNG);
foreach($reader->readBarCodes() as $result)
{
{
print("BarCode Type: ".$maxiCodeStructuredCodetext->getPostalCode());
print("MaxiCode mode: ".$maxiCodeStructuredCodetext->getCountryCode());
print("BarCode CodeText: ".$maxiCodeStructuredCodetext->getServiceCategory());
{
print("Message: ".$secondMessage->getMessage());
}
}
}
foreach($reader->readBarCodes() as $result)
{
{
maxiCodeStructuredCodetext = $resultMaxiCodeCodetext;
print("BarCode Type: ".$maxiCodeStructuredCodetext->getPostalCode());
print("MaxiCode mode: ".$maxiCodeStructuredCodetext->getCountryCode());
print("BarCode CodeText: ".$maxiCodeStructuredCodetext->getServiceCategory());
{
$secondMessage = $maxiCodeStructuredCodetext->getSecondMessage();
print("Message:");
foreach($secondMessage->getIdentifiers() as $identifier)
{
print($identifier);
}
}
}
}