本文整理汇总了PHP中FPDF::setFont方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDF::setFont方法的具体用法?PHP FPDF::setFont怎么用?PHP FPDF::setFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FPDF
的用法示例。
在下文中一共展示了FPDF::setFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: download
public function download($page = 'noticeview')
{
define('FPDF_FONTPATH', APPPATH . 'plugins/fpdf/font/');
require APPPATH . 'plugins/fpdf/fpdf.php';
$this->load->helper('url');
if (!file_exists(APPPATH . '/views/noticeboard/' . $page . '.php')) {
show_404();
}
$data['title'] = ucfirst($page);
// Capitalize the first letter
$data['name'] = "Nayeem";
$id = $_GET['id'];
$file = base_url() . 'uploads/' . $id . '.jpg';
$type = ".jpg";
if (@getimagesize($file)) {
$size = getimagesize($file);
} else {
$type = ".png";
$file = base_url() . 'uploads/' . $id . '.png';
$size = getimagesize(base_url() . 'uploads/' . $id . '.png');
}
//$pdf = new FPDF('p','mm',array(210,300));
if ($size[0] > $size[1]) {
$style = 'l';
} else {
$style = 'p';
}
$pdf = new FPDF($style, 'pt', array($size[0] * 3 / 4, $size[1] * 3 / 4));
$pdf->AddPage();
$pdf->setDisplayMode('fullpage');
//$pdf -> Image(base_url().'uploads/'.$id.'.png',20,20,170,260);
$pdf->Image(base_url() . 'uploads/' . $id . "" . $type, 0, 0, 0, 0);
// $pdf -> setFont ('times','B',20);
// $pdf -> cell(200,30,"Title",0,1);
$pdf->setFont('times', 'B', '20');
$pdf->write(10, "{$size['0']}, {$size['1']}");
$pdf->output($id . '.pdf', 'D');
//header('Location: ' .base_url(). 'index.php/noticeview/show?id='.$id);
}
示例2: date
//setting the start date for all transactions
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($datefrom == NULL || $dateto == NULL) {
$starting = "REVERSED TRANSACTIONS POSTED ON: " . date("F j, Y, g:i a");
} else {
$starting = "REVERSED TRANSACTIONS AS FROM " . $datefrom . " TO " . $dateto;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $this->Image('images/new.png',10,8,33);
$pdf->Image('../images/logo.png', 180, 10, -300);
$pdf->SetFont('Arial', 'B', 11);
$pdf->SetTextColor(204, 102, 0);
$pdf->Cell(40, 10, ' ' . $starting . ' AT ' . $branchname . ' BRANCH');
// Add date report ran
$pdf->SetFont('HELVETICA', 'B', 10);
$date = date("F j, Y");
$pdf->Cell(40, 30, 'Report date: ' . $date . ' REPORT BY: ' . $USER);
$pdf->SetDrawColor(0, 0, 0);
//black
//table header
$pdf->SetFillColor(102, 51, 0);
$pdf->SetTextColor(252, 252, 252);
$pdf->setFont("Arial", "B", "11");
$pdf->setXY(10, 40);
$pdf->Cell(22, 10, "TRANS ID:", 1, 0, "L", 1);
// my field headers
$pdf->Cell(25, 10, "MEMBER #:", 1, 0, "L", 1);
$pdf->Cell(55, 10, "FULL NAMES", 1, 0, "L", 1);
$pdf->Cell(20, 10, "REF NO:", 1, 0, "L", 1);
$pdf->Cell(30, 10, "TRANS DATE", 1, 0, "L", 1);
$pdf->Cell(30, 10, "FUND NAME", 1, 0, "L", 1);
$pdf->Cell(30, 10, "REASON", 1, 0, "L", 1);
示例3: FPDF
<?php
require_once "./fpdf/fpdf.php";
$pdf = new FPDF();
$pdf->addPage();
$pdf->setFont('Arial', 'B', 16);
$pdf->cell(40, 10, 'Hello Out There!');
$pdf->output();
示例4: ucwords
$sName = $this->db->query("SELECT `store_name` FROM `stores` WHERE `store_id` = {$term->store}")->first_row()->store_name;
$employee_name = ucwords(strtolower("{$term->efname} {$term->elname}"));
$manager_name = ucwords(strtolower("{$term->mfname} {$term->mlname}"));
$rehire = "No";
if ($term->rehire == 1) {
$rehire = "Yes";
} elseif ($term->rehire == 2) {
$rehire = "Conditionally";
}
$pdf = new FPDF();
$pdf->addFont('barCode39fHR', '', 'bar39fh.php');
$pdf->SetRightMargin(160);
$pdf->SetTopMargin(118);
$pdf->SetAutoPageBreak(TRUE, 62);
$pdf->AddPage();
$pdf->setFont('barCode39fHR', '', 24);
$pdf->Text(10, 20, "*4-{$tid}*");
$pdf->setFont('Arial', 'B', 18);
$pdf->Text(15, 35, 'Voluntary Termination');
$pdf->setFont('Arial', '', 10);
$pdf->Text(15, 40, "Employee: {$employee_name} ({$term->employee_id})");
$pdf->Text(15, 45, "Issued by: {$manager_name} ({$term->manager_id}) / {$sName}");
$pdf->Text(15, 55, "Termination Date:\t{$term->termination_date}");
$pdf->Text(15, 60, "Last Day: \t\t\t{$term->last_day_worked}");
$pdf->Text(15, 65, "Reason: {$term->reason_desc}");
$pdf->Text(100, 40, "Would you rehire? {$rehire}");
$pdf->Text(15, 275, "______________________________________________________");
$pdf->Text(25, 280, "Manager Signature Date");
if ($rehire != "Yes") {
$pdf->SetXY(135, 45);
$pdf->MultiCell(50, 4, "{$term->no_rehire_desc}", 1, 'J');
示例5: FPDF
<?php
require 'fpdf.php';
include "link.php";
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->addPage();
$pdf->setFont('Times', 'B', 30, 'C');
$pdf->text(10, 15, 'Dynamic Link Library');
$pdf->setFont('Helvetica', 'I', 20, 'C');
$pdf->text(10, 22.5, 'Perpustakaan Online SMK Negeri 10 Jakarta');
$pdf->setFont('Helvetica', '', 20, 'C');
$pdf->text(10, 32, 'Laporan Buku');
$pdf->text(10, 22.5, 'Perpustakaan Online SMK Negeri 10 Jakarta');
$pdf->setFont('Helvetica', '', 15, 'C');
$pdf->text(10, 39, 'Bulan ' . $_GET[bulan]);
$yi = 50;
$ya = 44;
$pdf->setFont('Arial', '', 9);
$pdf->setFillColor(183, 199, 93);
$pdf->setXY(10, $ya);
$pdf->CELL(10, 6, 'No', 1, 0, 'C', 1);
$pdf->CELL(20, 6, 'ID', 1, 0, 'C', 1);
$pdf->CELL(80, 6, 'Judul', 1, 0, 'C', 1);
$pdf->CELL(60, 6, 'Rak', 1, 0, 'C', 1);
$pdf->CELL(20, 6, 'Jumlah', 1, 0, 'C', 1);
$ya = $yi + $row;
$sql = mysql_query("select*from buku");
$i = 1;
$no = 1;
$max = 31;
$row = 6;
示例6: generatePDF
//.........这里部分代码省略.........
if (isset($data[(string) $categorie['nom']][(string) $value['nomBDD']])) {
foreach ($data[(string) $categorie['nom']][(string) $value['nomBDD']] as $idEval => $textValue) {
if (isset($data['donnees'][$idEval]['infos'])) {
$tempData[$data['donnees'][$idEval]['infos']['dateFin']][$data['donnees'][$idEval]['infos']['dateDebut']][$data['donnees'][$idEval]['infos']['date']][$idEval][] = $textValue;
}
}
}
}
$textArea = '';
$firstLoop = TRUE;
// On affiche les commentaires
krsort($tempData);
foreach ($tempData as $dateFin => $tempvalue) {
krsort($tempvalue);
foreach ($tempvalue as $dateDebut => $value2) {
krsort($value2);
foreach ($value2 as $date => $value3) {
foreach ($value3 as $commentId => $comments) {
foreach ($comments as $comment) {
if ($comment != '') {
if (!$firstLoop) {
$textArea .= PHP_EOL . PHP_EOL;
} else {
$firstLoop = FALSE;
}
// Saut de ligne
$textArea .= $comment . ' - ' . date('d/m/Y', $date) . ' #' . $commentId;
}
}
}
}
}
}
if ($textArea != '') {
// On affiche les textes dans le PDF
$pdf->Ln(20);
$pdf->SetX(20);
$pdf->setFont('Arial', '', $titleSize);
$pdf->Cell(0, $titleSize + 5, utf8_decode(constant($theinput['label'] . '_SHORT')), 0, 1, 'L', FALSE);
$pdf->setFont('Arial', '', $textSize);
$pdf->SetX(20);
$pdf->MultiCell($A4Width - 40, $textSize + 5, utf8_decode($textArea), 'LTRB', 'L', TRUE);
}
} else {
if ($theinput['type'] == 'textarea') {
// Création de l'array contenant les données à afficher sous forme [timestamp fin][timestamp début][timestamp commantaire][idCommentaire] => commentaire
$tempData = array();
foreach ($data[(string) $categorie['nom']][(string) $theinput['nomBDD']] as $commentId => $commentData) {
if (isset($data['donnees'][$commentId]['infos'])) {
$tempData[$data['donnees'][$commentId]['infos']['dateFin']][$data['donnees'][$commentId]['infos']['dateDebut']][$data['donnees'][$commentId]['infos']['date']][$commentId] = $commentData;
}
}
$textArea = '';
$firstLoop = TRUE;
// On affiche les commentaires
krsort($tempData);
foreach ($tempData as $dateFin => $tempvalue) {
krsort($tempvalue);
foreach ($tempvalue as $dateDebut => $value2) {
krsort($value2);
foreach ($value2 as $date => $value3) {
foreach ($value3 as $commentId => $comment) {
if ($comment != '') {
if (!$firstLoop) {
$textArea .= PHP_EOL . PHP_EOL;
} else {
$firstLoop = FALSE;
}
// Saut de ligne
$textArea .= $comment . ' - ' . date('d/m/Y', $date) . ' #' . $commentId;
}
}
}
}
}
if ($textArea != '') {
// On affiche les textes dans le PDF
$pdf->Ln(20);
$pdf->SetX(20);
$pdf->setFont('Arial', '', $titleSize);
$pdf->Cell(0 * $A4Width, $titleSize + 5, utf8_decode(constant($theinput['label'] . '_SHORT')), 0, 1, 'L', FALSE);
$pdf->setFont('Arial', '', $textSize);
$pdf->SetX(20);
$pdf->MultiCell($A4Width - 40, $textSize + 5, utf8_decode($textArea), 'LTRB', 'L', TRUE);
}
}
}
}
}
// On retourne le fichier PDF
$pdf->Output($pdfPath, 'F');
$output['pdfPath'] = $pdfPath;
$output['pdfURI'] = $pdfPathURI;
return $output;
}
exit;
} else {
return FALSE;
}
}
示例7: PrintTickets
//.........这里部分代码省略.........
if (!isset($tick_types[$ticket->tic_type])) {
$tick_types[$ticket->tic_type] = new evTicketType($ticket->tic_type);
}
// If we don't already have the event info, get it and construct
// the address string
if ($ev_id != $ticket->ev_id) {
$Ev = new evEvent($ticket->ev_id);
$ev_id = $Ev->id;
$addr = array();
if ($Ev->Detail->street != '') {
$addr[] = $Ev->Detail->street;
}
if ($Ev->Detail->city != '') {
$addr[] = $Ev->Detail->city;
}
if ($Ev->Detail->province != '') {
$addr[] = $Ev->Detail->province;
}
if ($Ev->Detail->country != '') {
$addr[] = $Ev->Detail->country;
}
if ($Ev->Detail->postal != '') {
$addr[] = $Ev->Detail->postal;
}
$address = implode(' ', $addr);
}
// Get the repeat(s) for the ticket(s) to print a ticket for each
// occurrence.
$repeats = evRepeat::GetRepeats($ticket->ev_id, $ticket->rp_id);
foreach ($repeats as $rp_id => $event) {
$ev_date = $event->date_start;
$ev_time = $event->time_start1 . ' - ' . $event->time_end1;
if (!empty($event->time_start2)) {
$ev_time .= '; ' . $event->time_start1 . ' - ' . $event->time_end2;
}
$fee = self::formatAmount($ticket->fee);
// Get the veritcal position of the current ticket
// for positioning the qrcode
$y = $pdf->GetY();
// Title
$pdf->SetFont('Times', 'B', 12);
$pdf->Cell(130, 10, "{$tick_types[$ticket->tic_type]->description}: {$Ev->Detail->title}", 1, 0, 'C');
$pdf->Ln(13);
$pdf->SetFont('Times', '', 12);
$pdf->SetX(-40);
$pdf->Cell(0, 30, 'Fee: ' . $fee);
if ($ticket->fee > 0) {
$pdf->Ln(5);
if ($ticket->paid >= $ticket->fee) {
$pdf->SetX(-40);
$pdf->Cell(0, 30, 'Paid');
} else {
$pdf->SetX(-55);
$due = $ticket->fee - $ticket->paid;
$pdf->Cell(0, 30, 'Balance Due: ' . self::formatAmount($due));
}
}
$pdf->SetX(20);
$pdf->Cell(0, 8, "Date:", 0, 0);
$pdf->setX(40);
$pdf->Cell(0, 8, $ev_date, 0, 1);
$pdf->Cell(0, 6, "Time:", 0, 0);
$pdf->SetX(40);
$pdf->Cell(0, 6, $ev_time, 0, 1);
if ($Ev->Detail->location != '') {
$pdf->Ln(5);
$pdf->Cell(0, 2, 'Where: ', 0, 0);
$pdf->SetX(40);
$pdf->Cell(0, 2, $Ev->Detail->location, 0, 1);
}
if (!empty($address)) {
if ($Ev->Detail->location == '') {
$pdf->Ln(5);
$pdf->Cell(0, 2, 'Where: ', 0, 0);
}
$pdf->Ln(4);
$pdf->SetX(40);
$pdf->Cell(0, 2, $address, 0, 1);
}
// Footer
$pdf->Ln(6);
$pdf->setFont('Times', 'I', 10);
$pdf->Cell(0, 10, $_CONF['site_name'], 0, 0);
$pdf->Ln(6);
$pdf->Cell(0, 10, $ticket->tic_id);
// print qrcode if possible
$params['data'] = $checkin_url . $tic_id . '&rp=' . $rp_id;
$qrc_status = LGLIB_invokeService('qrcode', 'getcode', $params, $qrcode, $svc_msg);
if ($qrc_status == PLG_RET_OK) {
$pdf->SetX(-40);
$pdf->Image($qrcode['path'], null, $y, 25);
}
$pdf->Ln();
$y = $pdf->GetY();
$pdf->Line(10, $y, 200, $y);
$pdf->Ln();
}
}
$pdf->Output();
}
示例8: generatePDF
//.........这里部分代码省略.........
$pdf->SetY($A4Width - 40);
$textSize = 10;
$pdf->SetFont('Arial', 'I', $textSize);
// Ligne de demarcation
$pdf->Line(15, $pdf->getY(), $A4Height - 15, $pdf->getY());
// Accès aux résultats
$pdf->SetX(0.5 * $A4Height);
$pdf->Cell(0.5 * $A4Height - 15, $textSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_FOOTER_FULLRESULT . ' ' . getPageUrl('evalView', array('evaluationType' => 1, 'service' => $data['service']['id']))), 0, 1, 'R', 0);
// Coordonées CSG
if ($commentMSG) {
$pdf->SetFont('Arial', 'B', $textSize);
$pdf->SetX(15);
$pdf->Cell($A4Height - 15, $textSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_FOOTER_STRUCTURENAME . ' - ' . CONTACT_STAGE_MAIL), 0, 0, 'C', 0);
}
/**
Commentaires
**/
// Ajout des commentaires, points positifs et points négatifs : 'pdfComment'
if ($comment) {
$pdf->addPage('P', 'A4');
// Titre
$pdf->SetFont('Arial', 'B', $titleSize);
$pdf->SetFillColor(70, 70, 242);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetX(floor(0.1 * $A4Width));
$pdf->Cell(floor(0.8 * $A4Width), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_COMMENT_TITLE), 'LRTB', 1, 'C', TRUE);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFillColor(245, 245, 245);
// Les commentaires
$input = $form->xpath('categorie/input[@pdfComment="1"]');
foreach ($input as $theinput) {
$categorie = $theinput->xpath('..')[0];
if ($theinput['type'] == 'text') {
$textArea = '';
$firstLoop = TRUE;
foreach ($theinput->text as $text) {
if (isset($data[(string) $categorie['nom']][(string) $text['nomBDD']])) {
foreach ($data[(string) $categorie['nom']][(string) $text['nomBDD']] as $comment) {
if ($comment != '') {
if (!$firstLoop) {
$textArea .= PHP_EOL . PHP_EOL;
} else {
$firstLoop = FALSE;
}
// Saut de ligne
$textArea .= $comment;
}
}
}
}
if ($textArea != '') {
// On affiche les textes dans le PDF
$pdf->Ln(20);
$pdf->SetX(20);
$pdf->setFont('Arial', '', $titleSize);
$pdf->Cell(0, $titleSize + 5, utf8_decode(constant($theinput['label'] . '_SHORT')), 0, 1, 'L', FALSE);
$pdf->setFont('Arial', '', $textSize);
$pdf->SetX(20);
$pdf->MultiCell($A4Width - 40, $textSize + 5, utf8_decode($textArea), 'LTRB', 'L', TRUE);
}
} else {
if ($theinput['type'] == 'textarea') {
$textArea = '';
$firstLoop = TRUE;
if (isset($data[(string) $categorie['nom']][(string) $theinput['nomBDD']])) {
foreach ($data[(string) $categorie['nom']][(string) $theinput['nomBDD']] as $comment) {
if (!$firstLoop) {
$textArea .= PHP_EOL . PHP_EOL;
} else {
$firstLoop = FALSE;
}
// Saut de ligne
$textArea .= $comment;
}
}
if ($textArea != '') {
// On affiche les textes dans le PDF
$pdf->Ln(20);
$pdf->SetX(20);
$pdf->setFont('Arial', '', $titleSize);
$pdf->Cell(0 * $A4Width, $titleSize + 5, utf8_decode(constant($theinput['label'] . '_SHORT')), 0, 1, 'L', FALSE);
$pdf->setFont('Arial', '', $textSize);
$pdf->SetX(20);
$pdf->MultiCell($A4Width - 40, $textSize + 5, utf8_decode($textArea), 'LTRB', 'L', TRUE);
}
}
}
}
}
// On retourne le fichier PDF
$pdf->Output($pdfPath, 'F');
$output['pdfPath'] = $pdfPath;
$output['pdfURI'] = $pdfPathURI;
return $output;
}
exit;
} else {
return FALSE;
}
}
示例9: date
$statement->Cell(160);
$statement->Cell(160, 06, 'Account NO: ' . $accno, 'R');
$statement->Ln();
$statement->Cell(10, 06, $town, 'L');
$statement->Cell(160);
$statement->Cell(160, 06, 'Statement Date: ' . date("D,d-M-Y", time()), 'R');
$statement->Ln();
$statement->Cell(10, 06, 'Telephone. No: ' . $row_mem[2], 'L');
$statement->Cell(160);
$statement->Cell(160, 06, 'NAV Date: ' . $navs[0], 'R');
$statement->Ln();
$statement->Cell(10, 06, 'Email Address: ' . $row_mem[4], 'L');
$statement->Ln();
$statement->Cell(200, 5, "********************************************************************************************************************************************");
/* * **********************Show the member transations******************************************************************* */
$statement->Ln();
$statement->SetFont('Arial', 'B', 9);
$statement->Cell(200, 10, " DETAILS. PURCHASES. SALES. BALANCE.");
$statement->SetFillColor(102, 51, 0);
$statement->SetTextColor(252, 252, 252);
$statement->setFont("Arial", "B", "9");
$statement->setXY(10, 100);
$statement->Cell(15, 10, "R NO:", 1, 0, "L", 1);
// header fields
$statement->Cell(20, 10, "T DATE:", 1, 0, "L", 1);
$statement->Cell(25, 10, "UNITS:", 1, 0, "L", 1);
$statement->Cell(20, 10, "PRICE", 1, 0, "L", 1);
$statement->Cell(35, 10, "COST:", 1, 0, "L", 1);
$statement->Cell(25, 10, "UNITS:", 1, 0, "L", 1);
$statement->Cell(25, 10, "PRICE", 1, 0, "L", 1);
$statement->Cell(25, 10, "COST:", 1, 0, "L", 1);
示例10: foreach
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(50, 20, '');
$str = utf8_decode('ESRC - ESCOLA SUPERIOR DE TECNOLOGIA E EDUCAÇÃO DE RIO CLARO');
$pdf->Cell(0, 20, $str, 0, 0, 'C');
$pdf->SetFont('Arial', 'B', 14);
$str = utf8_decode('ASSER - ASSOCIAÇÃO DAS ESCOLAS REUNIDAS');
$pdf->Cell(-140, 40, $str, 0, 1, 'C');
//certificado
$pdf->SetFont('arial', 'B', 34);
$pdf->Cell(0, 30, "CERTIFICADO", 0, 1, 'C');
//certificamos
$pdf->SetFont('arial', 'B', 14);
$pdf->Cell(0, 20, "Certificamos que " . utf8_decode($nome) . ",", 0, 1, 'C');
//texto
$str = utf8_decode('Participou da IX - Semana Conhecimento e VI - Mostra de Iniciação Científica 2015 das Faculdades ASSER - Rio Claro, realizada no período de 14 a 18 de dezembro, como ouvinte totalizando ' . $total . ' horas.');
$pdf->setFont('arial', '', 14);
$pdf->MultiCell(0, 10, $str, 0, 'J');
$pdf->Cell(0, 5, "", 0, 1, 'C');
$pdf->Cell(0, 10, "Rio Claro, 18 de dezembro de 2015.", 0, 1, 'C');
$pdf->Cell(0, 10, "_______________________________", 0, 1, 'C');
$pdf->Cell(0, 5, "Prof. Dr. Artur Darezzo Filho", 0, 1, 'C');
$pdf->Cell(0, 5, "Diretor da ESRC/ASSER", 0, 1, 'C');
$pdf->Image('logo.png', 250, 170, -300);
$pdf->AddPage();
$pdf->setFont('arial', 'B', 14);
$str = utf8_decode('Programação IX - Semana Conhecimento e VI - Mostra de Iniciação Científica - 2015');
$pdf->Cell(0, 20, $str, 0, 1, 'C');
$pdf->setFont('arial', '', 11);
try {
$ppalestra = "SELECT palestra FROM palestras WHERE pago='1' AND ra='{$ra}' AND presenca=1 order by palestra";
foreach ($link->query($ppalestra) as $row) {
示例11: foreach
$pdf->SetRightMargin($val[0]);
break;
case "SetTopMargin":
$pdf->SetTopMargin($val[0]);
break;
case "MultiCell":
$pdf->MultiCell($val[0], $val[1], $val[2], $val[3], $val[4]);
break;
case "SetXY":
$pdf->SetXY($val[0], $val[1]);
break;
case "Rect":
$pdf->Rect($val[0], $val[1], $val[2], $val[3]);
break;
case "setFont":
$pdf->setFont($val[0], $val[1], $val[2]);
break;
case "Text":
$pdf->Text($val[0], $val[1], $val[2]);
break;
}
}
foreach ($bottom as $val) {
switch ($val["type"]) {
case "MultiCell":
$pdf->MultiCell($val[0], $val[1], $val[2], $val[3], $val[4]);
break;
case "Rect":
$pdf->Rect($val[0], $val[1], $val[2], $val[3]);
break;
case "setFont":
示例12: FPDF
function genCarpentras2()
{
global $options;
# paramètres
$mg = 3;
// Marge de gauche => initial 17
$mh = 13;
// Marge du haut => initial 9
$md = 0;
// Marge de droite
$mb = 11;
// Marge du bas
$largeur_etiquette = 70;
// largeur_etiquette => initial 60
$espace_etiquettes = 0;
// => initial 7
$nb_ligne_etiquettes = 11;
$nb_etiquette_ligne = 3;
$hauteur_etiquette = 25;
// Préparation du document PDF.
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->Open();
$pdf->SetLeftMargin($mg);
$pdf->SetTopMargin($mh);
$pdf->SetAutoPageBreak(1, 0);
$pdf->AddPage();
// Gestion des fonts
$pdf->AddFont('code39', '', 'IDAutomation_Code_39.php');
$pdf->SetFont('times', '', 12);
// Préparation des informations.
$nom = strtoupper($this->patient->getNom());
$prenom = strtoupper($this->patient->getPrenom());
$date = new clDate($this->patient->getDateNaissance());
$dateN = $date->getDate("d/m/Y");
if ($this->patient->getSexe() == "F") {
$sexe = "F";
$e = "e";
} elseif ($this->patient->getSexe() == "M") {
$sexe = "M";
$e = "";
} else {
$sexe = "Ind.";
$e = "";
}
$date->setDate($this->patient->getDateAdmission());
$led = $date->getDate("d/m/Y");
$ipp = $this->patient->getILP();
$nsej = $this->patient->getNSej();
$uf = $this->patient->getUF();
for ($i = 0; $i < $nb_ligne_etiquettes; $i++) {
for ($j = 0; $j < $nb_etiquette_ligne; $j++) {
$l = $j * $largeur_etiquette + $mg;
$h = $i * $hauteur_etiquette + $mh;
$le = $largeur_etiquette - $mg;
$pdf->setY($h);
$pdf->setX($l);
$pdf->setFont('times', '', 9);
$pdf->Cell($le, 4, "Dossier : ", 0, 0, L);
$pdf->setY($h);
$pdf->setX($l + 17);
$pdf->setFont('times', 'b', 9);
$pdf->cell($le - 10, 4, $nsej, 0, 0, L);
//$pdf->setFont('times', '', 9 ) ;
$pdf->setY($h);
$pdf->setX($l);
$pdf->cell($le - 10, 4, "U", 0, 0, R);
$pdf->setY($h + 4);
$pdf->setX($l);
$pdf->setFont('times', '', 9);
$pdf->cell($le, 4, $nom . " " . $prenom, 0, 0, L);
$pdf->setY($h + 9);
$pdf->setX($l);
$pdf->cell($le, 4, "Né{$e} le : {$dateN}", 0, 0, L);
$pdf->setY($h + 9);
$pdf->setX($l);
$pdf->cell($le - 10, 4, "Sexe : {$sexe}", 0, 0, R);
$pdf->setY($h + 13);
$pdf->setX($l);
$pdf->cell($le, 4, "Le : {$led}", 0, 0, L);
$pdf->setY($h + 13);
$pdf->setX($l);
$pdf->cell($le - 10, 4, "UF : {$uf}", 0, 0, R);
$pdf->setY($h + 17);
$pdf->setX($l);
$pdf->cell($le - 10, 4, "NIP : {$ipp}", 0, 0, L);
}
}
$pdf->Output();
}
示例13:
$pdf->Cell(10, 5, '', 1, 0, "C");
$pdf->Cell(15, 5, 'NATA', 0, 1, "C");
}
$pdf->Cell(1, 1, '', 0, 1, "C");
$pdf->Cell(210, 4, '', 0, 1, "C");
$pdf->SetFont('Arial', '', 12);
$pdf->SetTextColor(0, 0, 0);
$pdf->Cell(80, 0, '', 0, 0, "C");
if (strtoupper($course) == "INTERIOR DESIGN") {
$pdf->Cell(10, 5, $pdf->Image($image12, $pdf->GetX(), $pdf->GetY(), 10, 5), 1, 0, 'L', false);
$pdf->Cell(41, 5, 'INTERIOR DESIGN', 0, 1, "C");
} else {
$pdf->Cell(10, 5, '', 1, 0, "C");
$pdf->Cell(41, 5, 'INTERIOR DESIGN', 0, 1, "C");
}
$pdf->setFont('Arial', '', 12);
$pdf->Cell(20, 15, 'Surname', 0, 0, "L");
$pdf->setFont('Arial', '', 12);
$pdf->Cell(10, 0, '', 0, 0, "C");
$pdf->Cell(40, 15, $surname, 0, 1, "L");
$pdf->SetFillColor(150, 150, 150);
$pdf->Rect(40, 90, 114, 0.5, 'F');
$pdf->setFont('Arial', '', 12);
$pdf->Cell(20, 5, 'Firstname', 0, 0, "L");
$pdf->setFont('Arial', '', 12);
$pdf->Cell(10, 0, '', 0, 0, "C");
$pdf->Cell(40, 5, $firstname, 0, 1, "L");
$pdf->SetFillColor(150, 150, 150);
$pdf->Rect(40, 100, 114, 0.5, 'F');
// Explora icon
$pdf->setXY(160, 61);
示例14: FPDF
<?php
define('FPDF_FONTPATH', '.');
require '../../fpdf.php';
$pdf = new FPDF();
$pdf->addFont('Calligrapher', '', 'calligra.php');
$pdf->addPage();
$pdf->setFont('Calligrapher', '', 35);
$pdf->cell(0, 10, 'Enjoy new fonts with FPDF!');
$pdf->output();
示例15: FPDF
} else {
$pdf = new FPDF('L');
$pdf->AddPage();
$pdf->Image('logo1.png', 10, 10, -450);
$pdf->SetFont('times', 'B', 16);
$pdf->Cell(50, 20, '');
$str = utf8_decode('ESRC - ESCOLA SUPERIOR DE TECNOLOGIA E EDUCAÇÃO DE RIO CLARO');
$pdf->Cell(0, 20, $str, 0, 0, 'C');
$pdf->SetFont('times', 'B', 14);
$str = utf8_decode('ASSER - ASSOCIAÇÃO DAS ESCOLAS REUNIDAS');
$pdf->Cell(-140, 40, $str, 0, 1, 'C');
//certificado
$pdf->SetFont('times', 'B', 34);
$pdf->Cell(0, 30, "CERTIFICADO", 0, 1, 'C');
//certificamos
$pdf->SetFont('times', 'B', 14);
$pdf->Cell(0, 20, "Certificamos que " . $session->get('nome') . ",", 0, 1, 'C');
//texto
$str = 'Participou da VII - Mostra de Iniciação Científica 2016 das Faculdades ASSER - Rio Claro,
realizada no período de 30 de maio a 01 de juno, com apresentação ' . $tipo . ' do trabalho intitulado ' . $titulo . '.';
$pdf->setFont('times', '', 12);
$pdf->MultiCell(0, 10, $str, 0, 'J');
$pdf->Cell(0, 10, "", 0, 1, 'C');
$pdf->Cell(0, 10, "Rio Claro, 05 de junho de 2016.", 0, 1, 'C');
$pdf->Cell(0, 10, "_______________________________", 0, 1, 'C');
$pdf->Cell(0, 5, "Prof. Dr. Artur Darezzo Filho", 0, 1, 'C');
$pdf->Cell(0, 5, "Diretor da ESRC/ASSER", 0, 1, 'C');
$pdf->Image('logo.png', 250, 170, -300);
ob_clean();
$pdf->Output("Certificado.pdf", "D");
}