} else { $marge = 5; // between barcode and hri in pixel $x = 30; // barcode center $y = 120; // barcode center $height = 40; // barcode height in 1D ; module size in 2D $width = 1; // barcode height in 1D ; not use in 2D } // -------------------------------------------------- // // ALLOCATE FPDF RESSOURCE // -------------------------------------------------- // $pdf = new eFPDF('P', 'mm', array(102, 252)); // set the orentation, unit of measure and size of the page $pdf->AddPage(); // -------------------------------------------------- // // BARCODE // -------------------------------------------------- // $data = Barcode::fpdf($pdf, $black, $x, $y, $angle, $type, array('code' => $code), $width, $height); $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); // -------------------------------------------------- // // OUTPUT // -------------------------------------------------- // $pdf->TextWithRotation($x + $xt, $y + $yt, $data['hri'], $angle); $pdf->Output();
// -------------------------------------------------- // //$marge7 = -5; // between barcode and hri in pixel //$x7 = 25; // barcode center //$y7 = 45; // barcode center //$code7 = 'code'; // -------------------------------------------------- // // 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');
$fake_register_globals = false; $sanitize_all_escapes = true; require_once "../globals.php"; require_once "{$srcdir}/classes/PDF_Label.php"; require_once "{$srcdir}/formatting.inc.php"; require_once "{$srcdir}/classes/php-barcode.php"; //Get the data to place on labels // $patdata = sqlQuery("SELECT " . "p.fname, p.mname, p.lname, p.pubpid, p.DOB, " . "p.street, p.city, p.state, p.postal_code, p.pid " . "FROM patient_data AS p " . "WHERE p.pid = ? LIMIT 1", array($pid)); // re-order the dates // $today = oeFormatShortDate($date = 'today'); $dob = oeFormatShortDate($patdata['DOB']); $pdf = new PDF_Label('5160'); // used this to get the basic info to the class $pdf = new eFPDF('P', 'mm', array(102, 252)); // set the orentation, unit of measure and size of the page $pdf->AddPage(); $pdf->SetFont('Arial', '', 50); $fontSize = 40; $marge = 5; // between barcode and hri in pixel $x = 20; // barcode center $y = 200; // barcode center $height = 40; // barcode height in 1D ; module size in 2D $width = 1; // barcode height in 1D ; not use in 2D $angle = 90;
// $desc2 = $_POST['desc2']; // $desc3 = $_POST['desc3']; // $desc4 = $_POST['desc4']; // $empa1 = $_POST['empa1']; // $empa2 = $_POST['empa2']; // $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