public function listadoAction($aditionalFilter = '')
 {
     $pdf = new PDF("P", 'mm', "A4");
     $pdf->SetTopMargin(15);
     $pdf->SetLeftMargin(10);
     $pdf->AliasNbPages();
     $pdf->SetFillColor(210);
     $per = new Permisos();
     $em = new EntityManager($per->getConectionName());
     $query = "select t1.IdPerfil,t1.Permisos,t4.Perfil,t2.Titulo as Opcion,t3.Titulo as SubOpcion\n                from AgtPermisos as t1,menu as t2, submenu as t3, perfiles as t4\n                where t1.IDOpcion=t2.IDOpcion\n                and t1.IDOpcion=t3.IDOpcion\n                and t3.Id=t1.IDSubOpcion\n                and t1.IdPerfil=t4.Id\n                order by t1.IdPerfil,t1.IDOpcion,t1.IDSubOpcion;";
     $em->query($query);
     $rows = $em->fetchResult();
     $em->desConecta();
     unset($per);
     $perant = "";
     $opcant = "";
     foreach ($rows as $row) {
         if ($perant != $row['IDPerfil']) {
             $pdf->AddPage();
             $pdf->Cell(40, 5, $row['Perfil'], 0, 0, "L", 1);
         } else {
             $pdf->Cell(40, 5, "", 0, 0, "L", 0);
         }
         $pdf->SetFillColor(240);
         if ($opcant != $row['Opcion']) {
             $pdf->Cell(30, 5, $row['Opcion'], 0, 0, "L", 1);
         } else {
             $pdf->Cell(30, 5, "", 0, 0, "L", 0);
         }
         $perant = $row['IDPerfil'];
         $opcant = $row['Opcion'];
         $pdf->Cell(40, 5, $row['SubOpcion'], 0, 0, "L", 0);
         $permisos = array('C' => substr($row['Permisos'], 0, 1), 'I' => substr($row['Permisos'], 1, 1), 'B' => substr($row['Permisos'], 2, 1), 'A' => substr($row['Permisos'], 3, 1), 'L' => substr($row['Permisos'], 4, 1), 'E' => substr($row['Permisos'], 5, 1));
         $pdf->Cell(13, 5, $permisos['C'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['I'], 0, 0, "C", 1);
         $pdf->Cell(13, 5, $permisos['B'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['A'], 0, 0, "C", 1);
         $pdf->Cell(13, 5, $permisos['L'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['E'], 0, 1, "C", 1);
         $pdf->SetFillColor(210);
     }
     $archivo = "docs/docs" . $_SESSION['emp'] . "/pdfs/" . md5(date('d-m-Y H:i:s')) . ".pdf";
     $pdf->Output($archivo, 'F');
     $this->values['archivo'] = $archivo;
     return array('template' => '_global/listadoPdf.html.twig', 'values' => $this->values);
 }
 $statement->nextRowSet();
 $statement->closeCursor();
 $statement = $db->prepare('SELECT sa_examenes_himno.nota_himno as NOTA FROM sa_examenes_himno WHERE sa_examenes_himno.cod_solicitud = ' . $codsHimno[$i]);
 $statement->execute();
 $tablaNota = $statement->fetchALL(PDO::FETCH_ASSOC);
 foreach ($tablaNota as $filaNota) {
     $calificacion = $filaNota['NOTA'];
     $nota_letras = convertir_a_letras($calificacion);
 }
 $statement->nextRowSet();
 $statement->closeCursor();
 $pdf->AddPage();
 $pdf->Image($maindir . 'assets/img/Encabezado de documentos.jpg', 0.4, 0.05, 20.96, 3.22, 'JPG');
 $pdf->Image($maindir . "assets/img/Pie de documentos.jpg", 0.4, 19.1, 20.88, 13.7, 'JPG');
 $pdf->SetRightMargin(1.0);
 $pdf->SetLeftMargin(1.0);
 $pdf->SetFont('Calibri', 'B', 11);
 $pdf->Cell(0, -0.45, utf8_decode("FACULTAD DE CIENCIAS JURÍDICAS    "), 0, 0, 'R');
 $pdf->Ln(0.2);
 $pdf->SetFont('Arial', '', 10);
 $pdf->Cell(0, 0, utf8_decode("Teléfono: 2232-2290    "), 0, 1, 'R');
 $pdf->Ln(0.41);
 $pdf->Cell(0, 0, utf8_decode("Edificio A-2    "), 0, 1, 'R');
 $pdf->Ln(0.41);
 $pdf->Cell(0, 0, utf8_decode("Ciudad Universitaria    "), 0, 1, 'R');
 $pdf->Ln(0.41);
 $pdf->Cell(0, 0, utf8_decode("Tegucigalpa, Honduras    "), 0, 1, 'R');
 $pdf->ln(3.5);
 $pdf->SetFont('Cambria', 'BI', 16);
 $pdf->Cell(0, 0, utf8_decode("CONSTANCIA DE HIMNO"), 0, 1, 'C');
 $pdf->Ln(2.9);
Exemplo n.º 3
0
         //Número de página
         $this->Cell(0, 10, iconv('utf-8', 'cp1252', 'Página ') . $this->PageNo() . '/{nb}', 0, 0, 'C');
         $this->Line(15, 260, 200, 260);
     }
     function __construct()
     {
         //Llama al constructor de su clase Padre.
         //Modificar aka segun la forma del papel del reporte
         parent::__construct('P', 'mm', 'A4');
         //parent::__construct('P','mm','Letter');
     }
 }
 //Creación del objeto de la clase heredada
 $pdf = new PDF();
 $pdf->SetTopMargin(5.4);
 $pdf->SetLeftMargin(1.5);
 $pdf->AliasNbPages();
 $pdf->SetFont('Arial', '', 9);
 $pdf->AddPage();
 $pdf->Ln();
 //Construcción de la tabla a mostrar
 $pdf->SetY(90);
 $pdf->SetFont('Arial', 'b', 11);
 $pdf->Text(23, 80, iconv('utf-8', 'cp1252', 'Item'));
 $pdf->Text(35, 80, iconv('utf-8', 'cp1252', 'Productos'));
 $pdf->Text(125, 80, 'Total Ventas');
 $pdf->Text(167, 80, iconv('utf-8', 'cp1252', 'Fecha'));
 $pdf->SetFont('Arial', '', 10);
 $pdf->Line(20, 82, 190, 82);
 $pdf->Line(20, 83, 190, 83);
 $j = 0;
Exemplo n.º 4
0
draw_frame($certificate->bordercolor, $orientation);
print_watermark($certificate->printwmark, $orientation);
print_seal($certificate->printseal, $orientation, 440, 590, '', '');
print_signature($certificate->printsignature, $orientation, 85, 530, '', '');
// Add text
$pdf->SetTextColor(0, 0, 128);
cert_printtext(48, 170, 'C', 'Helvetica', 'B', 26, utf8_decode(get_string("titleportrait", "certificate")));
$pdf->SetTextColor(0, 0, 0);
cert_printtext(45, 230, 'C', 'Times', 'B', 20, utf8_decode(get_string("introportrait", "certificate")));
cert_printtext(45, 280, 'C', 'Helvetica', '', 30, utf8_decode($studentname));
cert_printtext(45, 330, 'C', 'Helvetica', '', 20, utf8_decode(get_string("statementportrait", "certificate")));
cert_printtext(45, 380, 'C', 'Helvetica', '', 20, utf8_decode($course->fullname));
cert_printtext(45, 420, 'C', 'Helvetica', '', 20, utf8_decode(get_string("ondayportrait", "certificate")));
cert_printtext(45, 460, 'C', 'Helvetica', '', 14, utf8_decode($certificatedate));
cert_printtext(45, 540, 'C', 'Times', '', 10, utf8_decode($grade));
cert_printtext(45, 551, 'C', 'Times', '', 10, utf8_decode($outcome));
cert_printtext(45, 562, 'C', 'Times', '', 10, utf8_decode($credithours));
cert_printtext(45, 720, 'C', 'Times', '', 10, utf8_decode($code));
$i = 0;
if ($certificate->printteacher) {
    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
    if ($teachers = get_users_by_capability($context, 'mod/certificate:printteacher')) {
        foreach ($teachers as $teacher) {
            $i++;
            cert_printtext(85, 590 + $i * 12, 'L', 'Times', '', 12, utf8_decode(fullname($teacher)));
        }
    }
}
cert_printtext(58, 600, '', '', '', '', '');
$pdf->SetLeftMargin(85);
$pdf->WriteHTML($customtext);
Exemplo n.º 5
0
                                $count++;
                            }
                        }
                    } elseif ($width + $wordwidth <= $maxwidth) {
                        $width += $wordwidth + $space;
                        $text .= $word . ' ';
                    } else {
                        $width = $wordwidth + $space;
                        $text = rtrim($text) . "\n" . $word . ' ';
                        $count++;
                    }
                }
                $text = rtrim($text) . "\n";
                $count++;
            }
            $text = rtrim($text);
            return $count;
        }
    }
    $pdf = new PDF('L', 'cm', 'A4');
    $pdf->AliasNbPages();
    $pdf->SetLeftMargin(1);
    $pdf->SetRightMargin(1);
    $pdf->AddPage();
    $pdf->Table();
    $filename = "Laporan Proyek " . $ProjectName . ".pdf";
    $pdf->Output($filename, "D");
}
?>
 
