コード例 #1
0
 /**
  *Create a new PDF-file containing a direkt link to download the files metadata
  *@param $handle string
  *@param $article_id string
  *@param $fileType string, type should be 'submission','copyedit' or 'supplementary' 
  */
 function createHandlePDF($handle, $article_id, $handleType)
 {
     $nameOfFile;
     $fileStage;
     $endOfPath;
     $pdfInsertText;
     $fileType = 'application/pdf';
     if ($handleType == 'submission') {
         $nameOfFile = 'REMOTE_PAPER' . $article_id . '.pdf';
         $fileStage = ARTICLE_FILE_SUBMISSION;
         $endOfPath = '/submission/original/';
         $pdfInsertText = 'preprint-files';
     } elseif ($handleType == 'supplementary') {
         $nameOfFile = 'REMOTE_SUPPLEMENTARY' . $article_id . '.pdf';
         $fileStage = ARTICLE_FILE_SUPP;
         $endOfPath = '/supp/';
         $pdfInsertText = 'supplementary-files';
     } else {
         return false;
     }
     //create PDF with content
     import('plugins.generic.paperPackageEd.PDF');
     $pdf = new PDF();
     $pdf->AddPage();
     $pdf->SetFont('Arial', '', 13);
     $pdf->Write(5, "This PDF-file contains the " . $pdfInsertText . " handle:  " . $handle);
     $pdf->Ln();
     $pdf->SetFont('', 'U');
     $pdf->SetTextColor(30, 70, 200);
     $link = $pdf->createHandleLink($handle);
     $pdf->Write(5, 'Download ' . $pdfInsertText . ' metadata', $link);
     $pdf->SetFont('');
     $journal =& Request::getJournal();
     $journal_id = $journal->getId();
     //make path and save pdf there
     $pathToArticleFile = Config::getVar('files', 'files_dir') . '/journals/' . $journal_id . '/articles/' . $article_id . $endOfPath;
     $pathToFile = Config::getVar('files', 'files_dir') . '/temp/';
     if (!file_exists($pathToArticleFile)) {
         mkdir($pathToArticleFile, 0777, true);
     }
     $pdf->Output($pathToFile . $nameOfFile, 'F');
     //insert article into database
     $articleFileId = $this->insertArticleFile($nameOfFile, $fileStage, $fileType, $article_id, $pathToFile);
     return $articleFileId;
 }
