本文整理汇总了PHP中PDF::Write方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::Write方法的具体用法?PHP PDF::Write怎么用?PHP PDF::Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF
的用法示例。
在下文中一共展示了PDF::Write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createHandlePDF
/**
*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: generate
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;
//.........这里部分代码省略.........
示例3: PutLink
}
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: PDF
$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: array
//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: PutLink
}
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: PDF
$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: while
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: PDF
<?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: PDF
$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: while
$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ás accediendo a una página restringida, para ver su contenido debes estar registrado.<br />\n <a href='../../login/acceso.php'>Ingresar</a>";
}
示例12: DateTime
$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: array
$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:
$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: PDF
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