Exemplo n.º 6
0
        $rows[] = $data;
    }
} else {
    $query = $sql->prepare("SELECT * FROM shelftags WHERE id=? order by upc");
    $result = $sql->execute($query, array($id));
    while ($row = $sql->fetch_row($result)) {
        $rows[] = $row;
    }
}
$pdf = new PDF('P', 'mm', 'Letter');
//start new instance of PDF
$pdf->Open();
//open new PDF Document
$pdf->SetTopMargin(40);
//Set top margin of the page
$pdf->SetLeftMargin(4);
//Set left margin of the page
$pdf->SetRightMargin(0);
//Set the right margin of the page
//$pdf->SetAutoPageBreak(False,15);
$pdf->AddPage();
//Add a page
//Set increment counters for rows
$i = 9;
//x location of barcode
$j = 33;
//y locaton of barcode
$l = 28;
//y location of size and price on label
$k = 25;
//x location of date and price on label
            $this->Cell(59, 3, '', 0, 0, 'C');
            $this->Cell(80, 3, 'Cagua Edo. Aragua. Telfs: 0244-3964557 / 0426-5125749', 0, 1, 'C');
            //Linea 5
            $this->Cell(59, 3, '', 0, 0, 'C');
            $this->Cell(80, 3, '0416-0458957 / 0426-5180385 / 0424-3261656', 0, 1, 'C');
            $this->Ln(10);
        }
        parent::Header();
    }
}
if (isset($imp)) {
    $pdf = new PDF('L', 'mm', 'Legal');
} else {
    $pdf = new PDF('P', 'mm', 'Letter');
}
$pdf->SetLeftMargin(6);
$pdf->SetRightMargin(7);
$pdf->Open();
$pdf->AddPage();
//T�tulo del Reporte
$pdf->Ln(3);
$pdf->SetFont('times', 'B', 12);
$pdf->Cell(1, 4, 'Clientes' . $text, 0, 1);
$pdf->Cell(1, 10, "Listado de Morosos Productos con" . $giros . utf8_decode(" o más cuotas vencidas"), 0, 1, 'L');
$pdf->SetFont('Arial', '', 10);
//Connect to database
mysql_select_db($database_tecno, $tecno);
$queryCliente = "SELECT *, COUNT(giro) as giro, CONCAT(nombres,' ', primerApellido) as fullName, CONCAT(telefono,' / ',celular) as telefonos FROM datospersonales, detallescliente, refpersonal, inflaboral WHERE status<>1 AND fechaV <'{$today}' AND datospersonales.id = detallescliente.id  AND datospersonales.id = refpersonal.id AND datospersonales.id=inflaboral.id AND inflaboral.ministerio= '{$tpCli}' AND detallescliente.tipo = 1 GROUP BY detallescliente.idArt HAVING COUNT(giro) >= '{$giros}' ORDER BY datospersonales.nombres ASC";
$cliente = mysql_query($queryCliente, $tecno) or die(mysql_error());
$rowCliente = mysql_fetch_assoc($cliente);
$totalRowsCliente = mysql_num_rows($cliente);
     $orientacion = $fila['ORIENTACION'];
 }
 $cadenaOrientacion = ", con orientación en " . $orientacion . "";
 $cadenaPlanEstudio = "(" . $planEstudio . ")";
 $fechaPalabras = $_POST["cadena"];
 $statement->nextRowSet();
 $statement->closeCursor();
 $statement = $db->prepare('UPDATE sa_solicitudes SET fecha_exportacion = "' . $fechaExp . '" WHERE codigo = ' . $codsConstancias[$i] . '');
 $statement->execute();
 $statement->nextRowSet();
 $statement->closeCursor();
 $pdf->AddPage();
 $pdf->Image($maindir . 'assets/img/Encabezado constancias.jpg', 20.0, 7, 176, 33.2, 'JPG');
 $pdf->ln(65);
 $pdf->SetFont('Cambria', 'BI', 16);
 $pdf->SetLeftMargin(22);
 $pdf->SetRightMargin(22);
 $pdf->Cell(0, 0, utf8_decode("C O N S T A N C I A"), 0, 1, 'C');
 //Definir la siguente cadena
 //$cadenaOrientacion = "";
 $pdf->Ln(19);
 $pdf->SetFont('Cambria', 'I', 16);
 $pdf->SetLeftMargin(22);
 $pdf->SetRightMargin(22);
 $pdf->newFlowingBlock(170, 10, 0, 'J');
 $pdf->SetFont('Cambria', 'I', 14);
 $pdf->WriteFlowingBlock(utf8_decode('El Suscrito, Secretario de la Facultad de Ciencias Jurídicas de la Universidad Nacional ' . 'Autónoma de Honduras, por medio de la presente HACE CONSTAR: '));
 $pdf->SetFont('Cambria', 'I', 14);
 $pdf->WriteFlowingBlock(utf8_decode('Que el(la) alumno(a)'));
 $pdf->SetFont('Cambria', 'BI', 14);
 $pdf->WriteFlowingBlock(utf8_decode(' ' . $nombreTemporal . ' '));