コード例 #2
0
 public static function generate($dbh, $appID, $method = 'I')
 {
     $data = self::get($dbh, $appID);
     //if (strlen($socialnumber) > 20) $socialnumber = $this->decrypt($socialnumber);
     $socialnumber = '';
     //Blank out social on forms per Maria 6/6/2013
     // initiate PDF
     $pdf = new PDF();
     $pdf->SetMargins(PDF_MARGIN_LEFT, 10, PDF_MARGIN_RIGHT);
     // add a page
     $pdf->AddPage();
     $pdf->SetFont("Helvetica", "", 11);
     $pdf->SetXY(33, 30);
     $pdf->Write(5, date('m/d/Y', strtotime($data['appDate'])));
     $pdf->SetXY(85, 30);
     $pdf->Write(5, $data['jobName']);
     $pdf->SetXY(30, 36);
     $pdf->Write(5, $data['lastname']);
     $pdf->SetXY(110, 36);
     $pdf->Write(5, $data['firstname']);
     $pdf->SetXY(170, 36);
     $pdf->Write(5, $data['middlename']);
     $pdf->SetXY(30, 62);
     $pdf->Write(5, $data['address']);
     $pdf->SetXY(105, 62);
     $pdf->Write(5, $data['city']);
     $pdf->SetXY(162, 62);
     $pdf->Write(5, $data['state']);
     $pdf->SetXY(187, 62);
     $pdf->Write(5, $data['zip']);
     $pdf->SetXY(70, 69);
     $pdf->Write(5, $data['years']);
     $pdf->SetXY(105, 69);
     $pdf->Write(5, $data['phone']);
     $pdf->SetXY(122, 76);
     $pdf->Write(5, $data['email']);
     $pdf->SetFont("Helvetica", "", 10);
     $highestx = 59 + $data['highestgrade'] * 5.4;
     if ($data['highestgrade'] > 8) {
         $highestx += 19;
     }
     if ($data['highestgrade'] > 12) {
         $highestx += 20;
     }
     $pdf->SetXY($highestx, 152);
     $pdf->Write(5, 'Highest');
     $pdf->SetXY(46, 175);
     $pdf->Write(5, $data['highschool']);
     $pdf->SetXY(46, 184);
     $pdf->Write(5, $data['highschoolloc']);
     $pdf->SetXY(101, 175);
     $pdf->Write(5, $data['highschoolyears']);
     $pdf->SetXY(129, 175);
     $pdf->Write(5, $data['coursesubject']);
     $pdf->SetXY(174.5, 175);
     $pdf->write(5, $data['coursesubjectgraduated'] == 'Yes' ? 'X' : '');
     $pdf->SetXY(174.5, 184);
     $pdf->write(5, $data['coursesubjectgraduated'] == 'GED' ? 'X' : '');
     $pdf->SetXY(46, 193);
     $pdf->Write(5, $data['collegeuniversity']);
     $pdf->SetXY(46, 202);
     $pdf->Write(5, $data['collegeuniversityloc']);
     $pdf->SetXY(101, 193);
     $pdf->Write(5, $data['collegeuniversityyearscompleted']);
     $pdf->SetXY(129, 193);
     $pdf->Write(5, $data['collegeuniversitycourse']);
     $pdf->SetXY(174.5, 191);
     $pdf->write(5, $data['collegegraduated'] == 'Yes' ? 'X' : '');
     $pdf->SetXY(184, 194);
     $pdf->Write(5, $data['collegegraduatedMonth']);
     $pdf->SetXY(196, 194);
     $pdf->Write(5, $data['collegegraduatedYear']);
     $pdf->SetXY(174.5, 202);
     $pdf->write(5, $data['collegegraduated'] == 'InP' ? 'X' : '');
     $pdf->SetXY(46, 210);
     $pdf->Write(5, $data['othercollege']);
     $pdf->SetXY(46, 222);
     $pdf->Write(5, $data['othercollegeloc']);
     $pdf->SetXY(101, 214);
     $pdf->Write(5, $data['othercollegeyears']);
     $pdf->SetXY(129, 210);
     $pdf->Write(5, $data['othercollegecourse']);
     $pdf->SetXY(174.5, 209);
     $pdf->write(5, $data['othercollegecompleted'] == 'Yes' ? 'X' : '');
     $pdf->SetXY(184, 213);
     $pdf->Write(5, $data['othercollegecompletedMonth']);
     $pdf->SetXY(194, 213);
     $pdf->Write(5, $data['othercollegecompletedYear']);
     $pdf->SetXY(174.5, 219);
     $pdf->write(5, $data['othercollegecompleted'] == 'Pro' ? 'X' : '');
     $pdf->SetXY(128, 260.5);
     $pdf->Write(5, $data['language']);
     $pdf->SetXY(163, 260.5);
     $pdf->write(5, $data['languagespeak'] ? 'X' : '');
     $pdf->SetXY(177, 260.5);
     $pdf->write(5, $data['languageread'] ? 'X' : '');
     $pdf->SetXY(190, 260.5);
     $pdf->write(5, $data['languagewrite'] ? 'X' : '');
     $pdf->AddPage();
     $y = 0;
     $pdf->SetXY(10, $y + 46);
     $pdf->Write(5, $data['companyname1']);
     $pdf->SetXY(10, $y + 55);
     $pdf->MultiCell(50, 10, $data['companyaddress1'], 0, 'L');
     $pdf->SetXY(10, $y + 64);
     $pdf->Write(5, $data['companyphone1']);
     $pdf->SetXY(10, $y + 72);
     $pdf->Write(5, $data['supervisorname1']);
     $pdf->SetXY(60, $y + 52);
     $pdf->MultiCell(80, 35, $data['responsibilities1'], 0, 'L');
     $pdf->SetXY(141, $y + 56);
     $pdf->MultiCell(60, 25, $data['reasonforleaving1'], 0, 'L');
     $pdf->SetXY(160, $y + 64);
     $pdf->write(5, "{$data['startwages1']} -> {$data['endedwages1']}");
     if ($data['maywecontact1'] == 'Yes') {
         $pdf->SetXY(146, $y + 73);
     } else {
         $pdf->SetXY(178, $y + 73);
     }
     $pdf->write(5, 'X');
     $y = 33;
     $pdf->SetXY(10, $y + 46);
     $pdf->Write(5, $data['companyname2']);
     $pdf->SetXY(10, $y + 55);
     $pdf->MultiCell(50, 10, $data['companyaddress2'], 0, 'L');
     $pdf->SetXY(10, $y + 64);
     $pdf->Write(5, $data['companyphone2']);
     $pdf->SetXY(10, $y + 72);
     $pdf->Write(5, $data['supervisorname2']);
     $pdf->SetXY(60, $y + 52);
     $pdf->MultiCell(80, 35, $data['responsibilities2'], 0, 'L');
     $pdf->SetXY(141, $y + 56);
     $pdf->MultiCell(60, 25, $data['reasonforleaving2'], 0, 'L');
     $pdf->SetXY(160, $y + 64);
     $pdf->write(5, "{$data['startwages2']} -> {$data['endedwages2']}");
     if ($data['maywecontact2'] == 'Yes') {
         $pdf->SetXY(140, $y + 73);
     } else {
         $pdf->SetXY(178, $y + 73);
     }
     $pdf->write(5, 'X');
     $y = 66.5;
     $pdf->SetXY(10, $y + 46);
     $pdf->Write(5, $data['companyname3']);
     $pdf->SetXY(10, $y + 55);
     $pdf->MultiCell(50, 10, $data['companyaddress3'], 0, 'L');
     $pdf->SetXY(10, $y + 64);
     $pdf->Write(5, $data['companyphone3']);
     $pdf->SetXY(10, $y + 72);
     $pdf->Write(5, $data['supervisorname3']);
     $pdf->SetXY(60, $y + 52);
     $pdf->MultiCell(80, 35, $data['responsibilities3'], 0, 'L');
     $pdf->SetXY(141, $y + 56);
     $pdf->MultiCell(60, 25, $data['reasonforleaving3'], 0, 'L');
     $pdf->SetXY(160, $y + 64);
     $pdf->write(5, "{$data['startwages3']} -> {$data['endedwages3']}");
     if ($data['maywecontact3'] == 'Yes') {
         $pdf->SetXY(140, $y + 73);
     } else {
         $pdf->SetXY(178, $y + 73);
     }
     $pdf->write(5, 'X');
     $pdf->SetXY(44, 265);
     $pdf->MultiCell(95, 10, "Signed Online as {$data['signature']} from {$data['ipAddress']}", 0, 'L');
     $pdf->SetXY(150, 265);
     $pdf->Write(5, $data['appDate']);
     $pdf->AddPage();
     $pdf->SetXY(26, 42);
     $pdf->Write(5, $data['lastname']);
     $pdf->SetXY(101, 42);
     $pdf->Write(5, $data['firstname']);
     $pdf->SetXY(172, 42);
     $pdf->Write(5, substr($data['middlename'], 0, 1));
     $pdf->SetXY(115, 50);
     $pdf->Write(5, $data['zip']);
     $pdf->SetXY(48, 57);
     $pdf->Write(5, $data['jobName']);
     $pdf->SetXY(48, 57);
     $pdf->Write(5, $data['jobName']);
     $filename = $data['firstname'] . '_' . $data['lastname'] . '_app.pdf';
     if ($method == 'F') {
         $pdf->Output(__DIR__ . '../../public_html/img/pdf/' . $filename, 'F');
         return 'img/pdf/' . $filename;
     } elseif ($method == 'I') {
         $pdf->Output(__DIR__ . '../../public_html/img/pdf/' . $filename, 'I');
         die;
     }
 }
