function EAN_13($code, $distinate) { //一个单元的宽度 $lw = 2; //条码高 $hi = 100; // the guide code is no coding,is used to show the left part coding type// // Array guide is used to record the EAN_13 is left part coding type// $Guide = array(1=>’AAAAAA’,’AABABB’,’AABBAB’,’ABAABB’,’ABBAAB’,’ABBBAA’,’ABABAB’,’ABABBA’,’ABBABA’); $Lstart =’101′; $Lencode = array(“A” => array(’0001101′,’0011001′,’0010011′,’0111101′,’0100011′,’0110001′,’0101111′,’0111011′,’0110111′,’0001011′), “B” => array(’0100111′,’0110011′,’0011011′,’0100001′,’0011101′,’0111001′,’0000101′,’0010001′,’0001001′,’0010111′)); $Rencode [...]
Category Archives: php生成条形码
php生成条形码的类
class cd_barra { var $file; var $into; var $cd_barras = array(0=>”00110″,1=>”10001″,2=>”01001″,3=>”11000″,4=>”00101″, 5=>”10100″,6=>”01100″,7=>”00011″,8=>”10010″,9=>”01010″ ); function cd_barra($value,$into=1) { $lower = 1 ; $hight = 50; $this->into = $into; for($count1=9;$count1>=0;$count1–){ for($count2=9;$count2>=0;$count2–){ $count = ($count1 * 10) + $count2 ; $text = “” ; for($i=1;$i<6;$i++){ $text .= substr($this->cd_barras[$count1],($i-1),1) . substr($this->cd_barras[$count2],($i-1),1); } $this->cd_barras[$count] = $text; } }
php生成EAN 13 条形码
function EAN_13($code) { //一个单元的宽度 $lw = 2; //条码高 $hi = 100; // the guide code is no coding,is used to show the left part coding type// // Array guide is used to record the EAN_13 is left part coding type// $Guide = array(1=>’AAAAAA’,’AABABB’,’AABBAB’,’ABAABB’,’ABBAAB’,’ABBBAA’,’ABABAB’,’ABABBA’,’ABBABA’); $Lstart =’101′; $Lencode = array(“A” => array(’0001101′,’0011001′,’0010011′,’0111101′,’0100011′,’0110001′,’0101111′,’0111011′,’0110111′,’0001011′), “B” => array(’0100111′,’0110011′,’0011011′,’0100001′,’0011101′,’0111001′,’0000101′,’0010001′,’0001001′,’0010111′)); $Rencode = [...]