/* $pdf=new PDF(); $pdf->SetAutoPageBreak(0); $pdf->AddPage(); $pdf->SetFont('Helvetica','',10); $pdf->Text (0, 1, 'Posicionamiento'); $pdf->Text (0, 296, 'P'); $pdf->Text (209, 1, 'B'); $pdf->Text (209, 295, 'F'); $xe=200; $ye=400; $anchoe=200; $altoe=100; $x=(209.90 * $xe)/595.28; $y=(296.69 - ((296.69 * $ye) / 841.89)); $ancho= (209.90 * $anchoe)/595.28; $alto = ((296.69 * $altoe) / 841.89); $pdf->Text (10, 25, 'Rectangulo y=' . $y); $pdf->Text (10, 40, 'Rectangulo x=' . $x . " y=" . $y . " ancho=" . $ancho . " alto=" . $alto); $pdf->SetFillColor(192,192,192); // $pdf->rect ($x, $y-$alto, $ancho, $alto, 'F'); // $pdf->SetFillColor(255,255,255); // $pdf->rect (10.57, 50, 0, 40.87 , 'F'); // $pdf->SetFillColor(0,0,0); // $pdf->rect (10.57, 50, 1.41, 35.24, 'F'); // $pdf->SetFillColor(255,255,255); // $pdf->rect (11.988643999462,50.003378232311,0.70521435290956,40.879497321503, 'F'); // $pdf->SetFillColor(0,0,0); // $pdf->rect (12.693858352372,50.003378232311,0.70521435290956,35.240945966813, 'F'); $barcode_options = array ( 'scale' => 1, 'fontscale' => 0, 'font' => 'Helvetica', 'size' => '10', 'rotation' => 0 ); $barcode = new PDFBarcode($pdf, $barcode_options); $fp=popen($base . "\\basico\\genbarcode MOF/068679-01/220805/A61100-/00014438/-- 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 = 0; } $pdf->Text (20, 100, 'Prueba de texto'); $x=20; $y=100; $x1=(595.28*$x)/209.90; $y1=841.89 - ((841.89*$y)/296.69); $barcode->generate($text, $bars, $x1, $y1, $fontscale, 1); $fp=popen($base . "\\basico\\genbarcode 1234567890123456ABCD234 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 = 0; } $barcode->generate($text, $bars, '0', '0', $fontscale, 1); $pdf->Output(); */