コード例 #3
0
ファイル: tuto6.php プロジェクト: joshluq/sysexcel
    }
    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();
コード例 #4
0
 $q5 = @mysql_query("select * from studentcontact where studentcontact_id = {$r1['studentbio_id']}");
 $r5 = @mysql_fetch_array($q5);
 $address1 = $r5['studentcontact_address1'];
 $address2 = $r5['studentcontact_address2'];
 $city = $r5['studentcontact_city'];
 $zip = $r5['studentcontact_zip'];
 $pdf = new PDF('L');
 $w = array(35, 35, 35, 35, 35, 35);
 $pdf->Open();
 $pdf->SetWidths($w);
 $pdf->SetMargins(50, 30);
 $pdf->AddPage();
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetXY(195, 35);
 $pdf->SetFont('Times', 'IB', 16);
 $pdf->Write(1, $school);
 $pdf->SetFont('Times', '', 14);
 $pdf->Ln();
 $pdf->SetXY(30, 50);
 $pdf->Write(1, $name);
 $pdf->Ln();
 $pdf->SetXY(30, 55);
 $pdf->Write(1, $address1);
 $pdf->Ln();
 if (!empty($address2)) {
     $pdf->SetXY(30, 60);
     $pdf->Write(1, $address2);
 }
 $pdf->Ln();
 $pdf->SetXY(30, 65);
 $pdf->Write(1, $city . ' - ' . $zip);