Exemplo n.º 9
0
 public static function attendanceReportMy($details, $data)
 {
     $pdf = new PDF();
     $pdf->SetLeftMargin(25);
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 16);
     $pdf->Cell(0, 15, 'Attendance Report', 0, 0, "C");
     $pdf->Ln(25);
     $pdf->attenDetailsMy($details);
     $pdf->Ln(10);
     $pdf->makeAttenTableMy($data);
     $pdf->Ln(10);
     $pdf->Output("Results Report.pdf", "I");
 }
Exemplo n.º 10
0
 unset($descendant_main_person2);
 if ($screen_mode == 'STAR') {
     if ($generateIndex != 0) {
         if (isset($genarray[$arraynr])) {
             $temppar = $genarray[$arraynr]["par"];
         }
         while (isset($genarray[$temppar]["gen"]) and $genarray[$temppar]["gen"] == $generateIndex - 1) {
             $lst_in_array += $genarray[$temppar]["nrc"];
             $temppar++;
         }
     }
     $nrchldingen = 0;
 } else {
     if ($descendant_report == true) {
         if ($screen_mode == 'PDF') {
             $pdf->SetLeftMargin(10);
             $pdf->Cell(0, 2, "", 0, 1);
             $pdf->SetFont('Arial', 'BI', 14);
             $pdf->SetFillColor(200, 220, 255);
             if ($pdf->GetY() > 250) {
                 $pdf->AddPage();
                 $pdf->SetY(20);
             }
             $pdf->Cell(0, 8, pdf_convert(__('generation ')) . $number_roman[$generateIndex + 1], 0, 1, 'C', true);
             $pdf->SetFont('Arial', '', 12);
         } elseif ($screen_mode == 'RTF') {
             $rtf_text = __('generation ') . $number_roman[$generateIndex + 1];
             $sect->writeText($rtf_text, $arial14, $parHead);
         } else {
             echo '<div class="standard_header fonts">' . __('generation ') . $number_roman[$generateIndex + 1] . '</div>';
         }
Exemplo n.º 11
0
draw_frame_letter($certificate->bordercolor, $orientation);
print_watermark_letter($certificate->printwmark, $orientation);
print_seal($certificate->printseal, $orientation, 440, 590, '', '');
print_signature($certificate->printsignature, $orientation, 98, 530, '', '');
// Add text
$pdf->SetTextColor(0, 0, 128);
cert_printtext(58, 170, 'C', 'Helvetica', 'B', 28, utf8_decode(get_string("titleportrait", "certificate")));
$pdf->SetTextColor(0, 0, 0);
cert_printtext(58, 230, 'C', 'Times', 'B', 20, utf8_decode(get_string("introportrait", "certificate")));
cert_printtext(58, 280, 'C', 'Helvetica', '', 30, utf8_decode($studentname));
cert_printtext(58, 330, 'C', 'Helvetica', '', 20, utf8_decode(get_string("statementportrait", "certificate")));
cert_printtext(58, 380, 'C', 'Helvetica', '', 20, utf8_decode($course->fullname));
cert_printtext(58, 420, 'C', 'Helvetica', '', 20, utf8_decode(get_string("ondayportrait", "certificate")));
cert_printtext(58, 460, 'C', 'Helvetica', '', 14, utf8_decode($certificatedate));
cert_printtext(58, 540, 'C', 'Times', '', 10, utf8_decode($grade));
cert_printtext(58, 551, 'C', 'Times', '', 10, utf8_decode($outcome));
cert_printtext(58, 562, 'C', 'Times', '', 10, utf8_decode($credithours));
cert_printtext(58, 720, 'C', 'Times', '', 10, utf8_decode($code));
$i = 0;
if ($certificate->printteacher) {
    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
    if ($teachers = get_users_by_capability($context, 'mod/certificate:printteacher')) {
        foreach ($teachers as $teacher) {
            $i++;
            cert_printtext(98, 590 + $i * 12, 'L', 'Times', '', 12, utf8_decode(fullname($teacher)));
        }
    }
}
cert_printtext(58, 600, '', '', '', '', '');
$pdf->SetLeftMargin(98);
$pdf->WriteHTML($customtext);
Exemplo n.º 12
0
//If Direct Deposit is your payment option
if ($DD_NAME != "") {
    $pdf->SetY($y_axis_initial + ($row_height * $max + 12));
    $pdf->SetX(20);
    $pdf->SetFont('Arial', 'B', 6);
    $pdf->MultiCell(100, 3, "\n" . $pdf->Image('images/icons/deposit.jpeg', 3, 205, 0, 5, JPG) . "Direct Deposit:-\n" . "- Bank: {$DD_BANK}\n" . "- Name: {$DD_NAME}\n" . "- Branch/BSB: {$DD_BSB}\n" . "- Account: {$DD_ACC}\n" . "{$DD_INS}\n" . "\n", 0, 'L', FALSE);
}
//If PayPal is your payment option
if ($PP_ID != "") {
    $pdf->SetY($y_axis_initial + ($row_height * $max + 35));
    $pdf->SetX(20);
    $pdf->SetFont('Arial', 'B', 6);
    $pdf->MultiCell(100, 3, "\n" . "\n" . "PayPal Credit Card Processing:-", 0, 'L', FALSE);
    $pdf->SetLink($link);
    $pdf->Image('images/paypal/pay_now.gif', 5, 230, 15, 0, '', 'https://www.paypal.com/cmd=_xclick&business=' . $PP_ID . '&item_name=Payment%20for%20invoice%20' . $invoice_id . '&item_number=' . $invoice_id . '&description=Invoice%20for%20' . $invoice_id . '&amount=' . $pamount . '&no_note=Thankyou%20for%20your%20buisness.&currency_code=' . $currency_code . '&lc=' . $country . '&bn=PP-BuyNowBF');
    $pdf->SetLeftMargin(20);
    //$pdf->SetFontSize(14);
    $pdf->WriteHTML($html);
}
if ($PAYMATE_LOGIN != "") {
    $pdf->SetY($y_axis_initial + ($row_height * $max + 45));
    $pdf->SetX(20);
    $pdf->SetFont('Arial', 'B', 6);
    $pdf->MultiCell(100, 3, "\n" . "\n" . "Paymate Processing:-", 0, 'L', FALSE);
    $pdf->SetLink($link);
    $pdf->Image('images/paymate/paymate_cc.gif', 5, 242, 15, 0, '', 'https://www.paymate.com/PayMate/ExpressPayment?mid=' . $PAYMATE_LOGIN . '&amt=' . $paymate_amt . '&ref=Payment%20for%20invoice%20' . $invoice_id . '&currency=' . $currency_code . '&amt_editable=N&pmt_sender_email=' . $cusemail . '&pmt_contact_firstname=' . $cusnamef . '&pmt_contact_surname=' . $cusnamel . '&pmt_contact_phone=' . $cusphone . '&regindi_state=' . $cusstate . '&regindi_address1=' . $cusaddress . '&regindi_sub=' . $cuscity . '&regindi_pcode=' . $cuszip . '');
    $pdf->SetLeftMargin(20);
    //$pdf->SetFontSize(14);
    $pdf->WriteHTML($html2);
}
if ($PP_ID == "" & $CHECK_PAYABLE == "" & $DD_NAME == "" & $PAYMATE_LOGIN == "") {
Exemplo n.º 13
0
 //initialize pdf generation
 @($persDb = $db_functions->get_person($family_id));
 // *** Use person class ***
 $pers_cls = new person_cls();
 $pers_cls->construct($persDb);
 $name = $pers_cls->person_name($persDb);
 $title = pdf_convert(__('Ancestor sheet') . __(' of ') . $name["standard_name"]);
 $pdf = new PDF();
 $pdf->SetTitle($title);
 $pdf->SetAuthor('Huub Mons (pdf: Yossi Beck)');
 $pdf->SetTopMargin(4);
 $pdf->SetAutoPageBreak(false);
 //$pdf->SetLineWidth(3);
 //$pdf->AddPage();
 $pdf->AddPage("L");
 $pdf->SetLeftMargin(16);
 $pdf->SetRightMargin(16);
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Ln(2);
 $name = $pers_cls->person_name($persDb);
 $pdf->MultiCell(0, 10, __('Ancestor sheet') . __(' of ') . $name["standard_name"], 0, 'C');
 $pdf->Ln(2);
 $pdf->SetFont('Arial', '', 8);
 // Output the cells:
 $posy = $pdf->GetY();
 $posx = $pdf->GetX();
 // for each generation check if there is anyone, otherwise don't display those rows
 $exist = false;
 for ($x = 16; $x < 32; $x++) {
     if ($gedcomnumber[$x] != '') {
         $exist = true;
Exemplo n.º 14
0
        $this->NbVal = count($data);
        foreach ($data as $l => $val) {
            $p = sprintf('%.2f', $val / $this->sum * 100) . '%';
            $legend = str_replace(array('%l', '%v', '%p'), array($l, $val, $p), $format);
            $this->legends[] = $legend;
            $this->wLegend = max($this->GetStringWidth($legend), $this->wLegend);
        }
    }
}
//
//
//	Begin Report Generation
//
//
$pdf = new PDF();
$pdf->SetLeftMargin(5);
$pdf->SetRightMargin(5);
include_once "loadfonts.php";
$cab->CabinetID = $_REQUEST['cabinetid'];
$cab->GetCabinet();
$device->Cabinet = $cab->CabinetID;
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFillColor(224, 235, 255);
$fill = 0;
$cabmessage = __("Cabinet Location") . ': ' . $cab->Location;
$pdf->SetFont($config->ParameterArray['PDFfont'], 'B', 10);
$pdf->Cell(0, 5, $cabmessage, 0, 1, 'C', 0);
$pdf->SetFont($config->ParameterArray['PDFfont'], '', 10);
$deviceList = $device->ViewDevicesByCabinet();
$headerTags = array(__("Label"), __("SerialNo"), __("AssetTag"), __("Position"), __("Rack Units"), __("#Ports"), __("#PS"), __("PowerConnection1"), __("PowerConnection2"), __("DeviceType"));
Exemplo n.º 15
0
# Begin PDF Output
$w = 63;
$top = 28;
$c1x = 13;
$c2x = $c1x + $w;
$c3x = $c2x + $w;
$c4x = $c3x + $w;
$c1h = 170;
$c2h = $c1h / 2;
$c3h = $c2h / 2;
$c4h = $c3h / 2;
$bottom = $top + $c1h;
$pdf = new PDF('L', 'mm', 'Letter');
$pdf->Open();
$pdf->SetTopMargin(13);
$pdf->SetLeftMargin(13);
$pdf->SetRightMargin(10);
$pdf->SetAutoPageBreak(True, 13);
$pdf->AddPage();
$pdf->SetCreator($_SERVER["PHP_SELF"]);
$pdf->SetAuthor("Keith Morrison, keithm@infused.org");
$pdf->SetTitle(sprintf(gtc("Pedigree for %s"), $o->full_name()));
$pdf->SetSubject(gtc("Genealogy"));
# Person 1
$pdf->SetY($top);
$pdf->SetX($c1x);
$pdf->Cell($w, $c1h, '', 1, 0, 'L');
$pdf->SetY($top + $c1h / 2 - 6);
$pdf->SetX($c1x);
$pdf->SetFont($font, 'B', 10);
$pdf->MultiCell($w, 4, isset($g_node_strings[1][0]) ? $g_node_strings[1][0] : '', 0, 'L');
Exemplo n.º 16
0
     }
     //Pie de página
     function Footer()
     {
         $this->SetY(-19);
         $this->SetFont('Arial', '', 10);
         $this->MultiCell(0, 5, $this->pie, 0, C);
     }
 }
 $db = new ConnectionHandler("{$ruta_raiz}");
 $db->conn->SetFetchMode(ADODB_FETCH_ASSOC);
 $pdf = new PDF('p', 'mm', 'letter');
 $pdf->pie = $pie;
 $pdf->AddPage();
 $pdf->SetTitle("Departamento Nacional de Planeacion");
 $pdf->SetLeftMargin(25);
 $pdf->SetRightMargin(25);
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Cell(50, 5, $numradicado, 0, 1, L);
 $pdf->Cell(105, 5, $lugar . "., " . $fecha, 0, 1, L);
 $pdf->ln(18);
 $pdf->SetFont('Arial', '', 12);
 $pdf->write(5, $asu);
 $pdf->ln(25);
 $pdf->Cell(60, 5, $mensaje, 0, 1, L);
 $pdf->ln(5);
 $pdf->MultiCell(0, 5, $reseptor, 0, L);
 $primerno = substr($numRadicadoPadre, 0, 4);
 $segundono = substr($numRadicadoPadre, 4, 3);
 $ruta = "/" . $primerno . "/" . $segundono . "/docs/" . $numradicado;
 $adjuntos = BODEGAPATH . $ruta;
Exemplo n.º 17
0
    {
        $this->SetY(-15);
        $this->SetDrawColor(90, 90, 90);
        $this->Line(15, 278, 195, 278);
        $this->SetFont('Arial', '', 9);
        $this->SetTextColor(150, 150, 150);
        $this->Cell(0, 0, chr(169) . ' ' . appconf('company_name') . ', ' . date('Y') . '  For further information, visit us online at ' . appconf('company_website'), 0, 0, 'R');
        $this->SetTextColor(0);
    }
}
// end PDF
$pdf = new PDF();
$pdf->SetFont('Arial', '', 10);
$pdf->Open();
$pdf->SetDisplayMode(150, 'single');
$pdf->SetLeftMargin(15);
$pdf->SetRightMargin(15);
$pdf->SetFillColor(240, 240, 240);
$pdf->AddPage();
$pdf->Cell(0, 5, ' ', 0, 1, 'C');
$pdf->Ln();
// heading
$pdf->SetFont('Arial', '', 10);
//$pdf->Cell (0, 5, 'Simian Systems Inc.', 0, 1, 'R');
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 5, appconf('company_address'), 0, 1, 'R');
$pdf->SetLeftMargin(131.5);
$pdf->WriteHTML('tel: ' . appconf('company_phone') . ', web: <a href="http://' . appconf('company_website') . '/">' . appconf('company_website') . '</a>');
$pdf->SetLeftMargin(15);
$pdf->Ln();
$pdf->Cell(0, 5, ' ', 0, 1, 'C');
Exemplo n.º 18
0
    }
    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();
         return $nl;
     }
 }
 define('FPDF_FONTPATH', $this->DOCUMENT_ROOT_MS . 'res/fpdf17/font/');
 $pdf = new PDF();
 $pdf->initMS($this->ms);
 $pdf->SetDisplayMode(50, 'single');
 $pdf->SetMargins(15, 20, 20);
 $pdf->SetAutoPageBreak(1, '50');
 $pdf->SetFont('Arial', '', 10);
 $pdf->AddPage();
 $pdf->SetFont('Arial', 'B', 26);
 $pdf->Cell(260, 0, utf8_decode($this->pi_getLL('invoice')), 0, 1, 'C');
 $pdf->Ln();
 // top left area
 $pdf->SetLeftMargin(35);
 $pdf->SetFont('Arial', '', 10);
 $pdf->SetY(50);
 foreach ($pdfdata['address1'] as $key => $value) {
     if ($value) {
         if (mb_detect_encoding($value, 'UTF-8', true)) {
             $value = utf8_decode($value);
         }
         $pdf->SetFont('Arial', 'B', 10);
         $pdf->Write(5, $value);
         $pdf->Ln();
     }
 }
 $temp = array();
 foreach ($pdfdata['address'] as $key => $value) {
     $temp['key'][] = array(utf8_decode($key), utf8_decode($value));
Exemplo n.º 20
0
$stmtMeucci->execute();
$rsmeucci = $stmtMeucci->fetch(PDO::FETCH_ASSOC);
$sql = "SELECT azienda.*,stage.*,tirocinante.*,persTutor.PAZ_Titolo AS ta_Titolo,persTutor.PAZ_Nome AS ta_Nome,persTutor.PAZ_Telefono AS ta_Telefono, persTutor.PAZ_Cellulare AS ta_Cellulare, persTutor.PAZ_Email AS ta_Email, persLegal.*,tutor.* FROM stage INNER JOIN azienda ON ( azienda.AZ_ID = stage.AZ_ID_Azienda ) INNER JOIN tirocinante ON ( stage.TIR_ID_Tirocinante = tirocinante.TIR_ID ) INNER JOIN tutor ON ( tutor.TUT_ID = stage.TUT_ID_Tutor ) LEFT JOIN personale AS persTutor ON ( persTutor.PAZ_ID = stage.PAZ_ID_Tutor ) LEFT JOIN personale AS persLegal ON ( azienda.AZ_ID = persLegal.AZ_ID_Azienda AND persLegal.PAZ_RapprLegale =1 ) WHERE STA_ID=:id";
$stmt = $dbh->prepare($sql);
$stmt->bindValue(':id', $_GET['id']);
$stmt->execute();
if ($stmt->rowCount() > 0) {
    $row = $stmt->fetch(PDO::FETCH_ASSOC);
    $pdf = new PDF();
    $pdf->SetTitle("Progetto formativo e di orientamento");
    $pdf->AddFont('abac', '', 'abac.php');
    $pdf->AddFont('abalc', '', 'ABALC.php');
    $pdf->SetFillColor(255, 230, 255);
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetLeftMargin(18);
    $pdf->SetRightMargin(18);
    $pdf->SetFont('abac', '', 14);
    $pdf->Cell(0, 10, 'PROGETTO FORMATIVO e di ORIENTAMENTO', 0, 0, 'C');
    $pdf->Ln(10);
    $pdf->SetFont('abalc', '', 11);
    $pdf->Cell(40, 6, 'Tirocinante ', 1, 0, 'R', 1);
    $pdf->Cell(135, 6, ' ' . utf8_decode($row['TIR_Nome']) . ' ' . utf8_decode($row['TIR_Cognome']) . ' - C.F.: ' . utf8_decode($row['TIR_CodiceFiscale']), 1, 1);
    $pdf->Cell(40, 6, 'Luogo e data di nascita ', 1, 0, 'R', 1);
    $pdf->Cell(135, 6, ' ' . utf8_decode($row['TIR_NatoA']) . ' (' . $row['TIR_NatoProv'] . ') il ' . strftime('%d/%m/%Y', strtotime($row['TIR_DataNascita'])), 1, 1);
    $pdf->Cell(40, 6, 'Residenza ', 1, 0, 'R', 1);
    $pdf->Cell(135, 6, ' ' . utf8_decode($row['TIR_IndirizzoResidenza']) . ' - ' . $row['TIR_CAP'] . ' ' . utf8_decode($row['TIR_ComuneResidenza']), 1, 1);
    $pdf->Cell(40, 6, 'Recapiti ', 1, 0, 'R', 1);
    $pdf->Cell(135, 6, ' ' . $row['TIR_Cellulare'] . ' - ' . $row['TIR_TelefonoFisso'] . ' - ' . $row['TIR_EMail'], 1, 1);
    $pdf->Cell(40, 6, 'Classe / Indirizzo ', 1, 0, 'R', 1);
    $pdf->Cell(135, 6, ' ' . $row['TIR_Classe'] . ' ' . $row['TIR_Indirizzo'], 1, 1);
Exemplo n.º 21
0
$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);
// Otra parte importante, luego de pasar las variables por la función html_entity_decode, para que se vean bien los acentos y las ñ, hay que pasarlas por otra
// función que es utf8_decode
$pdf->SetFontSize(14);
$pdf->WriteHTML(utf8_decode($nombre));
$pdf->WriteHTML("<br>");
$pdf->WriteHTML(utf8_decode($descripcion));
//La función WriteHTML es la que creamos anteriormente para que lea las etiquetas html como <br>, <b>, <i>, <p>, etc.
$pdf->Line(10, 59, 200, 59);
$pdf->WriteHTML("<br>");
Exemplo n.º 22
0
 //
 //	Begin Report Generation
 //
 //
 $pdf = new PDF();
 $pdf->AliasNbPages();
 include_once "loadfonts.php";
 $pdf->SetFont($config->ParameterArray['PDFfont'], '', 8);
 $pdf->SetFillColor(0, 0, 0);
 $pdf->SetTextColor(255);
 $pdf->SetDrawColor(128, 0, 0);
 $pdf->SetLineWidth(0.3);
 $pdf->SetfillColor(224, 235, 255);
 $pdf->SetTextColor(0);
 $column = 0;
 $pdf->SetLeftMargin(10);
 $pdf->AddPage();
 $pdf->Bookmark("Surplus/Salvage by Date");
 $pdf->Cell(80, 5, __("Surplus/Salvage by Date"));
 $pdf->Ln();
 $headerTags = array(__("Surplus Date"), __("Name"), __("Serial Number"), __("Asset Tag"), __("UserName"));
 $cellWidths = array(30, 40, 40, 30, 30);
 $fill = 0;
 $maxval = count($headerTags);
 for ($col = 0; $col < $maxval; $col++) {
     $pdf->Cell($cellWidths[$col], 7, $headerTags[$col], 1, 0, 'C', 1);
 }
 $pdf->Ln();
 if ($_REQUEST["startdate"] > "") {
     $startDate = date("Y-m-d", strtotime($_REQUEST["startdate"]));
 } else {
Exemplo n.º 23
0
                if ($i > 1) {
                    $this->Cell($w[$i], 6, $col, 1, 0, 'C');
                } else {
                    $this->Cell($w[$i], 6, $col, 1, 0, 'L');
                }
                $i = $i + 1;
            }
            $this->Ln();
        }
        //$this->height_tbl = $this->y -55;
    }
}
if ($_POST || $_GET) {
    $pdf = new PDF('L', 'mm', 'A4');
    $pdf->AliasNbPages();
    $pdf->SetLeftMargin(8);
    $pdf->SetAutoPageBreak(true, 20);
    $pdf->uid = $xoopsUser->getVar('uid');
    if (isset($_POST['bpartner_array'])) {
        $bpartner_array = $_POST['bpartner_array'];
        $checkbox_array = $_POST['checkbox_array'];
        $reporttype = $_POST['reporttype'];
    }
    if (isset($_GET['bpartner_array'])) {
        $bpartner_array = $_GET['bpartner_array'];
        $checkbox_array = $_GET['checkbox_array'];
        $reporttype = $_GET['reporttype'];
    }
    $data = array();
    $i = 0;
    $j = 0;
Exemplo n.º 24
0
        $h = $fsize1 / 2;
        $fsize2 = 10;
        $hh = $fsize2 / 2;
        $fsize3 = 12;
        $hhh = $fsize3 / 2;
        $this->SetLeftMargin($marginL);
        $w = array(50, 100, 50);
        $this->SetFont($font, 'B', $fsize3);
        $this->SetX($marginL + $w[0]);
        $this->Cell($w[1], $hh, 'INDIKATOR KINERJA UTAMA 2010-2014', $borderless, 1, 'c');
        $this->Cell($w[1], $hh, 'KEMENTERIAN RISET DAN TEKNOLOGI', $borderless, 1, 'L');
    }
}
$pdf = new PDF('L', 'mm', 'A4');
$pdf->AddPage();
$border = 1;
$borderless = 0;
$marginL = 13;
$marginT = 10;
$marginR = 200;
$marginB = 287;
$status = $_REQUEST[status];
$font = "Arial";
$fsize1 = 9;
$h = $fsize1 / 2;
$fsize2 = 10;
$hh = $fsize2 / 2;
$fsize3 = 12;
$hhh = $fsize3 / 2;
$pdf->SetLeftMargin($marginL);
$pdf->Output();
Exemplo n.º 25
0
// 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);
$column_width = $pdf->w - 10;
// For bullet list - width and bullet array variables
$cluesBullet = array();
$cluesBullet['bullet'] = chr(149);
$cluesBullet['margin'] = ' ';
$cluesBullet['indent'] = 0;
$cluesBullet['spacer'] = 0;
$cluesBullet['text'] = array();
//Set a counter for the foreach loop
Exemplo n.º 26
-1
/**
 * 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);
}