zEan128 == "") { throw new Exception ("Code EAN 128 vide") ; } return true ; } /** * Génération du code barre pour l'EAN 128 * */ public function printEAN128BarCode ($_iWidth = 300, $_iHeight = 40) { if ($this->zEan128 != "") { $oCode = new CBCEan128 ($_iWidth, $_iHeight) ; $oCode->parseHumanReadableString ($this->zEan128) ; $oCode->showBarcodeImage () ; } else { throw new Exception ("Code EAN 128 vide") ; } } /** * Vérification du code pour l'EAN 13 de l'opération * */ public function checkEAN13Code () { if ($this->zEan13 != "") { $oCode = new pi_barcode () ; $oCode->setType ("EAN") ; $oCode->setCode ($this->zEan13) ; $oCode->checkCode () ; if ($oCode->TYPE == "ERR") { throw new Exception ($oCode->FULLCODE) ; } } else { throw new Exception ("Code EAN 128 vide") ; } } /** * Génération du code barre pour l'EAN 13 de l'opération * */ public function printEAN13BarCode ($_iWidth = 125, $_iHeight = 40) { if ($this->zEan13 != "") { $oCode = new pi_barcode () ; $oCode->setType ("EAN") ; $oCode->setSize ($_iHeight, $_iWidth) ; $oCode->setCode ($this->zEan13) ; $oCode->checkCode () ; if ($oCode->TYPE == "ERR") { throw new Exception ($oCode->FULLCODE) ; } $oCode->showBarcodeImage () ; } else { throw new Exception ("Code EAN 128 vide") ; } } } ?>