コード例 #5
0
ファイル: PersonaPDF.php プロジェクト: JLockerbie/BS
//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
$i = 0;
foreach ($clues as $val) {
コード例 #6
0
ファイル: tuto6.php プロジェクト: Kemallyson/Wizglobal
    }
    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);
    }
}
$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', $link);
$pdf->SetFont('');
// Second page
$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();
コード例 #7
0
 $beer_styles_total = array_sum($beer_styles);
 $mead_styles_total = array_sum($mead_styles);
 $cider_styles_total = array_sum($cider_styles);
 $mead_cider_total = $mead_styles_total + $cider_styles_total;
 if ($total_entries >= 30 && ($beer_styles_total >= 5 || $mead_cider_total >= 3)) {
     $bos_judge_points = 0.5;
 } else {
     $bos_judge_points = 0.0;
 }
 if ($view == "pdf") {
     $filename = str_replace(" ", "_", $_SESSION['contestName']) . '_BJCP_Points_Report.' . $view;
     require CLASSES . 'fpdf/html_table.php';
     $pdf = new PDF();
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 16);
     $pdf->Write(5, strtr($_SESSION['contestName'], $html_remove) . ' BJCP Points Report');
     $pdf->SetFont('Arial', '', 10);
     $html = '<br><br><strong>BJCP Competition ID</strong>: ' . $_SESSION['contestID'] . '<br>';
     $html .= '<br><strong>Total Entries</strong>: ' . $total_entries . '<br>';
     $html .= '<br><strong>Total Days</strong>: ' . total_days() . '<br>';
     $html .= '<br><strong>Total Sessions</strong>: ' . total_sessions() . '<br>';
     $html .= '<br><strong>Total Flights</strong>: ' . total_flights() . ' (includes Best of Show)<br>';
     if ($totalRows_organizer > 0) {
         $html .= '<br><br><strong>Organizer</strong><br>';
         $html .= '<table border="1">';
         $html .= '<tr>';
         $html .= '<td width="300" align="center" bgcolor="#cccccc">Name</td>';
         $html .= '<td width="150" align="center" bgcolor="#cccccc">BJCP ID</td>';
         $html .= '<td width="150" align="center" bgcolor="#cccccc">Points</td>';
         $html .= '</tr>';
         $html .= '<tr>';
コード例 #8
0
if ($productos === true) {
    $consultaproductosactivos = mysql_query("SELECT id_producto FROM tb_productos WHERE estado='Activo'");
    while ($result = mysql_fetch_array($consultaproductosactivos)) {
        $id = $result["id_producto"];
        $consulta = mysql_query("(SELECT fecha,tr_productos_entradas.id_producto,tb_entradas.tipo,cantidad," . "tb_entradas.factura,'entrada' as tipom FROM tr_productos_entradas,tb_entradas " . "WHERE id_producto={$id} and tb_entradas.id_entrada=tr_productos_entradas.id_entrada) " . "UNION ALL (SELECT fecha,tr_productos_salidas.id_producto,tb_salidas.tipo,cantidad," . "tb_salidas.factura_salida,'salida' as tipom FROM tr_productos_salidas,tb_salidas " . "WHERE id_producto={$id} and tb_salidas.id_salida=tr_productos_salidas.id_salida) ORDER BY fecha asc");
        while ($resultado = mysql_fetch_array($consulta)) {
            $idproducto = $resultado["id_producto"];
            $nombreproducto = mysql_query("SELECT * FROM tb_productos WHERE id_producto={$idproducto}");
            $resultadonombre = mysql_fetch_array($nombreproducto);
            $nombre = $resultadonombre["nombre"];
            if ($aux === $idproducto) {
            } else {
                $pdf->Ln();
                $aux = $idproducto;
                $pdf->SetFont('Arial', 'B', 12);
                $pdf->Write(6, $nombre);
                $pdf->SetFont('Arial', '', 10);
                $pdf->Ln();
                $pdf->Cell(70, 10, 'Fecha', 0, 0, 'C');
                $pdf->Cell(40, 10, 'Codigo', 0, 0, 'C');
                $pdf->Cell(40, 10, 'Tipo', 0, 0, 'C');
                $pdf->Cell(60, 10, 'Entrada', 0, 0, 'C');
                $pdf->Cell(40, 10, 'Salida', 0, 0, 'C');
            }
            $pdf->Ln();
            $pdf->Cell(70, 10, $resultado["fecha"], 0, 0, 'C');
            $pdf->Cell(120, 10, $resultado["tipo"], 0, 0, 'C');
            if ($resultado["tipom"] === "entrada") {
                $pdf->Cell(-20, 10, $resultado["cantidad"], 0, 0, 'C');
                $pdf->Cell(-160, 10, $resultado["factura"], 0, 0, 'C');
            } else {
コード例 #9
0
ファイル: ex.php プロジェクト: rohmad-st/fpdf
<?php

require 'mc_indent.php';
$InterLigne = 7;
$pdf = new PDF();
$pdf->AddPage();
$pdf->SetMargins(30, 10, 30);
$pdf->SetFont('Arial', '', 12);
$txt = "Cher Pierre";
$txtLen = $pdf->GetStringWidth($txt);
$milieu = (210 - $txtLen) / 2;
$pdf->SetX($milieu);
$pdf->Write(5, $txt);
$pdf->ln(30);
$txt = "Voici venu le temps pour toi de renouveler ta licence-assurance, en effet celle-ci expire le 28/9 prochain. Tu trouveras joint à ce document le certificat d'aptitude à faire remplir par le médecin.";
$pdf->MultiCell(0, $InterLigne, $txt, 0, 'J', 0, 15);
$pdf->ln(10);
$txt = "Je me permets de te rappeler que cette licence est obligatoire et nécessaire à la pratique de notre sport favori, tant à l'occasion de nos entraînements qu'à toutes autres manifestations auxquelles tu peux participer telles que compétitions, cours fédéraux ou visites amicales dans un autre club.";
$pdf->MultiCell(0, $InterLigne, $txt, 0, 'J', 0, 15);
$pdf->ln(10);
$txt = "Dès lors, je te saurais gré de bien vouloir me retourner le certificat d'aptitude dûment complété par le médecin accompagné de ton paiement de 31 € ou de la preuve de celui-ci par virement bancaire. Le tout dans les plus brefs délais afin de ne pas interrompre la couverture de ladite assurance et par la même occasion de t'empêcher de participer à nos cours le temps de la régularisation. Il y va de ta sécurité.";
$pdf->MultiCell(0, $InterLigne, $txt, 0, 'J', 0, 15);
$pdf->ln(10);
$txt = "Merci de la confiance que tu mets en notre club pour ton épanouissement sportif.";
$pdf->MultiCell(0, $InterLigne, $txt, 0, 'J', 0, 15);
$pdf->ln(10);
$txt = "Le comité";
$pdf->MultiCell(0, $InterLigne, $txt, 0, 'R', 0);
$pdf->Output();
コード例 #10
0
ファイル: topdf.php プロジェクト: Alex-duzhichao/KindleNote
        $this->SetY(-15);
        // Arial italic 8
        $this->SetFont('Arial', 'B', 10);
        // Page number
        $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
// Instanciation of inherited class
$pdf = new PDF();
$pdf->AddGBFont('sinfang', '仿宋_GB2312');
$pdf->AddGBFont('simkai', '楷体_GB2312');
$pdf->AliasNbPages();
$pdf->AddPage();
foreach ($bname_content as $title => $content_array) {
    $pdf->SetFont('simkai', 'U', 15);
    $pdf->Write(10, iconv("utf-8", "gbk", $title . "\n"));
    //foreach ($content_array as $content) {
    for ($i = 0; $i < count($content_array); $i++) {
        $content = $content_array[$i];
        $pdf->SetFont('sinfang', '', 11);
        $pdf->Write(8, iconv("utf-8", "gbk", "(" . ($i + 1) . ")\t" . $content));
    }
    $pdf->Write(3, "\n");
    // 两本书之间的空格
}
$pdf->Output();
?>


</body>
</html>
コード例 #11
0
                $this->Ln();
            } while ($row = mysqli_fetch_array($result));
        }
    }
    //fin de la definicion de la clase extendida de fpdf
    //----------------------------------------------------
    //conexion a la base de datos
    require_once '../../lib/config.php';
    // $conn = mysqli_connect("localhost","root","");
    // mysqli_select_db("prally", $conn);
    $result = mysqli_query($conn, "SELECT * from participantes");
    //devuelve true si se pudo hacer la consulta, y falso en caso contrario
    //si hay registros insertados
    if (mysqli_num_rows($result)) {
        $pdf = new PDF('L', 'mm', 'Letter');
        //Titulos de las columnas
        $encabezados = array(utf8_decode('Código'), 'Nombre', utf8_decode('Teléfono'), utf8_decode('Número de equipo'), 'Carrera', 'Semestre');
        $pdf->SetFont('Arial', '', 12);
        $pdf->AddPage();
        $pdf->Write(10, 'Listado de los Participantes del Rally', '');
        $pdf->Ln();
        $pdf->FancyTable($encabezados, $result);
        //dibuja la tabla con la funcion FancyTable
        //<img src="../../images/participantes/$row['foto']" width='50px' height='60px'/>
        $pdf->Output();
    } else {
        echo "¡ La base de datos está vacia !";
    }
} else {
    echo "Est&aacutes accediendo a una p&aacutegina restringida, para ver su contenido debes estar registrado.<br />\n        <a href='../../login/acceso.php'>Ingresar</a>";
}
コード例 #12
0
        $subY = $this->y;
        $this->SetXY($subX, $subY + $subOffset);
        // restore font size
        $this->SetFontSize($subFontSizeold);
    }
}
// --------------------------- Get current date
$dt = new DateTime();
$dt = $dt->format('Y-M-d');
// --------------------------- Get current date
$pdf = new PDF();
$pdf->AliasNbPages();
// Column headings
$header = array('Account Title', 'Date', 'Income', 'Expense');
$pdf->SetFont('Arial', '', 9);
$pdf->SetMargins(5, 5, 5);
$pdf->AddPage();
$pdf->subWrite(4, 'E', '', 20);
$pdf->Write(4, 'xpense');
$pdf->Ln();
$pdf->Ln();
$pdf->SetX(10);
$pdf->subWrite(4, 'M', '', 20);
$pdf->Write(4, 'anager');
$pdf->SetX(5);
$pdf->Cell(0, 4, 'Income - Expense Report', 0, 1, 'C');
$pdf->Cell(0, 4, $ReportTitle, 0, 1, 'C');
$pdf->Cell(0, 4, "As Of: " . $dt, 0, 1, 'C');
$pdf->Cell(0, 4, '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------', 0, 1, 'C');
$pdf->BasicTable($header, $decoded);
$pdf->Output();
コード例 #13
0
$test1['text'] = array();
$note1 = 'If your ward has secured less than 50% marks and less than 85% attendance, we request you to meet the Head of the Department/Counselor.';
$note2 = 'The student has to put-up 85% of attendance and CIE marks greater than 40% in all courses, failing which he/she will not be allowed to take up the Semester End Examination.';
$note3 = 'You are requested to monitor your wards performance regularly and advise suitably.';
$test1['text'][0] = $note1;
$test1['text'][1] = $note2;
$test1['text'][2] = $note3;
$pdf->MultiCellBltArray(175, 4, $test1);
$pdf->Ln(6);
$pdf->SetFont('Arial', '', 11);
$pdf->Cell(0, 0, "Counselor", 0, 0, 'L');
$pdf->Cell(0, 0, "Head of the Department", 0, 0, 'R');
$pdf->Ln(5);
$pdf->SetFont('Arial', '', 9);
for ($i = 0; $i < 38; $i++) {
    $pdf->Write(0, "- ");
}
$pdf->Write(0, "Cut here and retrun");
for ($i = 0; $i < 38; $i++) {
    $pdf->Write(0, "- ");
}
$pdf->Ln(5);
$pdf->SetFont('Arial', 'BU', 13);
$pdf->Cell(0, 0, "ACKNOWLEDGEMENT", 0, 0, 'C');
$pdf->Ln(7);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 0, 'Remarks of the Parent / Guardian: ');
$pdf->Ln(7);
$pdf->Line(15, $pdf->GetY(), 190, $pdf->GetY());
$pdf->Ln(7);
$pdf->Line(15, $pdf->GetY(), 190, $pdf->GetY());
コード例 #14
0
     $pdf->AddPage();
 }
 if ($view == "html") {
     $header .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
     $header .= '<html xmlns="http://www.w3.org/1999/xhtml">';
     $header .= '<head>';
     $header .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
     $header .= '<title>Results - ' . $_SESSION['contestName'] . '</title>';
     $header .= '</head>';
     $header .= '<body>';
 }
 if ($go == "judging_scores") {
     $html = '';
     if ($view == "pdf") {
         $pdf->SetFont('Arial', 'B', 16);
         $pdf->Write(5, 'Results - ' . $_SESSION['contestName']);
         $pdf->SetFont('Arial', '', 7);
     }
     $filename = str_replace(" ", "_", $_SESSION['contestName']) . '_Results.' . $view;
     if ($_SESSION['prefsWinnerMethod'] == 0) {
         do {
             $entry_count = get_table_info(1, "count_total", $row_tables['id'], $dbTable, "default");
             if ($entry_count > 0) {
                 $html .= '<br><br><strong>Table ' . $row_tables['tableNumber'] . ': ' . $row_tables['tableName'] . ' (' . $entry_count . ' entries)</strong><br>';
                 $html .= '<table border="1">';
                 $html .= '<tr>';
                 $html .= '<td width="35" align="center"  bgcolor="#cccccc" nowrap="nowrap"><strong>Pl.</strong></td>';
                 $html .= '<td width="150" align="center" bgcolor="#cccccc"><strong>Brewer(s)</strong></td>';
                 $html .= '<td width="200" align="center" bgcolor="#cccccc"><strong>Entry Name</strong></td>';
                 $html .= '<td width="200" align="center" bgcolor="#cccccc"><strong>Style</strong></td>';
                 $html .= '<td width="175" align="center" bgcolor="#cccccc"><strong>Club</strong></td>';
コード例 #15
0
ファイル: pdf.php プロジェクト: juliogallardo1326/proc
    print "Error!";
}
$pdf = new PDF($currentCategory, $thema, $tree->categoryName, $orientation = "P", $unit = "mm", $format = "A4");
$pdf->Open();
$pdf->SetAutoPageBreak(true, 2 * (40 / $pdf->k));
$pdf->SetTitle($thema);
$pdf->SetCreator($PMF_CONF["title"]);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont("Arial", "", 12);
$pdf->SetDisplayMode("real");
$pdf->WriteHTML(str_replace("../", "", $content));
$pdf->Ln();
$pdf->Ln();
$pdf->SetStyle('I', true);
$pdf->Write(5, unhtmlentities($PMF_LANG['ad_entry_solution_id']) . ': #' . $solution_id);
$pdf->SetAuthor($author);
$pdf->Ln();
$pdf->Write(5, unhtmlentities($PMF_LANG["msgAuthor"]) . $author);
$pdf->SetAuthor($author);
$pdf->Ln();
$pdf->Write(5, unhtmlentities($PMF_LANG["msgLastUpdateArticle"]) . makeDate($date));
$pdf->SetStyle('I', false);
$pdfFile = "pdf/" . $id . ".pdf";
$pdf->Output($pdfFile);
$file = basename($pdfFile);
$size = filesize($pdfFile);
session_cache_limiter('private');
header("Pragma: public");
header("Expires: 0");
// set expiration time
コード例 #16
0
$pdf->SetAutoPageBreak(true, 25);
$pdf->AddPage();
session_start();
$productos = $_SESSION['datosclientes'];
if ($productos === true) {
    $consultaproductosactivos = mysql_query("SELECT cc FROM tb_usuarios WHERE estado='Activo' and tipo='Cliente'");
    while ($result = mysql_fetch_array($consultaproductosactivos)) {
        $id = $result["cc"];
        $consulta = mysql_query("SELECT id_salida,fecha,factura_salida FROM tb_salidas WHERE tipo='Remision' and cliente='{$id}' order by fecha asc");
        $consulta1 = mysql_fetch_array(mysql_query("SELECT nombre from tb_usuarios WHERE cc='{$id}'  "));
        $nombre = "Cliente : " . $consulta1['nombre'];
        if (mysql_num_rows($consulta) > 0) {
            $pdf->Ln();
            $aux = $salida;
            $pdf->SetFont('Arial', 'B', 12);
            $pdf->Write(6, $nombre);
            $pdf->SetFont('Arial', '', 10);
            $pdf->Ln();
        }
        while ($resultado = mysql_fetch_array($consulta)) {
            $salida = $resultado["id_salida"];
            $factura = $resultado["factura_salida"];
            $fecha = $resultado['fecha'];
            $pdf->Ln();
            $aux = $salida;
            $pdf->SetFont('Arial', 'B', 12);
            $pdf->Write(8, '   ' . '  Remision : ' . $factura . '  ' . 'Fecha ' . $fecha);
            $pdf->SetFont('Arial', '', 10);
            $pdf->Ln();
            $pdf->Cell(50, 10, 'Codigo', 0, 0, 'C');
            $pdf->Cell(60, 10, 'Nombre', 0, 0, 'C');
コード例 #17
0
ファイル: cetak.php プロジェクト: kadalmeinside/spk_topsis
        $this->SetFont('Arial', 'I', 8);
        // Rata Tengah nomer halaman
        $this->Cell(0, 10, 'Halaman ' . $this->PageNo() . 'dari {nb}', 0, 0, 'C');
    }
}
//pengaturan ukuran kertas P = Portrait
$pdf = new PDF('L', 'cm', 'A4');
$pdf->SetTitle('Laporan');
$pdf->AliasNbPages();
$pdf->Open();
$pdf->AddPage();
//Ln() = untuk pindah baris
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Times', 'B', 16);
$pdf->Write(3, 'Hasil seleksi penjurusan SMA');
$pdf->Ln();
$pdf->SetFont('Times', 'B', 12);
$pdf->Cell(1, 1, 'No', 'LRTB', 0, 'C');
$pdf->Cell(3, 1, 'Nis', 'LRTB', 0, 'C');
$pdf->Cell(4, 1, 'Nama', 'LRTB', 0, 'C');
$pdf->Cell(2, 1, 'Fisika', 'LRTB', 0, 'C');
$pdf->Cell(2, 1, 'Mtk', 'LRTB', 0, 'C');
$pdf->Cell(2, 1, 'B.Ing', 'LRTB', 0, 'C');
$pdf->Cell(2, 1, 'Geo', 'LRTB', 0, 'C');
$pdf->Cell(2, 1, 'Eko', 'LRTB', 0, 'C');
$pdf->Cell(2, 1, 'B.Indo', 'LRTB', 0, 'C');
$pdf->Cell(2, 1, 'Skor', 'LRTB', 0, 'C');
$pdf->Ln();
$pdf->SetFont('Times', "", 10);
for ($j = 0; $j < $i; $j++) {
コード例 #18
0
        }
    }
    //fin de la definicion de la clase extendida de fpdf
    //----------------------------------------------------
    //conexion a la base de datos
    require_once '../../lib/config.php';
    // $conn = mysqli_connect("localhost","root","");
    // mysqli_select_db("prally", $conn);
    $result = mysqli_query($conn, "SELECT num_mesa, maestro from mesas");
    //devuelve true si se pudo hacer la consulta, y falso en caso contrario
    //si hay registros insertados
    if (mysqli_num_rows($result)) {
        $pdf = new PDF('L', 'mm', 'Letter');
        //Titulos de las columnas
        $encabezados = array(utf8_decode('Número de Mesa'), 'Profesor a cargo');
        $pdf->SetFont('Arial', '', 12);
        $pdf->AddPage();
        $pdf->Write(10, 'Listado de las Mesas del Rally', '');
        $pdf->Ln();
        $pdf->FancyTable($encabezados, $result);
        //dibuja la tabla con la funcion FancyTable
        //<img src="../../images/participantes/$row['foto']" width='50px' height='60px'/>
        $pdf->Output();
    } else {
        echo "¡ La base de datos está vacia !";
    }
    ?>
 <?php 
} else {
    echo "Est&aacutes accediendo a una p&aacutegina restringida, para ver su contenido debes estar registrado.<br />\n        <a href='../../login/acceso.php'>Ingresar</a>";
}
コード例 #19
0
    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();
コード例 #20
0
define('FPDF_FONTPATH', $fontpath);
include_once 'fpdf.php';
include_once 'pdf.php';
$fonttype = 'times';
$pdf = new PDF();
$pdf->Open();
$pdf->SetTitle('ZVS Meldeschein');
$pdf->SetAuthor($request->GetVar('hotel_name', 'session'));
$pdf->SetCreator('ZVS');
$pdf->AliasNbPages();
$pdf->AddPage(P);
$pdf->ln(5);
$y = $pdf->GetY();
// Address
$pdf->SetFont($fonttype, 'B', 10);
$pdf->Write(5, $request->GetVar('hotel_name', 'session'));
$pdf->ln(4);
$pdf->SetFont($fonttype, '', 10);
$pdf->Write(5, $request->GetVar('hotel_street', 'session'));
$pdf->ln(4);
$pdf->SetFont($fonttype, '', 10);
$pdf->Write(5, $request->GetVar('hotel_zip', 'session') . " " . $request->GetVar('hotel_city', 'session'));
// Headline
$pdf->SetXY(120, $y);
$pdf->SetFont($fonttype, 'B', 12);
$pdf->Write(5, "Meldeschein für Beherbergungsstätten");
$pdf->SetXY(120, $y + 5);
$pdf->SetFont($fonttype, '', 6);
$pdf->Write(3, "Rechtsgrundlage für die Erhebung der nachfolgend aufgeführten Daten sind");
$pdf->SetXY(120, $y + 8);
$pdf->Write(3, "§§23 und 24 des Meldegesetzes vom 11. April 1983 (GBI. S. 117)");
コード例 #21
0
ファイル: tuto6.php プロジェクト: ranmadxs/dorcl
        //Put a hyperlink
        $this->SetTextColor(0, 0, 255);
        $this->SetStyle('U', true);
        $this->Write(5, $txt, $URL);
        $this->SetStyle('U', false);
        $this->SetTextColor(0);
    }
}
$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', $link);
$pdf->SetFont('');
//Second page
$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();
?>

