$angle = 0; // rotation in degrees $code = $_POST['code']; $type = 'code128'; $black = '000000'; // color in hexa // -------------------------------------------------- // // ALLOCATE FPDF RESSOURCE // -------------------------------------------------- // //$pdf = new eFPDF('P', 'pt'); $pdf = new eFPDF('P', 'mm', array(101.6, 33)); $pdf->AddPage(); // -------------------------------------------------- // // Rectangulo // -------------------------------------------------- // $pdf->Rect(1, 1, 100, 30, 'D'); // -------------------------------------------------- // // BARCODE // -------------------------------------------------- // $data = Barcode::fpdf($pdf, $black, $x, $y, $angle, $type, array('code' => $code), $width, $height); // -------------------------------------------------- // // HRI // -------------------------------------------------- // $pdf->SetFont('Courier', 'B', $fontSize); $pdf->SetTextColor(0, 0, 0); $len = $pdf->GetStringWidth($data['hri']); Barcode::rotate(-$len / 2, $data['height'] / 2 + $fontSize + $marge, $angle, $xt, $yt); $pdf->TextWithRotation($x + $xt, $y + $yt, $data['hri'], $angle); // -------------------------------------------------- // // LOGO // -------------------------------------------------- //
$type = 'ean13'; $black = '000000'; // color in hexa //$desc = $_POST['desc']; //$id = $_POST['cod_inv']; //$unid = $_POST['cant']; // -------------------------------------------------- // // ALLOCATE FPDF RESSOURCE // -------------------------------------------------- // //$pdf = new eFPDF('P', 'pt'); $pdf = new eFPDF('P', 'mm', array(101.6, 40)); $pdf->AddPage(); // -------------------------------------------------- // // Rectangulo // -------------------------------------------------- // $pdf->Rect(2, 2, 97, 35, 'D'); // -------------------------------------------------- // // BARCODE // -------------------------------------------------- // $data = Barcode::fpdf($pdf, $black, $x, $y, $angle, $type, array('code' => $code), $width, $height); // -------------------------------------------------- // // HRI // -------------------------------------------------- // $pdf->SetFont('Arial', 'B', $fontSize); $pdf->SetTextColor(0, 0, 0); $len = $pdf->GetStringWidth($data['hri']); Barcode::rotate(-$len / 2, $data['height'] / 2 + $fontSize + $marge, $angle, $xt, $yt); $pdf->TextWithRotation($x + $xt, $y + $yt, $data['hri'], $angle); // Nombre de la empresa $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(0, -5, 'SUMECA', '', '', 'L');
// -------------------------------------------------- // // PROPIEDADES8 // -------------------------------------------------- // //$marge8 = -5; // between barcode and hri in pixel //$x8 = 75; // barcode center //$y8 = 45; // barcode center //$code8 = '1000000253542'; // -------------------------------------------------- // // ALLOCATE FPDF RESSOURCE // -------------------------------------------------- // $pdf = new eFPDF('P', 'mm', array(101.6, 65)); $pdf->AddPage(); // -------------------------------------------------- // // Rectangulo // -------------------------------------------------- // $pdf->Rect(1, 4, 50, 12, 'D'); //x,y,ancho,alto $pdf->Rect(51, 4, 50, 12, 'D'); $pdf->Rect(1, 16, 50, 12, 'D'); $pdf->Rect(51, 16, 50, 12, 'D'); $pdf->Rect(1, 28, 50, 12, 'D'); $pdf->Rect(51, 28, 50, 12, 'D'); $pdf->Rect(1, 40, 50, 12, 'D'); $pdf->Rect(51, 40, 50, 12, 'D'); //$pdf->SetFont('Arial','B',6); //$pdf->Text(67,14,$code2,'','','C'); //$pdf->SetFont('Arial','B',6); //$pdf->Text(17,26,$code3,'','','C'); //$pdf->SetFont('Arial','B',6); //$pdf->Text(67,26,$code4,'','','C'); //$pdf->SetFont('Arial','B',6);
// $empa3 = $_POST['empa3']; // $empa4 = $_POST['empa4']; // $cant1 $type = 'ean13'; $black = '000000'; // color in hexa $web = 'sumeca.com.ve'; // -------------------------------------------------- // // ALLOCATE FPDF RESSOURCE // -------------------------------------------------- // $pdf = new eFPDF('P', 'mm', array(101.9, 65)); $pdf->AddPage(); // -------------------------------------------------- // // Rectangulo 1 // -------------------------------------------------- // $pdf->Rect(1, 1, 50, 23, 'D'); // Nombre de la empresa $pdf->SetFont('Arial', 'B', 9); $pdf->Text(3, 5, $empresa, '', '', 'L'); // Fecha $pdf->SetFont('Arial', '', 7); $pdf->Text(30, 5, date('d/m/Y'), '', '', 'R'); // Descripción del producto $pdf->SetFont('Arial', '', 6.2); $pdf->Text(3, 19, $nombre, '', '', 'L'); // Unidad/Cantidad $pdf->SetFont('Arial', '', 8); $pdf->Text(3, 22, $codigo); $pdf->Text(40, 22, $cantidad); //Web $pdf->SetFont('Arial', '', 7);