예제 #1
0
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;
// rotation in degrees
$black = '000000';
// color in hexa
예제 #2
0
//  $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);
$pdf->Text(18, 22, $web);
// -------------------------------------------------- //