コード例 #22
0
ファイル: tuto6.php プロジェクト: SalokineTerata/intranet
    {
        //Place un hyperlien
        $this->SetTextColor(0, 0, 255);
        $this->SetStyle('U', true);
        $this->Write(5, $txt, $URL);
        $this->SetStyle('U', false);
        $this->SetTextColor(0);
    }
}
$html = 'Vous pouvez maintenant imprimer facilement du texte mélangeant
différents styles : <B>gras</B>, <I>italique</I>, <U>souligné</U>, ou
<B><I><U>tous à la fois</U></I></B> !<BR>Vous pouvez aussi insérer des
liens sous forme textuelle, comme <A HREF="http://www.fpdf.org">
www.fpdf.org</A>, ou bien sous forme d\'image : cliquez sur le logo.';
$pdf = new PDF();
//Première page
$pdf->AddPage();
$pdf->SetFont('Arial', '', 20);
$pdf->Write(5, 'Pour découvrir les nouveautés de ce tutoriel, cliquez ');
$pdf->SetFont('', 'U');
$link = $pdf->AddLink();
$pdf->Write(5, 'ici', $link);
$pdf->SetFont('');
//Seconde page
$pdf->AddPage();
$pdf->SetLink($link);
$pdf->Image('logo.png', 10, 10, 30, 0, '', 'http://www.fpdf.org');
$pdf->SetLeftMargin(45);
$pdf->SetFontSize(14);
$pdf->WriteHTML($html);
$pdf->Output();
コード例 #23
0
        } while ($row = mysqli_fetch_array($result));
    }
}
//fin de la definicion de la clase extendida de fpdf
//----------------------------------------------------
//conexion a la base de datos
require_once '../../lib/config.php';
// $conn = mysqli_connect("localhost","root","");
// mysqli_select_db("prally", $conn);
$result = mysqli_query($conn, "SELECT codigo, nombre, materia, telefono from maestros");
//devuelve true si se pudo hacer la consulta, y falso en caso contrario
//si hay registros insertados
if (mysqli_num_rows($result)) {
    $pdf = new PDF('L', 'mm', 'Letter');
    //Titulos de las columnas
    $encabezados = array(utf8_decode('Código'), 'Nombre', 'Materia', utf8_decode('Teléfono'));
    $pdf->SetFont('Arial', '', 12);
    $pdf->AddPage();
    $pdf->Write(10, 'Listado de los Profesores del Rally', '');
    $pdf->Ln();
    $pdf->FancyTable($encabezados, $result);
    //dibuja la tabla con la funcion FancyTable
    //<img src="../../images/participantes/$row['foto']" width='50px' height='60px'/>
    $pdf->Output();
} else {
    echo "¡ La base de datos está vacia !";
}
// }else {
// echo "Est&aacutes accediendo a una p&aacutegina restringida, para ver su contenido debes estar registrado.<br />
// <a href='../../login/acceso.php'>Ingresar</a>";
// }
コード例 #24
0
ファイル: ex.php プロジェクト: rohmad-st/fpdf
<?php

