1, 'fontscale' => 0, 'font' => $_LIB_DIR.'/ezpdf/arial.afm', 'rotation' => 0 ); $barcode = new PDFBarcode($pdf, $barcode_options); $tmp = docnumber($invoice['number'], $invoice['template'], $invoice['cdate']); $fp=popen("/usr/local/bin/genbarcode $tmp 128", "r"); $bars=rtrim(fgets($fp, 1024)); $text=rtrim(fgets($fp, 1024)); $encoding=rtrim(fgets($fp, 1024)); pclose($fp); if (ereg('^(EAN|ISBN|code 39)', $encoding)) { $fontscale = 4; } else { $fontscale = 7; } $id = $barcode->generate($text, $bars, $x, $y, $fontscale); $pdf->addObject($id); $id = $barcode->generate($text, $bars, $x, $z, $fontscale); $pdf->addObject($id); } } $top=800; invoice_dates(500,800); invoice_address_box(360,700); $top=invoice_title(30,$top); $top=$top-10; $top=invoice_seller(30,$top); $top=$top-10; $top=invoice_buyer(30,$top); $top=$top-10; $return=invoice_data(30,$top,430,6,1); invoice_footnote(470,$top,90,8); //invoice_expositor(30,$return[1]-20); $top=$return[2]-10; //myinvoice_to_pay(30,$top); invoice_main_form_fill(187,3,0.4); invoice_simple_form_fill(14,3,0.4); myinvoice_barcode(230,100,340); ?>