public static function createPDF_overall($reportDetails, $AnalysisData) { $pdf = new PDF(); $pdf->SetLeftMargin(25); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(0, 15, 'Students Overall Report', 0, 0, "C"); $pdf->Ln(25); $pdf->reportData($reportDetails); $pdf->Ln(10); $pdf->makeTable($AnalysisData); $pdf->Image('../../mod/graph/barChart.png', 60, 150, 90); // $pdf->Image('../../mod/graph/3DpieChart.png',120,160,70); $pdf->Ln(80); $pdf->SetFont('Arial', 'B', 11); $pdf->Cell(0, 5, 'Assignment Progress', 0, 0, "L"); $pdf->Ln(10); $pdf->SetFont('Arial', '', 9); $pdf->Write(5, "Students all assignment marks evaluating for this subject is shown blow..!! This is help to evaluate progress of whole batch..!!!!!! "); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 11); $pdf->Cell(0, 5, 'Results Compare with Last year', 0, 0, "L"); $pdf->Ln(5); $pdf->Image('../../mod/graph/compareLineChart.png', 40, 20, 130); unlink('../../mod/graph/3DpieChart.png'); unlink('../../mod/graph/barChart.png'); unlink('../../mod/graph/compareLineChart.png'); $pdf->Output("Report.pdf", "I"); }
/** * PDF image renderer * * @param PDF $pdf * * @return void */ function render($pdf) { global $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright; // Check for a pagebreak first if ($pdf->checkPageBreakPDF($this->height + 5)) { $this->y = $pdf->GetY(); } $curx = $pdf->GetX(); // If current position (left)set "." if ($this->x == ".") { $this->x = $pdf->GetX(); } else { $this->x = $pdf->addMarginX($this->x); $pdf->SetX($curx); } if ($this->y == ".") { //-- first check for a collision with the last picture if (isset($lastpicbottom)) { if ($pdf->PageNo() == $lastpicpage && $lastpicbottom >= $pdf->GetY() && $this->x >= $lastpicleft && $this->x <= $lastpicright) { $pdf->SetY($lastpicbottom + 5); } } $this->y = $pdf->GetY(); } else { $pdf->SetY($this->y); } if ($pdf->getRTL()) { $pdf->Image($this->file, $pdf->getPageWidth() - $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align); } else { $pdf->Image($this->file, $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align); } $lastpicpage = $pdf->PageNo(); $pdf->lastpicpage = $pdf->getPage(); $lastpicleft = $this->x; $lastpicright = $this->x + $this->width; $lastpicbottom = $this->y + $this->height; // Setup for the next line if ($this->line == "N") { $pdf->SetY($lastpicbottom); } }
$image = $_POST['image']; $clues = explode(',', $_POST['clues']); require 'MultiCellBlt2.php'; //Create pdf $pdf = new PDF(); $pdf->AddPage(); //set document properties $pdf->SetAuthor('Anon'); $pdf->SetTitle($name); // Set the page break to 'true' and the bottom margin height $pdf->SetAutoPageBreak(1, 10); //set font for the entire document $pdf->SetFont('Helvetica', 'B', 20); $pdf->SetTextColor(50, 60, 100); //insert Collage logo $pdf->Image('logo.png', 10, 10, 33, 0); //display the title without a border around it $pdf->SetXY(50, 15); $pdf->SetDrawColor(50, 60, 100); $pdf->Cell(100, 10, $name, 0, 0, 'C', 0); // Insert a dynamic image from a URL $pdf->Image($image, 11, 30, 0, 50); //Set x and y position for the main text, reduce font size and write content $pdf->SetXY(65, 30); $pdf->SetLeftMargin(65); $pdf->SetFontSize(10); $pdf->Write(5, $characteristics); $pdf->Ln(8); //Output the clues $pdf->SetFont('Helvetica', '', 9); $pdf->SetXY(10, 90);
//RETRIEVED DATA JNG $order_data = $class_o->retrieveDetail($order_id); $items = $class_o->retrieveProducts($order_id); $order['id'] = $order_data['orders_no']; $order['customer'] = $order_data['delivery_name']; $order['prefix_code'] = ''; } if ($order_counter % $pdf->label_per_page == 0) { $pdf->AddPage(); } $order_counter++; $xpos_starter = ($labelxpos - 1) * $pdf->label_width + $labelxpad; $ypos_starter = ($labelypos - 1) * $pdf->label_height + $labelypad; $logo_xpos = $xpos_starter + 52; $logo_ypos = $ypos_starter; $pdf->Image(FPDF_IMGPATH . 'jng-logo.png', $logo_xpos, $logo_ypos, 43, 5.33); //WxH 64.5 x 8 $xpos = $xpos_starter; $ypos = $ypos_starter - 2; //NUMBERING $pdf->SetXY($xpos, $ypos); $pdf->setFont('Arial', 'B', '18'); $pdf->Cell(10, 10, $order_counter); //SP FLAG if ($order['prefix_code'] != '') { $pdf->SetXY($xpos + 76, $ypos + 5); $pdf->setFont('Arial', '', '10'); $pdf->Cell(20, 10, $order['prefix_code'], '0', '0', 'R'); } //ORDER DETAIL $pdf->setFont('Arial', '', '12');
$pdf->SetFont('arial', '', $sizetitre); $pdf->RotatedCell($angle, $xtitre, $ytitre, $wtitre, $htitre, $_GET['titre'], 0, 0, 'C'); $pdf->RotatedText(15, 15, $titre, 0); $pdf->SetFont('arial', '', $sizeechelle); if ($_GET['echelle'] == 0) { $pdf->RotatedText($posixechelle, $posiyechelle, 'Sans échelle', $angle); } else { $pdf->RotatedText($posixechelle, $posiyechelle, '1/' . $_GET['echelle'] . ' ème', $angle); } if ($print_basic_copyright) { $pdf->SetFont('arial', '', 6); $pdf->RotatedText(5, 5, "Les photographies sont propriétées de l'IGN, les données cadastrales sont propriétées de la DGI. Reproduction interdite.", 0); } //génération du qrcode; $url_qrcode = "https://" . $_SERVER["HTTP_HOST"] . "/interface/qrprint.php?var=" . $application . "\$" . $_GET['x'] . "\$" . $_GET['y'] . "\$" . $_GET['lar'] . "\$" . $_GET['hau'] . "\$" . $_GET['zoom'] . "\$" . $_GET['format'] . "\$" . $_GET['legende'] . "\$" . $_GET['titre'] . "\$" . $_GET['echelle'] . "\$" . $_GET['parce'] . "\$" . $_GET['raster']; $pdf->Image(generateQRCode($url_qrcode, 100), $xqrcode, $yqrcode, 30, 30, 'PNG'); $pdf->SetDrawColor(0); $pdf->SetFont('arial', '', 10); if ($_GET['legende'] == 1 || $_GET['legende'] == 3) { $legende = ""; //$pyy=250; $idprov = ""; for ($i = 0; $i < count($rastx); $i++) { $ra = explode(".", $rastx[$i]); $id = $ra[0]; $lib = str_replace("_", " ", $ra[1]); if ($id != "") { $req1 = "select col_theme.intitule_legende as intitule_legende,theme.libelle_them,col_theme.fill,col_theme.symbole,col_theme.opacity,col_theme.ordre,col_theme.stroke_rgb,style.fill as style_fill,style.symbole as style_symbole,style.opacity as style_opacity,style.font_size as style_fontsize,style.stroke_rgb as style_stroke from admin_svg.appthe left outer join admin_svg.col_theme on appthe.idappthe=col_theme.idappthe join admin_svg.theme on appthe.idtheme=theme.idtheme left outer join admin_svg.style on appthe.idtheme=style.idtheme where appthe.idappthe='" . $id . "' and (intitule_legende='" . $lib . "' or libelle_them='" . $lib . "')"; $couch = $DB->tab_result($req1); if ($couch[0]['intitule_legende'] == "") { $legend = $couch[0]['libelle_them'];
$fecha = vacunacionTableClass::FECHA; $animal = animalTableClass::NUMERO; $veterinario = veterinarioTableClass::NOMBRE; class PDf extends FPDF { function Footer() { $this->SetY(-15); $this->SetFont('Arial', 'I', 8); $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C'); } } $pdf = new PDF('P', 'mm', 'letter'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->Image(routing::getInstance()->getUrlImg('reporte_Vertical.jpg'), 0, 0, 216, 280); $pdf->Ln(40); $pdf->SetFont('Arial', 'B', 25); $pdf->Cell(93); $pdf->Cell(30, 10, $mensaje, 0, 0, 'C'); $pdf->Ln(20); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(10); //$pdf->Cell(37, 10, utf8_decode('N. Documento'), 1, 0, 'C'); $pdf->Cell(40, 10, utf8_decode('Fecha'), 1, 0, 'C'); $pdf->Cell(38, 10, utf8_decode('Animal'), 1, 0, 'C'); $pdf->Cell(100, 10, utf8_decode('Veterinario'), 1, 0, 'C'); $pdf->Ln(); foreach ($objVacunacion as $key) { $pdf->Cell(10); // $pdf->Cell(37, 10, utf8_decode($key->id), 1);
function PutLink($URL, $txt) { // Put a hyperlink $this->SetTextColor(0, 0, 255); $this->SetStyle('U', true); $this->Write(5, $txt, $URL); $this->SetStyle('U', false); $this->SetTextColor(0); } } $datArray = array(); $html = 'You can now easily print text mixing different styles: <b>bold</b>, <i>italic</i>, <u>underlined</u>, or <b><i><u>all at once</u></i></b>!<br><br>You can also insert links on text, such as <a href="http://www.fpdf.org">www.fpdf.org</a>, or on an image: click on the logo.'; $pdf = new PDF(); // First page $pdf->AddPage(); $pdf->SetFont('Arial', '', 20); $pdf->Write(5, "To find out what's new in this tutorial, click "); $pdf->SetFont('', 'U'); $link = $pdf->AddLink(); $pdf->Write(5, 'here', $datArray[0]); $pdf->SetFont(''); // Second page $pdf->AddPage(); $pdf->SetLink($datArray[0]); $pdf->Image('../img/intro-bg.jpg', 10, 12, 30, 0, '', 'http://www.fpdf.org'); $pdf->SetLeftMargin(45); $pdf->SetFontSize(14); $pdf->WriteHTML($html); $pdf->Output();
break; case "12": $mes = "DICIEMBRE"; break; } return "MAZATLAN SINALOA ".date("d")." DE ".$mes." DE ".date("Y").""; } } $pdf = new PDF(); //$pdf -> AliasNbPages(); $pdf -> AddPage(); //INFORMACION GENERAL $pdf -> Image('cab2_informacion_general.jpg',10,42,180); $pdf -> addLeyenda("Nombre o Razón Social: ".$f->nombrecliente."",50); $pdf -> agregarLinea(166,243,140,10); $pdf -> addLeyenda("Giro: ".$f->giro."",55); $pdf -> agregarLinea(192,238,65,10); $pdf -> addLeyenda2("R.F.C.: ".$f->rfc."",55,85); $pdf -> agregarLinea(114,238,30,10); $pdf -> addLeyenda2("Antigüedad: ".$f->antiguedad."",55,130); $pdf -> agregarLinea(62,238,36,10); $pdf -> addLeyenda("DOMICILIO FISCAL",60); $pdf -> addLeyenda("Calle: ".$f->calle."",65); $pdf -> agregarLinea(191,228,100,10); $pdf -> addLeyenda2("No. Ext.: ".$f->numero."",65,120); $pdf -> agregarLinea(77,228,51,10); $pdf -> addLeyenda("Colonia: ".$f->colonia."",70); $pdf -> agregarLinea(187,223,161,10);
return "N/A"; } else { if ($data >= 10000) { $data = number_format($data); } return $json[$themeasure]["style"]["prefix"] . $data . $json[$themeasure]["style"]["units"]; } } // Create PDF $pdf = new PDF('P', 'in', 'Letter'); /************************************************************ Cover Page ************************************************************/ $pdf->AddPage(); // title page image background $pdf->Image('reportCoverPageCompass.png', 0, 0, 8.5); // White text on top of title page // $pdf->SetTextColor(255,255,255); // Title page header $pdf->SetTextColor(0, 0, 45); $pdf->SetFont('Arial', 'B', 50); $pdf->Ln(5.35); $pdf->Cell(0.3); $pdf->Cell(0, 0, "Compass Profile Area"); if ($reportRadioValue == 'census') { $pdf->SetTextColor(0, 0, 45); $pdf->SetFont('Arial', 'B', 40); $pdf->Ln(1); // $aryPrettyBlock = explode(" - ", $censusBlock); // $prettyBlock = $aryPrettyBlock[1]; $pdf->Cell(0.3);
/** * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) * * @param PDF $pdf PDF reference * @param Translate $outputlangs Output langs * @param array $param Associative array containing label content and optional parameters * @return void */ function addSticker(&$pdf, $outputlangs, $param) { global $mysoc, $conf; $textleft = $param['textleft']; $header = $param['textheader']; $footer = $param['textfooter']; $textright = $param['textright']; $code = $param['code']; $encoding = $param['encoding']; $is2d = $param['is2d']; // We are in a new page, then we must add a page if ($this->_COUNTX == 0 && $this->_COUNTY == 0 and !$this->_First == 1) { $pdf->AddPage(); } $this->_First = 0; $_PosX = $this->_Margin_Left + $this->_COUNTX * ($this->_Width + $this->_X_Space); $_PosY = $this->_Margin_Top + $this->_COUNTY * ($this->_Height + $this->_Y_Space); // Define logo $logo = $conf->mycompany->dir_output . '/logos/' . $mysoc->logo; if (!is_readable($logo)) { $logo = ''; if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small)) { $logo = $conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small; } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output . '/logos/' . $mysoc->logo)) { $logo = $conf->mycompany->dir_output . '/logos/' . $mysoc->logo; } } $xleft = 2; $ytop = 2; // Top if ($header != '') { $pdf->SetXY($_PosX + $xleft, $_PosY + 1); // Only 1 mm and not ytop for top text $pdf->Cell($this->_Width - 2 * $xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($header), 0, 1, 'C'); } $ytop += empty($header) ? 0 : 1 + $this->_Line_Height; // Define widthtouse and heighttouse $pageMargins = $pdf->getMargins(); $maxwidthtouse = round($this->_Width - 2 * $xleft); $maxheighttouse = round($this->_Height - 2 * $ytop); $maxheighttouse -= empty($footer) ? 0 : 1 + $this->_Line_Height; $defaultratio = $maxwidthtouse / $maxheighttouse; $widthtouse = $maxwidthtouse; $heighttouse = $maxheighttouse; $logoHeight = $heighttouse; $logoWidth = $heighttouse; //var_dump($this->_Width.'x'.$this->_Height.' with border and scale '.$imgscale.' => max '.$maxwidthtouse.'x'.$maxheighttouse.' => We use '.$widthtouse.'x'.$heighttouse);exit; // Center if ($textright == '') { // Output left area if ($textleft == '%LOGO%' && $logo) { $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, 0, $logoHeight); } else { if ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); } } } else { if ($textleft != '' && $textright != '') { if (($textleft == '%LOGO%' || $textleft == '%PHOTO%' || $textleft == '%BARCODE%') && !strstr($textright, '%')) { if ($textleft == '%LOGO%' && $logo) { $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse / 2, 0); } else { if ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $xleft, $_PosY + $ytop, $widthtouse / 2, $heighttouse); } } $pdf->SetXY($_PosX + $widthtouse / 2, $_PosY + $ytop); $pdf->MultiCell($widthtouse / 2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } else { if (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) { if ($textright == '%LOGO%' && $logo) { $pdf->Image($logo, $_PosX + $widthtouse / 2, $_PosY + $ytop, $widthtouse / 2, 0); } else { if ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $widthtouse / 2, $_PosY + $ytop, $widthtouse / 2, $heighttouse); } } $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($widthtouse / 2, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); } else { if ($textleft == '%LOGO%') { if ($logo) { $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, 0, $logoHeight); } if ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $xleft + $logoWidth + 1, $_PosY + $ytop, $widthtouse - $logoWidth - 1, $heighttouse); } else { $pdf->SetXY($_PosX + $xleft + $logoWidth + 1, $_PosY + $ytop); $pdf->MultiCell($widthtouse - $logoWidth1 - 1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } } else { if ($textright == '%LOGO%') { if ($logo) { $pdf->Image($logo, $_PosX + $xleft + $widthtouse - $logoWidth + 1, $_PosY + $ytop, 0, $logoHeight); } if ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $xleft, $_PosY + $ytop, $widthtouse - $logoWidth - 1, $heighttouse); } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($widthtouse - $logoWidth - 1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); } } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell(round($this->_Width / 2), $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); $pdf->SetXY($_PosX + round($this->_Width / 2), $_PosY + $ytop); $pdf->MultiCell(round($this->_Width / 2) - 2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } } } } } else { // Output right area if ($textright == '%LOGO%' && $logo) { $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, 0, $logoHeight); } else { if ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width - $xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } } } } // Bottom if ($footer != '') { $pdf->SetXY($_PosX, $_PosY + $this->_Height - $this->_Line_Height - 1); $pdf->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($footer), 0, 1, 'C'); } //print "$_PosY+$this->_Height-$this->_Line_Height-1<br>\n"; $this->_COUNTY++; if ($this->_COUNTY == $this->_Y_Number) { // Si on est en bas de page, on remonte le 'curseur' de position $this->_COUNTX++; $this->_COUNTY = 0; } if ($this->_COUNTX == $this->_X_Number) { // Si on est en bout de page, alors on repart sur une nouvelle page $this->_COUNTX = 0; $this->_COUNTY = 0; } }
$b9 = $row5['b9']; $b10 = $row5['b10']; $b11 = $row5['b11']; $b12 = $row5['b12']; $b13 = $row5['b13']; $b14 = $row5['b14']; $b15 = $row5['b15']; $b16 = $row5['b16']; $b17 = $row5['b17']; $b18 = $row5['b18']; $b19 = $row5['b19']; $b20 = $row5['b20']; $encabezamiento = 'PLAN DE TRABAJO INDIVIDUALIZADO' . "\n" . '(Decreto 69/2007,Artículo 10)' . "\n" . 'MATERIA: ' . $materia2; $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 12); $pdf->Image('logoclm.jpg', 10, 10); $pdf->SetLineWidth(0.5); $pdf->Cell(50, 10, ''); $pdf->SetFillColor(150, 150, 150); $pdf->Multicell(90, 8, $encabezamiento, 1, 'C', 1, 1); $pdf->SETXY(10, 50); $pdf->SetFont('Arial', 'B', 10); $pdf->Multicell(160, 5, 'PERFIL ACADÉMICO DEL ALUMNO. GRUPO:' . $grupo . "\n", 1, 'C', 1); $pdf->SetFont('Arial', '', 8); $pdf->SETXY(10, 55); $pdf->Multicell(80, 5, 'ALUMNO: ' . $nombre2 . "\n" . 'CURSO: ' . $curso2 . "\n" . 'TUTOR/-A: ' . $tutor2, 1); $pdf->SETXY(90, 55); $pdf->Multicell(80, 5, 'MATERIA: ' . $materia2 . "\n" . 'CALIFICACIÓN: ' . $calificacion2 . "\n" . 'PROFESOR/-A: ' . $profesor2, 1); $perfilacademico = ""; if ($acnee2 == 1) { $perfilacademico = $perfilacademico . "El alumno es ACNEE.\n";
} else { $year = date('y'); } $codigo = $year . '-' . str_pad($curso_id, 4, "0", STR_PAD_LEFT) . '-' . str_pad($id, 4, "0", STR_PAD_LEFT); //IDIOMA DEL CURSO $idioma = pg_result($curso, 0, 'idioma'); //echo $idioma; include 'includes/internacionalizacion.php'; if ($edicion == 'OFF' && $est == 'APR' && $est_admin == 'ON') { $pdf = new PDF("P", "cm", "A4"); $pdf->AddPage(); //define("FPDF_FONTPATH", "/usr/share/fonts/truetype/ttf-dejavu"); $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true); if ($curso_id == 36) { //Imagen de Coopeciagro Gustavo Aguero $pdf->Image('img/certificados/certificado-firmado-sellado-training_coopeciagro.jpg', 0, 0, 21, 29.7); } elseif ($curso_id == 214) { //Curso Presencial en Nicaragua dictado por Jose Campos de Gustavo Aguero $pdf->Image('img/certificados/certificado-firmado-sellado-training_gustavo3.jpg', 0, 0, 21, 29.7); } elseif ($curso_id == 258 || $curso_id == 290) { //Curso GISMAP WEBMINAR $pdf->Image('img/certificados/certificado-GISMAP-WEBMINAR.jpg', 0, 0, 21, 29.7); } elseif ($curso_id == 243) { //Segundo Curso en Nicaragua Nivel Intermedio dictado por Gustavo Aguero $pdf->Image('img/certificados/certificado-firmado-sellado-training_gustavo4.jpg', 0, 0, 21, 29.7); } elseif ($curso_id == 241) { //Fundacion Tripartita $pdf->Image('img/certificados/certificado_tripartita.jpg', 0, 0, 21, 29.7); } elseif ($curso_id == 40) { //Coopeciagre 2 Gustavo Aguero $pdf->Image('img/certificados/certificado-firmado-sellado-training_coopeciagro2.jpg', 0, 0, 21, 29.7);
$peso = procesoVentaTableClass::PESO; $subtotal = procesoVentaTableClass::SUBTOTAL; $animal = animalTableClass::NUMERO; class PDf extends FPDF { function Footer() { $this->SetY(-15); $this->SetFont('Arial', 'I', 8); $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C'); } } $pdf = new PDF('P', 'mm', 'letter'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->Image(routing::getInstance()->getUrlImg('reporte_horizontal.jpg'), 0, 0, 216, 280); $pdf->Ln(40); $pdf->SetFont('Arial', 'B', 25); $pdf->Cell(93); $pdf->Cell(30, 10, $mensaje, 0, 0, 'C'); $pdf->Ln(20); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(1); //$pdf->Cell(20, 10, utf8_decode('N.'), 1, 0, 'C'); $pdf->Cell(36, 10, utf8_decode('Fecha'), 1, 0, 'C'); $pdf->Cell(75, 10, utf8_decode('Empleado'), 1, 0, 'C'); $pdf->Cell(50, 10, utf8_decode('Cliente'), 1, 0, 'C'); $pdf->Cell(20, 10, utf8_decode('Animal'), 1, 0, 'C'); //$pdf->Cell(12, 10, utf8_decode('Peso(Kg)'), 1, 0, 'C'); $pdf->Cell(23, 10, utf8_decode('Valor'), 1, 0, 'C'); $pdf->Ln();
/** * Show header of page for PDF generation * * @param PDF $pdf Object PDF * @param Translate $outputlangs Object lang for output * @param int $page_height Height of page * @return void */ function pdf_pagehead(&$pdf, $outputlangs, $page_height) { global $conf; // Add a background image on document if (!empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) { $pdf->SetAutoPageBreak(0, 0); // Disable auto pagebreak before adding image $pdf->Image($conf->mycompany->dir_output . '/logos/' . $conf->global->MAIN_USE_BACKGROUND_ON_PDF, isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_X : 0, isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y : 0, 0, $page_height); $pdf->SetAutoPageBreak(1, 0); // Restore pagebreak } }
$pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'CHECK FOTOGRAFICO DE LA VIVIENDA Y ALREDEDORES', 0, 1, 'C'); $pdf->SetTextColor(0, 0, 0); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'NOMBRES Y APELLIDOS', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'C'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'DIRECCION', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 7, $domicilio, 1, 'C'); $pdf->Ln(5); $pdf->Image("../files/images_dom/{$fotos['0']}", 40, null, 130, 100); $pdf->Ln(2); $pdf->Image("../files/images_dom/{$fotos['1']}", 40, null, 130, 100); $pdf->Ln(2); $pdf->AddPage(); $pdf->SetXY(20, 25); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'MAPA DE ZONIFICACION - CHECK DOMICILIARIO', 0, 1, 'C'); $pdf->SetTextColor(0, 0, 0); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'NOMBRES Y APELLIDOS', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'C');
// con filtro del departemento if ($depto != '-1' and $motivo == '-1' and ($fechai != "" and $fechaf != "")) { $query1 = " \nSelect empleado.No_Empleado, CONCAT(Primer_nombre, ' ', Segundo_nombre, ' ', Primer_apellido, ' ', Segundo_Apellido) as Nombre, departamento_laboral.nombre_departamento,motivos.descripcion, \nCOUNT(permisos.id_Permisos) as Solicitudes, SUM(permisos.dias_permiso) as Inasistencias from permisos\n inner join motivos on permisos.id_motivo=motivos.Motivo_ID \n inner join empleado on empleado.No_Empleado=permisos.No_Empleado \n inner join persona on persona.N_identidad=empleado.N_identidad \n inner join departamento_laboral on departamento_laboral.id_departamento_laboral = permisos.id_departamento \n where departamento_laboral.nombre_departamento='" . $depto . "'\n and date_format(permisos.fecha,'%d-%m-%Y') between date_format('" . $fechai . " ','%d-%m-%Y')and date_format('" . $fechaf . "','%d-%m-%Y')\t\n\tGROUP BY Primer_nombre, Segundo_nombre, Primer_apellido, Segundo_Apellido, departamento_laboral.nombre_departamento ORDER BY Primer_nombre asc"; } // con filtro del motivos y depattamento if ($depto != '-1' and $motivo != '-1' and ($fechai != "" and $fechaf != "")) { $query1 = " \nSelect empleado.No_Empleado, CONCAT(Primer_nombre, ' ', Segundo_nombre, ' ', Primer_apellido, ' ', Segundo_Apellido) as Nombre, departamento_laboral.nombre_departamento,motivos.descripcion, \nCOUNT(permisos.id_Permisos) as Solicitudes, SUM(permisos.dias_permiso) as Inasistencias from permisos\n inner join motivos on permisos.id_motivo=motivos.Motivo_ID \n inner join empleado on empleado.No_Empleado=permisos.No_Empleado \n inner join persona on persona.N_identidad=empleado.N_identidad \n inner join departamento_laboral on departamento_laboral.id_departamento_laboral = permisos.id_departamento \n where departamento_laboral.nombre_departamento='" . $depto . "' and motivos.descripcion='" . $motivo . "' and \n date_format(permisos.fecha,'%d-%m-%Y') between date_format('" . $fechai . " ','%d-%m-%Y')and date_format('" . $fechaf . "','%d-%m-%Y')\t\n\tGROUP BY Primer_nombre, Segundo_nombre, Primer_apellido, Segundo_Apellido, departamento_laboral.nombre_departamento,motivos.descripcion ORDER BY Primer_nombre asc"; } // por fechas if ($depto == '-1' and $motivo != '-1') { $query1 = " \nSelect empleado.No_Empleado, CONCAT(Primer_nombre, ' ', Segundo_nombre, ' ', Primer_apellido, ' ', Segundo_Apellido) as Nombre, departamento_laboral.nombre_departamento, motivos.descripcion, \nCOUNT(permisos.id_Permisos) as Solicitudes, SUM(permisos.dias_permiso) as Inasistencias from permisos\n inner join motivos on permisos.id_motivo=motivos.Motivo_ID \n inner join empleado on empleado.No_Empleado=permisos.No_Empleado \n inner join persona on persona.N_identidad=empleado.N_identidad \n inner join departamento_laboral on departamento_laboral.id_departamento_laboral = permisos.id_departamento \n where motivos.descripcion='" . $motivo . "' and \n date_format(permisos.fecha,'%d-%m-%Y') between date_format('" . $fechai . " ','%d-%m-%Y')and date_format('" . $fechaf . "','%d-%m-%Y')\t\n\tGROUP BY Primer_nombre, Segundo_nombre, Primer_apellido, Segundo_Apellido, departamento_laboral.nombre_departamento,motivos.descripcion ORDER BY Primer_nombre asc"; } $pdf = new PDF(); $pdf->AddPage("L", "Letter"); $pdf->SetFont('Arial', '', 18); $pdf->Image($maindir . 'assets/img/lucen-aspicio.png', 50, 15, 200, 200, 'PNG'); $pdf->Image($maindir . 'assets/img/logo_unah.png', 15, 5, 24, 36, 'PNG'); $pdf->Image($maindir . 'assets/img/logo-cienciasjuridicas.png', 230, 8, 35, 35, 'PNG'); $pdf->Cell(22, 10, '', 0); $pdf->SetFont('Arial', '', 18); $pdf->Cell(45, 10, '', 0); $pdf->Cell(70, 10, utf8_decode('Universidad Nacional Autónoma de Honduras'), 0); $pdf->Ln(10); $pdf->SetFont('Arial', 'U', 14); $pdf->Cell(60, 8, '', 0, 0, "C"); $pdf->Cell(130, 8, 'Reportes de Permisos Personales', 0, 0, "C"); $pdf->Ln(25); //$pdf->AddCol('N',25,'#Empleado','C'); $pdf->AddCol('Nombre', 70, 'Nombre Completo', 'C'); $pdf->AddCol('nombre_departamento', 40, 'Departamento', 'C'); $pdf->AddCol('descripcion', 40, 'Motivo', 'C');
$sql2 = 'SELECT * FROM `alumnos` WHERE `curso` =' . "'" . $curso . "' ORDER BY matricula"; $result2 = mysql_query($sql2, $dbh); while ($row2 = mysql_fetch_array($result2)) { $k = 0; $rojo = 0; $rojo2 = 0; $pdf->SetTextColor(0); $sql3 = 'SELECT * FROM `curso` WHERE `curso` =' . "'" . $curso . "'"; $result3 = mysql_query($sql3, $dbh); $row3 = mysql_fetch_array($result3); $pjefe = $row3["pjefe"]; $pdf->AddPage(); $aux = 10; $contador = 0; $ruta = 'logo.jpg'; $pdf->Image($ruta, 10, 5, 18, 20); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(80); $pdf->Cell(30, 10, $x1, 0, 0, 'C'); $pdf->Ln(); $pdf->SetFont('Times', '', 10); $pdf->Cell(180, 4, 'Año Escolar: 2008', 0, 1, 'R'); //$pdf->Ln(); $pdf->Cell(180, 4, 'Informe Anual', 0, 1, 'R'); $pdf->Ln(); $pdf->Cell(0, 4, ' Reconocido Oficialmente por el Ministerio de Educación de la República de Chile según decreto Nº1052 del año 1997 ', 0, 1, 'L'); $pdf->Cell(0, 4, ' Rol Base de Datos 14416-9.-', 0, 1, 'L'); $pdf->ln(); $apellidop = $row2["apellidop"]; $apellidom = $row2["apellidom"]; $nombres = $row2["nombres"];
} $sql = "SELECT * FROM cliente WHERE idViajero = '{$idViajero}'"; $resultado = @mysql_query($sql) or die(mysql_error()); while ($datos = @mysql_fetch_assoc($resultado)) { $nombre = $datos["Nombre"]; } $sql = "SELECT * FROM usuarios WHERE IdUsuario = '{$IdUsuario}'"; $resultado = @mysql_query($sql) or die(mysql_error()); while ($datos = @mysql_fetch_assoc($resultado)) { $nombreU = $datos["Nombre"]; } $dias = array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado"); $meses = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"); $pdf = new PDF(); $pdf->AddPage(); $pdf->Image('../imagenes/logo.jpg', 40, 8, 33); // Arial bold 15 $pdf->SetFont('Arial', 'B', 8); // Movernos a la derecha $pdf->SetY(4); $pdf->Cell(80); // Título $pdf->Cell(60, 5, 'Angytours', 0, 2, 'C'); $pdf->Cell(60, 5, 'Calle 59J # 565 X 110 y 112 Col Bojorquez', 0, 2, 'C'); $pdf->Cell(60, 5, 'Tel: (999)9-12-28-95 | Cel: (044)99-92-44-54-14', 0, 2, 'C'); $pdf->Cell(60, 5, 'Correo: angeviajes@hotmail.com', 0, 2, 'C'); $pdf->Cell(60, 5, 'RFC: PELA620129L36', 0, 2, 'C'); $pdf->SetFont('Arial', '', 10); $pdf->SetY(35); $pdf->SetX(140); $pdf->Cell(40, 8, utf8_decode("Fecha: ") . utf8_decode($dias[date('w')] . " " . date('d') . " de " . $meses[date('n') - 1] . " del " . date('Y')), 0, 1);
$pdf->SetFillColor(178, 178, 178); $pdf->Cell(0, 6, 'Detalhamento do Cliente', 1, 0, 'C', 1); //Nova Linha $pdf->ln(); $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(0, 6, 'Tipo Cliente:', 1, 0, 'L'); $pdf->SetFont('Arial', 'I', 9); $pdf->SetX(39); $pdf->Cell(0, 6, $conta_descricao, 0, 0, 'L'); $pdf->SetX(57); $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(0, 6, 'Nome/Razão Social:', 1, 0, 'L'); $pdf->SetFont('Arial', 'I', 9); $pdf->SetX(88); $pdf->Cell(0, 6, $dados_conta['nome'], 0, 0, 'L'); $pdf->Image($conta_figura, 35, 32, 4, 4); //Nova Linha $pdf->ln(); $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(0, 6, 'Endereço:', 1, 0, 'L'); $pdf->SetFont('Arial', 'I', 9); $pdf->SetX(37); $pdf->Cell(0, 6, $dados_conta['endereco'], 0, 0, 'L'); $pdf->SetX(105); //Nova Linha $pdf->ln(); $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(0, 6, 'Complemento:', 1, 0, 'L'); $pdf->SetFont('Arial', 'I', 9); $pdf->SetX(37); $pdf->Cell(0, 6, $dados_conta['complemento'], 0, 0, 'L');
public function basket() { $this->start = $this->input->get('start'); $this->end = $this->input->get('end'); $this->view = ""; if (isset($_GET['view']) && $_GET['view'] != "") { $this->view = pnp::clean($_GET['view']); } $this->data->getTimeRange($this->start, $this->end, $this->view); $basket = $this->session->get("basket"); if (is_array($basket) && sizeof($basket) > 0) { foreach ($basket as $item) { # explode host::service::source $slices = explode("::", $item); if (sizeof($slices) == 2) { $this->data->buildDataStruct($slices[0], $slices[1], $this->view); } if (sizeof($slices) == 3) { $this->data->buildDataStruct($slices[0], $slices[1], $this->view, $slices[2]); } } } //echo Kohana::debug($this->data->STRUCT); /* * PDF Output */ $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->SetAutoPageBreak('off'); $pdf->SetMargins(17.5, 30, 10); $pdf->AddPage(); if ($this->use_bg) { $pdf->setSourceFile($this->config->conf['background_pdf']); $tplIdx = $pdf->importPage(1, '/MediaBox'); $pdf->useTemplate($tplIdx); } $pdf->SetCreator('Created with PNP'); $pdf->SetFont('Arial', '', 10); // Title foreach ($this->data->STRUCT as $data) { if ($pdf->GetY() > 200) { $pdf->AddPage(); if ($this->use_bg) { $pdf->useTemplate($tplIdx); } } if ($data['LEVEL'] == 0) { $pdf->SetFont('Arial', '', 12); $pdf->CELL(120, 10, $data['MACRO']['DISP_HOSTNAME'] . " -- " . $data['MACRO']['DISP_SERVICEDESC'], 0, 1); $pdf->SetFont('Arial', '', 10); $pdf->CELL(120, 5, $data['TIMERANGE']['title'] . " (" . $data['TIMERANGE']['f_start'] . " - " . $data['TIMERANGE']['f_end'] . ")", 0, 1); $pdf->SetFont('Arial', '', 8); $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1); } else { $pdf->SetFont('Arial', '', 8); $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1); } $image = $this->rrdtool->doImage($data['RRD_CALL'], $out = 'PDF'); $img = $this->rrdtool->saveImage($image); $Y = $pdf->GetY(); $cell_height = $img['height'] * 0.23; $cell_width = $img['width'] * 0.23; $pdf->Image($img['file'], 17.5, $Y, $cell_width, $cell_height, 'PNG'); $pdf->CELL(120, $cell_height, '', 0, 1); unlink($img['file']); } $pdf->Output("pnp4nagios.pdf", "I"); }
} function PutLink($URL, $txt) { // Escribir un hiper-enlace $this->SetTextColor(0, 0, 255); $this->SetStyle('U', true); $this->Write(5, $txt, $URL); $this->SetStyle('U', false); $this->SetTextColor(0); } } $html = 'Ahora puede imprimir fácilmente texto mezclando diferentes estilos: <b>negrita</b>, <i>itálica</i>, <u>subrayado</u>, o ¡ <b><i><u>todos a la vez</u></i></b>!<br><br>También puede incluir enlaces en el texto, como <a href="http://www.fpdf.org">www.fpdf.org</a>, o en una imagen: pulse en el logotipo.'; $pdf = new PDF(); // Primera página $pdf->AddPage(); $pdf->SetFont('Arial', '', 20); $pdf->Write(5, 'Para saber qué hay de nuevo en este tutorial, pulse '); $pdf->SetFont('', 'U'); $link = $pdf->AddLink(); $pdf->Write(5, 'aquí', $link); $pdf->SetFont(''); // Segunda página $pdf->AddPage(); $pdf->SetLink($link); $pdf->Image('logo.png', 10, 12, 30, 0, '', 'http://www.fpdf.org'); $pdf->SetLeftMargin(45); $pdf->SetFontSize(14); $pdf->WriteHTML($html); $pdf->Output();
} else { $datos = $client->inventarioR($marca); $header = array('Nombre', 'Cantidad', 'Precio'); $descripcion = "<br><b>Inventario</b><br><b>Marca: </b>" . $marca; } $nombre = "<b>Descripción del reporte</b>"; $img = "imagenes/log.jpg"; //Antes de pasar los datos al PDF, hay que pasar las variables por la función html_entity_decode para decodificar los caracteres especiales, los acentos y las ñ // Siempre y cuando los datos extraídos de la BD sean UTF8 (no lo probe con otra codificación) $nombre = html_entity_decode($nombre); $descripcion = html_entity_decode($descripcion); //Creamos una nueva instancia de la clase $pdf = new PDF(); //Añádimos la primera página $pdf->AddPage(); $pdf->Image('log.jpg', 8, 8, 30); $pdf->Ln(12); $pdf->SetFont('Helvetica', '', 20); //$pdf->Ln(12); $pdf->Line(10, 30, 200, 30); $pdf->SetFontSize(17); $pdf->SetTextColor(44, 62, 80); $pdf->WriteHTML("Online Computer Shop"); $pdf->SetTextColor(0); $pdf->SetLeftMargin(155); $pdf->SetFontSize(14); $pdf->Ln(-15); $pdf->WriteHTML("<br><br><b>Fecha:</b> " . date("d/m/Y", time() - 25200)); $pdf->WriteHTML("<br><b>Hora:</b> " . date("H:i:s", time() - 25200) . "\n\n"); $pdf->SetLeftMargin(10); $pdf->Ln(14);
{ } //Instancia a classe gerador de pdf $pdf = new PDF(); //Define os atributos de propriedade do arquivo PDF $pdf->SetCreator('work | eventos'); $pdf->SetAuthor($usuarioNome . " - " . $empresaNome); $pdf->SetTitle('Emissão do Pedido'); $pdf->SetSubject('Relatório gerado automaticamente pelo sistema'); $pdf->AliasNbPages(); $pdf->AddPage(); //Recupera o nome da empresa $empresaNome = 'Consoli Eventos Ltda'; $edtPedidoId = $_GET["PedidoId"]; //Imprime o logotipo da empresa $pdf->Image('../image/logo_consoli2.jpg', 10, 10, 34); //Ajusta a fonte $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(0, 6, $empresaNome, 0, 0, 'R'); $pdf->SetFont('Arial', '', 9); $pdf->Ln(); $pdf->Cell(0, 4, 'Rua São Bento, 289 - Bairro Progresso - Rio do Sul - SC - CEP: 89160-000', 0, 0, 'R'); $pdf->Ln(); $pdf->Cell(0, 4, 'Fone: (47) 3520-1650 - consoli@consolieventos.com.br', 0, 0, 'R'); $pdf->Ln(14); $pdf->SetFont('Arial', 'B', 16); $pdf->SetFillColor(178, 178, 178); $pdf->Cell(0, 7, 'Pedido de Foto e Vídeo Nro ' . $dados_pedido["id"], 0, 0); $pdf->ln(); $pdf->SetFont('Arial', 'B', 11); $pdf->Cell(0, 5, 'Emissão: ' . DataMySQLRetornar($dados_pedido["data"]) . ' Por: ' . $dados_pedido["usuario_nome"], 0, 0);
$result = $dbconn->execute($query); list($numofresults) = $result->fields; if ($numofresults < 1) { die(_("No vulnerabilities recorded")); } set_time_limit(300); $chinese = false; // the language is not chinese by default //start pdf file, add page, set font $pdf = new PDF(); $pdf->AddGBFont('GB', ''); $pdf->AddPage(); $pdf->SetFont('Helvetica', 'B', 13); if ($is_pro) { if ($siteLogo != '') { $pdf->Image($siteLogo, 10, 11, 40); } else { $pdf->Image("/usr/share/ossim/www/pixmaps/logo_siempdf.png", 10, 11, 40); } } else { $pdf->Image("/usr/share/ossim/www/pixmaps/logo_ossimpdf.png", 10, 11, 40); } $pdf->Ln(); $pdf->Cell(0, 15, " {$siteBranding}: I.T Security Vulnerability Report", 1, 1, 'C', 0); $scan_time = _("Scan time"); $generated = _("Generated"); if (preg_match('/&#(\\d{4,5});/', $scan_time)) { $scan_time = mb_convert_encoding($scan_time, 'UTF-8', 'HTML-ENTITIES'); $generated = mb_convert_encoding($generated, 'UTF-8', 'HTML-ENTITIES'); $pdf->SetFont('GB', '', 9); $chinese = true;
$str3 = "select jumlah,idkomponen,a.karyawanid,c.plus from " . $dbname . ".sdm_gaji_vw a \r\n left join " . $dbname . ".sdm_ho_component c on a.idkomponen=c.id\r\n where a.sistemgaji='Bulanan' and a.periodegaji='" . $perod . "' "; //exit("Error:".$str3); $res3 = mysql_query($str3, $conn); while ($bar3 = mysql_fetch_assoc($res3)) { if ($bar3['plus'] == '1') { if ($bar3['jumlah'] != '') { $arrValPlus[$bar3['karyawanid']][$bar3['idkomponen']] = $bar3['jumlah']; } } elseif ($bar3['plus'] == '0') { if ($bar3['jumlah'] != '') { $arrValMinus[$bar3['karyawanid']][$bar3['idkomponen']] = $bar3['jumlah']; } } } foreach ($arrKary as $dtKary) { $pdf->Image('images/logo.jpg', $pdf->GetX(), $pdf->GetY(), 10); $pdf->SetX($pdf->getX() + 10); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(75, 12, $_SESSION['org']['namaorganisasi'], 0, 1, 'L'); $pdf->SetFont('Arial', '', 6); $pdf->Cell(71, 4, $_SESSION['lang']['slipGaji'] . ': ' . $arrBln[$idBln] . "-" . $bln[0], 'T', 0, 'L'); $pdf->SetFont('Arial', '', 6); $pdf->Cell(25, 4, 'Printed on: ' . date('d-m-Y: H:i:s'), "T", 1, 'R'); $pdf->SetFont('Arial', '', 6); $pdf->Cell(25, 4, $_SESSION['lang']['nik'] . "/" . $_SESSION['lang']['tmk'], 0, 0, 'L'); $pdf->Cell(35, 4, ": " . $arrNik[$dtKary] . "/" . tanggalnormal($arrTglMsk[$dtKary]), 0, 0, 'L'); $pdf->Cell(18, 4, $_SESSION['lang']['unit'] . "/" . $_SESSION['lang']['bagian'], 0, 0, 'R'); $pdf->Cell(28, 4, ': ' . $idAfd . " / " . $arrBag[$dtKary], 0, 1, 'L'); $pdf->Cell(25, 4, $_SESSION['lang']['namakaryawan'] . ":", 0, 0, 'L'); $pdf->Cell(35, 4, ': ' . $arrNmKary[$dtKary], 0, 0, 'L'); $pdf->Cell(18, 3, $_SESSION['lang']['jabatan'], 0, 0, 'R');
$pdf->Cell(35, 5, $_SESSION['lang']['keterangan'], 0, 0, 'L'); $pdf->Cell(2, 5, ":", 0, 0, 'L'); $pdf->Cell(33, 5, $bar1->keterangan, 0, 0, 'L'); $pdf->Ln(); $pdf->Ln(); } $str1 = "select * from " . $dbname . ".pad_photo\r\n where idlahan = '" . $idlahan . "'"; $res1 = mysql_query($str1); while ($bar1 = mysql_fetch_object($res1)) { $pdf->Cell(13, 5, $_SESSION['lang']['photo'], 0, 0, 'L'); $pdf->Cell(2, 5, ":", 0, 0, 'L'); $pdf->Cell(73, 5, $bar1->filename, 0, 0, 'L'); $pdf->Ln(); $yey = $pdf->GetY(); $path = 'filepad/' . $bar1->filename; $pdf->Image($path, 25, $yey, 70); $pdf->SetY($yey + 80); $pdf->Ln(); } $pdf->Output(); exit; break; case 'update': $str = "update " . $dbname . ".pad_lahan \r\n set pemilik=" . $pemilik . ", \r\n unit='" . $unit . "', \r\n lokasi='" . $lokasi . "', \r\n luas=" . $luas . ", \r\n luasdapatditanam=" . $bisaditanam . ", \r\n rptanaman=" . $rptanaman . ", \r\n rptanah=" . $rptanah . ", \r\n totalgantirugi=" . ($rptanaman + $rptanah) . ", \r\n statuspermintaandana=" . $statuspermintaandana . ", \r\n statuspermbayaran=" . $statuspermbayaran . ", \r\n kodeblok='" . $blok . "', \r\n statuskades=" . $statuskades . ", \r\n statuscamat=" . $statuscamat . ", \r\n tanggalpengajuan=" . $tanggalpermintaan . ", \r\n tanggalbayar=" . $tanggalbayar . ", \r\n tanggalkades=" . $tanggalkades . ", \r\n tanggalcamat=" . $tanggalcamat . ", \r\n updateby=" . $_SESSION['standard']['userid'] . ", \r\n biayakades=" . $biayakades . ", \r\n biayacamat=" . $biayacamat . ", \r\n biayamatrai=" . $biayamatrai . ", \r\n keterangan='" . $keterangan . "', \r\n nosurat='" . $nosurat . "', \r\n batastimur='" . $batastimur . "', \r\n batasbarat='" . $batasbarat . "', \r\n batasutara='" . $batasutara . "', \r\n batasselatan='" . $batasselatan . "'\r\n where idlahan=" . $mid; if (mysql_query($str)) { } else { echo " Gagal," . addslashes(mysql_error($conn)); exit; } break; case 'insert':
} $pdf = new PDF('L', 'mm', 'A4'); $pdf->AddPage(); $th = $_REQUEST['th']; $kdunit = $_REQUEST['kdunit']; $renstra = th_renstra($th); $font = 'Arial'; $noborder = 0; $border = 1; $size = 10; $ln = 5; $margin = 5; $tinggi = 275; $y = $pdf->GetY(); $pdf->SetY($y); $pdf->Image('../../css/images/logo_lapan.jpg', 135, 5, 30, 30, 'jpg'); $y = $pdf->GetY(); $pdf->Cell(0, 30, '', '', 1, 'L'); $oSatker = mysql_query("SELECT NAMA FROM t_satker WHERE KDUNITKERJA = '{$kdunit}' "); $Satker = mysql_fetch_array($oSatker); $kdeselon1 = substr($kdunit, 0, 3) . '000'; $oEselon = mysql_query("SELECT nama FROM tb_unitkerja WHERE kdunit = '{$kdeselon1}' "); $Eselon = mysql_fetch_array($oEselon); $w = array(0, 290); $pdf->SetFont($font, 'B', $size + 2); $pdf->SetX($margin + $w[0]); $pdf->Cell($w[1], $ln, 'RENCANA AKSI DARI PENETAPAN KINERJA', '', 1, 'C'); $pdf->SetX($margin + $w[0]); $pdf->Cell($w[1], $ln, trim(strtoupper(nm_unit($kdunit))), '', 1, 'C'); $pdf->Ln() * 2; $w1 = array(35, 40, 18, 9, 40, 9, 40, 9, 40, 9, 40);
//ระยะห่าง ##-- PAGE 1 ##---- เลขหน้า ---------- $pdf->SetFont('angsana', '', 12); $pdf->setXY($x_absolute + 160, $y_absolute - 10); $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'หน้า 1')); ##---- เลขหน้า ---------- ##-- head table ----- $pdf->head_table(70, 20, 25, 'b'); //($x_absolute,$y_absolute,$fontSize,$b) //หัวโปรแกรม $pdf->SetFont('angsana', 'BU', 20); //$pdf->setXY( $x_absolute, $y_absolute + ($r*1) ); $pdf->setXY(60, $y_absolute + $r * 1); $pdf->SetFont('angsana', '', 16); $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'คลินิคผู้ป่วยนอกโรคลมชัก โรงพยาบาลศรีนครินทร์')); $pdf->Image('../icon/px.jpeg', 10, 12, 20, 0, '', ''); //Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]]) $pdf->setXY(120, $y_absolute + $r * 2); $pdf->SetFont('angsana', '', 13); ##-- วันที่ วัน เดือน ปี if (!empty($b) && !empty($e)) { //$pdf->MultiCell( 0 , 0 , iconv( 'UTF-8','cp874' , 'ระหว่างวันที่ '.$b.' ถึง '.$e )); ## formate date in table is yyyy-mm-ddd $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'ระหว่างวันที่ ' . $pdf->date_thai_format($b) . ' ถึง ' . $pdf->date_thai_format($e))); ## formate date in table is yyyy-mm-ddd // ค่าที่ส่งมา 1-10-2557 // $str_query="SELECT * FROM ESN.`04-monitoring`where `MonitoringDate` between '1467-05-04' and '1990-1-1' ; "; // date_eng_format($begin) } ##--หัวตาราง $pdf->setXY($x_absolute, $y_absolute + $r * 3.5); $pdf->SetFont('angsana', '', 16);
$pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', ' ' . $he)); /* $pdf->setXY( 10, $y_absolute + ($r*3) ); $pdf->SetFont('angsana','',13); $pdf->MultiCell( 0 , 0 , iconv( 'UTF-8','cp874' ,' '.$he2)); */ $pdf->setXY(10, $y_absolute + $r * 3); $pdf->SetFont('angsana', '', 13); $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', ' ' . $he3)); #-- เส้น hr หัวตาราง --- $pdf->setXY(10, $y_absolute + $r * 4); $pdf->Cell(190, 1, iconv('UTF-8', 'cp874', ''), 1, 0, 'C', true); //$pdf->Image('icon/px.jpeg',10,12,20,0,'','');//Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]]) $pdf->setXY(30, 10); #$pdf->Image('icon/Logo-cleft.jpg',10,12,40,0,'','');//Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]]) $pdf->Image('1.gif', 10, 12, 50, 0, '', ''); //Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]]) $pdf->setXY(90, $y_absolute + $r * 6); $pdf->SetFont('angsana', 'BU', 30); $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', ' ' . 'RECEIPT')); $pdf->setXY(10, $y_absolute + $r * 8); $pdf->SetFont('angsana', '', 15); $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', '________ ' . $arr_va[3] . ' ' . $arr_va[2] . '_____________________________ ' . 'has paid for the Registration Fee')); $pdf->setXY(10, $y_absolute + $r * 9); $pdf->SetFont('angsana', '', 15); $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'Pre - congress 17 th November 2015, amount of' . '__________________________Baht/USD')); $pdf->setXY(10, $y_absolute + $r * 10); $pdf->SetFont('angsana', '', 15); $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'Congress 18 th - 20 th November 2015, amount of' . '_________________________Baht/USD')); $pdf->setXY(10, $y_absolute + $r * 11); $pdf->SetFont('angsana', '', 15);
/** * Export PDF document * * @param string $where WHERE clause for SQL statement */ function pdfexport($WHERE) { global $config; $ypos = $config['pdf_font_size']; // Match the font size for proper vertical offset $page_width = $config['pdf_page_width']; $margin = $config['pdf_margin']; $left_margin = $config['pdf_left_margin']; $right_margin = $config['pdf_right_margin']; $mediaimg_width = $config['pdf_image_media_width']; $font_size = $config['pdf_font_size']; $image_height = $config['pdf_image_height']; $image_width = $config['pdf_image_width']; $font_title = $config['pdf_font_title']; $font_plot = $config['pdf_font_plot']; $text_length = $config['pdf_text_length']; $tempfolder = cache_get_folder(''); if ($config['cache_pruning']) { cache_prune_folder($tempfolder, 3600, false, false, 'videodb*.pdf'); } $filename = $tempfolder . 'videodb' . date('His', time()) . '.pdf'; // setup pdf class $pdf = new PDF(); $pdf->Open($filename); $pdf->VerifyFont($font_title); $pdf->VerifyFont($font_title, 'B'); $pdf->VerifyFont($font_plot); $pdf->AddPage(); $pdf->SetRightMargin($right_margin); // add downscaling if ($config['pdf_scale']) { $pdf->Scale = $config['pdf_scale']; $pdf->max_width = $config['pdf_image_max_width']; $pdf->max_height = $config['pdf_image_max_height']; } // get data $result = iconv_array('utf-8', 'iso-8859-1', exportData($WHERE)); foreach ($result as $row) { set_time_limit(300); // rise per movie execution timeout limit if safe_mode is not set in php.ini $title = $row['title']; if ($row['subtitle']) { $title .= ' - ' . $row['subtitle']; } if ($row['diskid'] || $row['mediatype']) { $title .= ' ['; if ($row['mediatype']) { $title .= $row['mediatype'] . ', '; } if ($row['diskid']) { $title .= $row['diskid']; } $title = preg_replace('/, $/', '', $title) . ']'; } // get drilldown url for image $imdb = $row['imdbID']; $link = $imdb ? engineGetContentUrl($imdb, engineGetEngine($imdb)) : ''; // title $pdf->SetFont($font_title, 'B', $font_size); $pdf->SetXY($left_margin + $image_width + $margin, $ypos); $pdf->Cell(0, 0, $title, 0, 1, 'L', 0, $link); // [muddle] technical details unset($tech['V']); if ($row['video_width'] and $row['video_height']) { $vw = $row['video_width']; $vh = $row['video_height']; $tech['V'] = "Video: "; if ($vw > 1920) { $tech['V'] .= "UHD " . $vw . "x" . $vh; } elseif ($vw > 1280) { $tech['V'] .= "HD 1080p"; } elseif ($vw == 1280 or $vh == 720) { $tech['V'] .= "HD 720p"; } elseif ($vw == 720 or $vw == 704) { $tech['V'] .= "SD "; if ($vh == 480) { $tech['V'] .= "NTSC"; } elseif ($vh == 576) { $tech['V'] .= "PAL"; } else { $tech['V'] .= $vw . "x" . $vh; } } else { $tech['V'] .= "LORES " . $vw . "x" . $vh; } } unset($tech['A']); if ($row['audio_codec']) { $tech['A'] = "Audio: " . $row['audio_codec']; } unset($tech['D']); if ($row['created']) { $tech['D'] = "Date: " . $row['created']; } $techinfo = implode(", ", $tech); $pdf->SetFont($font_title, 'B', $font_size - 3); $pdf->SetXY($left_margin + $image_width + $margin, $ypos + 4); $pdf->Cell(0, 0, $techinfo, 0, 1, 'L', 0); // plot $plot = leftString($row['plot'], $text_length); $pdf->SetFont($font_plot, '', $font_size - 1); $pdf->SetXY($left_margin + $image_width + $margin, $ypos + 3 + 3); $pdf->SetLeftMargin($left_margin + $image_width + $margin); $pdf->WriteHTML($plot); // image $file = getThumbnail($row['imgurl']); if (preg_match('/^img.php/', $file)) { $file = img(); } // image file present? if ($file) { $pdf->Image($file, $left_margin, $ypos - 2, $image_width, $image_height, '', $link); } // add mediatype image if ($type_image = getMediaImage($row['mediatype'])) { $pdf->Image('./images/media/' . $type_image, $page_width - $mediaimg_width - $right_margin, $ypos - 2, $mediaimg_width, 0, '', ''); } // new position $ypos += $margin; if ($file or $plot) { $ypos += max($image_height, $font_size); } else { $ypos += $font_size; } if ($ypos > 250) { $ypos = $config['pdf_font_size']; $pdf->AddPage(); } } $pdf->Output('videoDB.pdf', 'D'); // get rid of temp file @unlink($filename); }