require 'subwrite.php';
$pdf = new PDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 12);
$pdf->Write(5, 'Hello World!');
$pdf->SetX(100);
$pdf->Write(5, "This is standard text.\n");
$pdf->Ln(12);
$pdf->subWrite(10, 'H', '', 33);
$pdf->Write(10, 'ello World!');
$pdf->SetX(100);
$pdf->Write(10, "This is text with a capital first letter.\n");
$pdf->Ln(12);
$pdf->subWrite(5, 'Y', '', 6);
$pdf->Write(5, 'ou can also begin the sentence with a small letter. And word wrap also works if the line is too long!');
$pdf->SetX(100);
$pdf->Write(5, "This is text with a small first letter.\n");
$pdf->Ln(12);
$pdf->Write(5, 'The world has a lot of km');
$pdf->subWrite(5, '2', '', 6, 4);
$pdf->SetX(100);
$pdf->Write(5, "This is text with a superscripted letter.\n");
$pdf->Ln(12);
$pdf->Write(5, 'The world has a lot of H');
$pdf->subWrite(5, '2', '', 6, -3);
$pdf->Write(5, 'O');
$pdf->SetX(100);
$pdf->Write(5, "This is text with a subscripted letter.\n");
$pdf->Output();
コード例 #25
0
ファイル: PDF_Footnote.php プロジェクト: jacoline/webtrees
 /**
  * PDF Footnotes number renderer
  *
  * @param PDF $pdf
  *
  * @return void
  */
 function render($pdf)
 {
     $pdf->setCurrentStyle("footnotenum");
     $pdf->Write($pdf->getCurrentStyleHeight(), $this->numText, $this->addlink);
     //source link numbers after name
 }
コード例 #26
0
            // $this->image($archivo,240,$y,10); //pon la foto en la misma columna pero cada vez 15 pixeles mas abajo, 10 es el ancho de la foto
            $y = $y + 15;
            //if ($y=200) $y=20;
            $this->Ln();
        } while ($row = mysqli_fetch_array($result));
    }
}
//fin de la definicion de la clase extendida de fpdf
//----------------------------------------------------
//conexion a la base de datos
require_once '../../lib/config.php';
// $conn = mysqli_connect("localhost","root","");
// mysqli_select_db("prally", $conn);
$result = mysqli_query($conn, "SELECT num_equipo, nombre, nivel, representante, fecha_reg, calendario from equipos");
//devuelve true si se pudo hacer la consulta, y falso en caso contrario
//si hay registros insertados
if (mysqli_num_rows($result)) {
    $pdf = new PDF('L', 'mm', 'Letter');
    //Titulos de las columnas
    $encabezados = array('Equipo', 'Nombre', 'Nivel', 'Representante', 'Fecha de Registro', 'Calendario');
    $pdf->SetFont('Arial', '', 12);
    $pdf->AddPage();
    $pdf->Write(10, 'Listado de los Equipos del Rally', '');
    $pdf->Ln();
    $pdf->FancyTable($encabezados, $result);
    //dibuja la tabla con la funcion FancyTable
    //<img src="../../images/participantes/$row['foto']" width='50px' height='60px'/>
    $pdf->Output();
} else {
    echo "¡ La base de datos está vacia !";
}
コード例 #27
0
        $this->Ln();
    }
}
$pdf = new PDF('L', 'mm', 'A4');
$pdf->SetMargins(20, 25, 30);
$pdf->SetFont('Arial', '', 10);
$pdf->SetAutoPageBreak(true, 25);
$pdf->AddPage();
session_start();
$productos = $_SESSION['datosclientef'];
$fecha1 = $_SESSION['fecha1'];
$fecha2 = $_SESSION['fecha2'];
$pdf->Ln();
$aux = $salida;
$pdf->SetFont('Arial', 'B', 12);
$pdf->Write(6, 'Rango de fechas  de : ' . $fecha1 . ' hasta :' . $fecha2);
$pdf->SetFont('Arial', '', 10);
$pdf->Ln();
if ($productos === true) {
    $consultaproductosactivos = mysql_query("SELECT cc FROM tb_usuarios WHERE estado='Activo' and tipo='Cliente'");
    while ($result = mysql_fetch_array($consultaproductosactivos)) {
        $id = $result["cc"];
        $consulta = mysql_query("SELECT id_salida,fecha,factura_salida FROM tb_salidas WHERE tipo='Remision' and fecha between '{$fecha1}' and '{$fecha2}' and cliente='{$id}' order by fecha asc");
        $consulta1 = mysql_fetch_array(mysql_query("SELECT nombre from tb_usuarios WHERE cc='{$id}'  "));
        $nombre = "Cliente : " . $consulta1['nombre'];
        if (mysql_num_rows($consulta) > 0) {
            $pdf->Ln();
            $aux = $salida;
            $pdf->SetFont('Arial', 'B', 12);
            $pdf->Write(6, $nombre);
            $pdf->SetFont('Arial', '', 10);
コード例 #28
0
     //Lists feature names:
     // foreach($features as $fkey => $featurename){
     // $pdf->Ln(.4);
     // $pdf->Cell(0.3);$pdf->Cell(0, 0, $featurename);
     // }
     //wordwraps the feature names:
     $pdf->Ln(0.2);
     $featurestring = "";
     foreach ($features as $fkey => $featurename) {
         if ($fkey == 0) {
             $featurestring = $featurename;
         } else {
             $featurestring = $featurestring . ", " . $featurename;
         }
     }
     $pdf->Write(0.4, WordWrap($featurestring, 75));
     $pdf->Ln(0.2);
     $pdf->SetFont('Arial', 'B', 20);
     $pdf->Ln(0.5);
     // $pdf->Cell(0.3);
     // $pdf->Cell(0, 0, "Report Timeframe: ".$year);
 }
 // // //this block wordwraps
 // $pdf->SetTextColor(0,0,45);
 // $pdf->SetFont('Arial','B',10);
 // $pdf->Ln(5);
 // $pdf->Cell(0.3);$pdf->Write(0.2,WordWrap("theOID = ".array_search($feature, $features), 75));
 //
 // $pdf->SetTextColor(0,0,45);
 // $pdf->SetFont('Arial','B',10);
 // $pdf->Ln(5);
コード例 #29
0
ファイル: view_bill.php プロジェクト: hari4you/hackrmz
 
$noaddress = false;

   
   $stnoname = "Street name";
   $prov = "Prov";
   $postal = "600110";
   $city = "chennai";

$total_due = 1000;
$taxs = 500;
$total_due= "$".number_format($total_due, 2, '.', ','); 

$pdf->Ln(7);
$pdf->SetX(5);
$pdf->Write(8,"$name"); 
$pdf->Ln(7);
$pdf->SetX(5);
$pdf->Write(8,"$stnoname");
$pdf->Ln(7);
$pdf->SetX(5);
$pdf->Write(8,"$city $prov $postal");
$pdf->ln(15);

$head_valur = array("Header","Amount");
$caption = array();
$caption1["header"][] = "Settlement  Period \n".$_SESSION['startdate']." to ".$_SESSION['todate'];
$caption["price"][] = "$909.34";
$pdf->SetFont('Helvetica','B',10);
$settel2 = $_SESSION['startdate']." to ".$_SESSION['todate'];
コード例 #30
0
            $y = $y + 15;
            //if ($y=200) $y=20;
            $this->Ln();
        } while ($row = mysqli_fetch_array($result));
    }
}
//fin de la definicion de la clase extendida de fpdf
//----------------------------------------------------
//conexion a la base de datos
require_once '../../lib/config.php';
// $conn = mysqli_connect("localhost","root","");
// mysqli_select_db("prally", $conn);
$result = mysqli_query($conn, "SELECT * FROM reactivos");
//devuelve true si se pudo hacer la consulta, y falso en caso contrario
//si hay registros insertados
if (mysqli_num_rows($result)) {
    $pdf = new PDF('L', 'mm', 'A3');
    //Titulos de las columnas
    $encabezados = array('Folio', 'Descripcion', 'Imagen Descripción', 'opción a', 'opcion b', 'opcion c', 'imagen a', 'imagen b', 'imagen c', 'respuesta', 'nivel', 'materia');
    $pdf->SetFont('Arial', '', 10);
    $pdf->AddPage();
    $pdf->Write(10, 'Listado de Reactivos del Rally', '');
    $pdf->Ln();
    $pdf->FancyTable($encabezados, $result);
    echo $encabezados . " " . $result;
    //dibuja la tabla con la funcion FancyTable
    //<img src="../../images/participantes/$row['foto']" width='50px' height='60px'/>
    $pdf->Output();
} else {
    echo "¡ La base de datos está vacia !";
}