本文整理汇总了PHP中PDF::AddFont方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::AddFont方法的具体用法?PHP PDF::AddFont怎么用?PHP PDF::AddFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF
的用法示例。
在下文中一共展示了PDF::AddFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
$this->Line(20, 277, 190, 277);
$this->SetY(-20);
$vFecha = date("d-m-Y H:i:s");
$this->Cell(120, 4, "Fecha: " . $vFecha, 0, 0, 'L');
$this->Cell(50, 4, 'WebApp', 0, 0, 'R');
}
function Body($usuarios)
{
//global $sEstupdf;
$this->SetFont('arial', '', 8);
$vCont = 1;
foreach ($usuarios as $clave => $usuario) {
$this->Cell(7, 5, $vCont, 'B', 0, 'C');
$this->Cell(13, 5, $usuario['codProyecto'], 'B', 0, 'C');
$this->Cell(60, 5, ucwords(strtolower($usuario['notario'])), 'B', 0, 'L');
//$this->Cell(60,5, ucwords(strtolower($usuario['paterno'].' '.$usuario['materno'].' '.$usuario['nombres'])), 'B', 0, 'L');
$this->Cell(60, 5, ucwords(strtolower($usuario['fechaInicio'])), 'B', 0, 'L');
//$this->Cell(30,5,$usuario['clave'], 'B', 0, 'C');
$this->Ln();
$vCont++;
}
}
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->SetMargins(20, 20);
$pdf->AliasNbPages();
$pdf->AddFont('arialn', '', 'arialn.php');
$pdf->AddFont('arialn', 'B', 'arialnb.php');
$pdf->AddPage();
$pdf->Body($_SESSION['oPDF']);
$pdf->Output();
示例2: CIENTO
require_once 'FlowingBlockFPDF.php';
$nombreTemporal = "KEVIN ALEXANDER VALLADARES ARGUELLO";
$numCuentaTemporal = "20070000804";
$numIdentidadTemporal = "1701-1989-00998";
$calificacion = "100 POR CIENTO(%)";
$nombreSecretario = "JORGE ALBERTO MATUTE OCHOA";
$fechaPalabras = "veintidós días del mes de julio de dos mil quince.";
if (isset($_POST["arregloHimno"]) && isset($_POST["cadena"]) && isset($_POST["arregloCodsHimno"]) && isset($_POST["fechaExp"])) {
$listaDNI = $_POST["arregloHimno"];
$listaCodsHimno = $_POST["arregloCodsHimno"];
$fechaExp = $_POST["fechaExp"];
$codsHimno = explode(',', $listaCodsHimno);
$tok = explode(',', $listaDNI);
$tam = count($tok);
$pdf = new PDF('P', 'cm', array(21.59, 33.02));
$pdf->AddFont('Calibri', 'B', 'calibrib.php');
$pdf->AddFont('Cambria', 'BI', 'cambriaz.php');
$pdf->AddFont('Cambria', 'I', 'cambriai.php');
for ($i = 0; $i < $tam; $i++) {
$statement = $db->prepare('CALL SP_OBTENER_ESTUDIANTE_CONDUCTA(?, @pcMensajeError)');
$statement->bindValue(1, $tok[$i]);
$statement->execute();
$contadorFilas = $statement->rowCount();
if ($contadorFilas >= 1) {
$tabla = $statement->fetchALL(PDO::FETCH_ASSOC);
}
foreach ($tabla as $fila) {
$nombreTemporal = mb_strtoupper($fila['NOMBRE'], 'utf-8');
$numCuentaTemporal = $fila['CUENTA'];
$numIdentidadTemporal = $fila['DNI'];
}
示例3: strtolower
$nombrecompleto = str_replace(" ", "_", strtolower($nombrecompleto));
if (pg_result($curso, 0, 'tipo_matricula') == 'CDA') {
$year = date('y', strtotime(pg_result($curso, 0, 'fecha_inicio')));
} else {
$year = date('y');
}
$codigo = $year . '-' . str_pad($curso_id, 4, "0", STR_PAD_LEFT) . '-' . str_pad($id, 4, "0", STR_PAD_LEFT);
//IDIOMA DEL CURSO
$idioma = pg_result($curso, 0, 'idioma');
//echo $idioma;
include 'includes/internacionalizacion.php';
if ($edicion == 'OFF' && $est == 'APR' && $est_admin == 'ON') {
$pdf = new PDF("P", "cm", "A4");
$pdf->AddPage();
//define("FPDF_FONTPATH", "/usr/share/fonts/truetype/ttf-dejavu");
$pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
if ($curso_id == 36) {
//Imagen de Coopeciagro Gustavo Aguero
$pdf->Image('img/certificados/certificado-firmado-sellado-training_coopeciagro.jpg', 0, 0, 21, 29.7);
} elseif ($curso_id == 214) {
//Curso Presencial en Nicaragua dictado por Jose Campos de Gustavo Aguero
$pdf->Image('img/certificados/certificado-firmado-sellado-training_gustavo3.jpg', 0, 0, 21, 29.7);
} elseif ($curso_id == 258 || $curso_id == 290) {
//Curso GISMAP WEBMINAR
$pdf->Image('img/certificados/certificado-GISMAP-WEBMINAR.jpg', 0, 0, 21, 29.7);
} elseif ($curso_id == 243) {
//Segundo Curso en Nicaragua Nivel Intermedio dictado por Gustavo Aguero
$pdf->Image('img/certificados/certificado-firmado-sellado-training_gustavo4.jpg', 0, 0, 21, 29.7);
} elseif ($curso_id == 241) {
//Fundacion Tripartita
$pdf->Image('img/certificados/certificado_tripartita.jpg', 0, 0, 21, 29.7);
示例4: foreach
//Color and font restoration
$this->SetFillColor(224, 235, 255);
$this->SetTextColor(0);
$this->SetFont('');
//Data
$fill = false;
foreach ($data as $row) {
$this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);
$this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);
$this->Cell($w[2], 6, number_format($row[2]), 'LR', 0, 'R', $fill);
$this->Cell($w[3], 6, number_format($row[3]), 'LR', 0, 'R', $fill);
$this->Ln();
$fill = !$fill;
}
$this->Cell(array_sum($w), 0, '', 'T');
}
}
$pdf = new PDF();
//Column titles
$header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)');
//Data loading
$data = $pdf->LoadData('table_data_demo.txt');
$pdf->AddFont('arialunicid0', '', 'arialunicid0.php');
$pdf->SetFont('arialunicid0', '', 14);
$pdf->AddPage();
$pdf->BasicTable($header, $data);
$pdf->AddPage();
$pdf->ImprovedTable($header, $data);
$pdf->AddPage();
$pdf->FancyTable($header, $data);
$pdf->Output();
示例5: Footer
$this->Cell(40, 5, utf8_decode($_GET['fin']), 0, 1, 'C', 0);
$this->SetFont('Amble-Regular', '', 10);
$this->Ln(5);
}
function Footer()
{
$this->SetY(-15);
$this->SetFont('Arial', 'I', 8);
$this->Cell(0, 10, 'Pag. ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
}
}
$pdf = new PDF('P', 'mm', 'a4');
$pdf->AddPage();
$pdf->SetMargins(0, 0, 0, 0);
$pdf->AliasNbPages();
$pdf->AddFont('Amble-Regular');
$pdf->SetFont('Amble-Regular', '', 10);
$pdf->SetFont('Arial', 'B', 9);
$pdf->SetX(5);
$pdf->SetFont('Amble-Regular', '', 9);
$consulta = pg_query("select id_director, identificacion_dire ,nombres,direccion,telefono,celular from directores where id_director='{$_GET['id']}'");
while ($row = pg_fetch_row($consulta)) {
$pdf->SetX(1);
$pdf->SetFillColor(187, 179, 180);
$pdf->Cell(25, 6, maxCaracter(utf8_decode('RUC/CI:'), 15), 1, 0, 'L', 0);
$pdf->Cell(60, 6, maxCaracter(utf8_decode($row[1]), 15), 1, 0, 'L', 0);
$pdf->Cell(25, 6, maxCaracter(utf8_decode('DIRECTOR'), 15), 1, 0, 'L', 0);
$pdf->Cell(95, 6, maxCaracter(utf8_decode($row[2]), 50), 1, 1, 'L', 0);
$pdf->SetX(1);
$pdf->Cell(25, 6, maxCaracter(utf8_decode('TELF:'), 15), 1, 0, 'L', 0);
$pdf->Cell(60, 6, maxCaracter(utf8_decode($row[4] . '-' . $row[5]), 20), 1, 0, 'L', 0);
示例6: pdf
/**
* Genera un reporte en PDF
*
* @param array $result
* @param array $sumArray
* @param string $title
* @param array $weightArray
* @param array $headerArray
*/
function pdf($result, $sumArray, $title, $weightArray, $headerArray)
{
$config = Config::read('config');
$active_app = Router::get_application();
//Orientación
if ($sumArray > 200) {
$orientation = 'L';
} else {
$orientation = 'P';
}
$numRows = 140;
//Tipo de Papel
if ($sumArray > 250) {
$paper = 'legal';
} else {
$paper = 'letter';
}
if ($paper == 'letter' && $orientation == 'P') {
$widthPage = 220;
$numRows = 42;
}
if ($paper == 'legal' && $orientation == 'L') {
$widthPage = 355;
$numRows = 30;
}
if ($paper == 'letter' && $orientation == 'L') {
$widthPage = 270;
$numRows = 30;
}
//Crear Documento PDF
$pdf = new PDF($orientation, 'mm', $paper);
$pdf->Open();
$pdf->AddPage();
//Nombre del Listado
$pdf->SetFillColor(255, 255, 255);
$pdf->AddFont('Verdana', '', 'verdana.php');
$pdf->SetFont('Verdana', '', 14);
$pdf->SetY(20);
$pdf->SetX(0);
$pdf->Ln();
if ($config->{$active_app}->name) {
$pdf->MultiCell(0, 6, strtoupper($config->{$active_app}->name), 0, "C", 0);
}
$pdf->MultiCell(0, 6, "REPORTE DE " . strtoupper($title), 0, "C", 0);
$pdf->SetFont('Verdana', '', 12);
if (isset($_SESSION['fecsis'])) {
$pdf->MultiCell(0, 6, "FECHA " . date("Y-m-d"), 0, "C", 0);
}
$pdf->Ln();
//Colores, ancho de línea y fuente en negrita
$pdf->SetFillColor(0xf2, 0xf2, 0xf2);
$pdf->SetTextColor(0);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetLineWidth(0.2);
$pdf->SetFont('Arial', 'B', 10);
if ($weightArray[0] < 11) {
$weightArray[0] = 11;
}
//Parametros del Reporte
$pos = floor($widthPage / 2 - $sumArray / 2);
$pdf->SetX($pos);
for ($i = 0; $i <= count($headerArray) - 1; $i++) {
$pdf->Cell($weightArray[$i], 7, $headerArray[$i], 1, 0, 'C', 1);
}
$pdf->Ln();
//Restauración de colores y fuentes
$pdf->SetFillColor(224, 235, 255);
$pdf->SetTextColor(0);
$pdf->SetFont('Arial', 'B', 7);
//print_r($weightArray);
//Buscamos y listamos
$n = 1;
$p = 1;
$t = 0;
foreach ($result as $row) {
//$pdf->Cell(Ancho, Alto, contenido, ?, ?, Align)
if ($n > $numRows || $p == 1 && $n > $numRows - 3) {
$pdf->AddPage($orientation);
$pdf->SetY(30);
$pdf->SetX($pos);
$pdf->SetFillColor(0xf2, 0xf2, 0xf2);
$pdf->SetTextColor(0);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetLineWidth(0.2);
$pdf->SetFont('Arial', 'B', 10);
for ($i = 0; $i < count($headerArray); $i++) {
$pdf->Cell($weightArray[$i], 7, $headerArray[$i], 1, 0, 'C', 1);
}
$pdf->Ln();
$pdf->SetFillColor(224, 235, 255);
$pdf->SetTextColor(0);
//.........这里部分代码省略.........
示例7: PDO
}
}
include '../db/conn.inc.php';
$dbh = new PDO($conn, $user, $pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$stmtMeucci = $dbh->prepare("SELECT * FROM datimeucci");
$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);
示例8: die
}
}
// echo $query_Recordset1;
$Recordset1 = mysqli_query($db_con, $query_Recordset1) or die(mysqli_error("No es posible conectar"));
#crea la consulata
$totalRows_Recordset1 = mysqli_num_rows($Recordset1);
#cantidad de registros
$pdf = new PDF();
$curso = 'Curso ' . $config['curso_actual'];
$curso_an = date('Y');
$mes_an = date('m');
//$curso_an=substr($curso,6,4)+1;
//echo "$config['curso_actual'] => $curso_an<br />";
$pdf->SetFillColor(255, 255, 255);
$pdf->AddPage();
$pdf->AddFont('c128ab');
$n = 1;
# carnet nº 1
while ($row_Recordset1 = mysqli_fetch_array($Recordset1)) {
$fecha0 = str_replace("/", "-", $row_Recordset1[4]);
$tr = explode("-", $fecha0);
$fecha = "{$tr['2']}-{$tr['1']}-{$tr['0']}";
$fecha4 = "{$tr['1']}-{$tr['0']}-{$tr['2']}";
$claveal = $row_Recordset1[0];
$unidad = $row_Recordset1[1];
$apellidos = $row_Recordset1[2];
$nombre = $row_Recordset1[3];
$combasi = $row_Recordset1[5];
if ($n_bib > 0) {
$c_bib = $row_Recordset1[6];
$claveal_bib .= " " . $c_bib;
示例9: PDF
<?php
if (empty($_SESSION)) {
session_start();
}
ini_set('error_reporting', E_ALL);
require_once "../modelos/Consulta.reportes.php";
require_once "PDF.php";
if (isset($idCertificado)) {
$pdf = new PDF('P', 'mm', 'letter');
$pdf->AddFont('gothic', '', 'gothic.php');
$pdf->AddFont('gothicb', 'B', 'gothicb.php');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('gothic', '', 13);
$pdf->SetMargins(30, 30, 25);
$pdf->SetAutoPageBreak(true, 0);
$consulta = new Consulta();
//$id = $_GET["idCertificado"];
$id = $idCertificado;
$datos = $consulta->getDatosCertificadoCartera($id);
$fecha_certificado_f = explode('-', $datos[2]);
$fecha_certificado_f2 = explode('-', $datos[3]);
$nroCertificado = $datos[6];
$pdf->SetY(37);
$pdf->Ln(6);
$pdf->SetFont('gothicb', 'B', 22);
$pdf->Ln(5);
$titulo = "CERTIFICACIÓN";
$pdf->Cell(0, 0, utf8_decode($titulo), 0, 0, 'C');
$pdf->SetY(55);
示例10: PDF
$this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);
$this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);
$this->Cell($w[2], 6, $row[2], 'LR', 0, 'L', $fill);
$this->Cell($w[3], 6, $row[3], 'LR', 0, 'L', $fill);
$this->Cell($w[4], 6, $row[4], 'LR', 0, 'L', $fill);
$this->Ln();
$fill = !$fill;
}
$this->Cell(array_sum($w), 0, '', 'T');
}
}
//Instanciation of inherited class
$pdf = new PDF('P', 'mm', 'a4');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->AddFont('verdana', '', 'verdana.php');
$pdf->AddFont('verdana', 'B', 'verdana.php');
$pdf->AddFont('verdana', 'U', 'verdana.php');
$pdf->SetY(20);
$pdf->SetFont('verdana', '', 9);
$pdf->Cell(50, 5, "Ganacias Periodo: ", 0);
$pdf->SetFont('verdana', 'U', 9);
$pdf->Cell(30, 5, $data["gananciasTotales"], 0);
$pdf->SetFont('verdana', '', 9);
$pdf->Cell(70, 5, "Productos Comprados: ", 0);
$pdf->SetFont('verdana', 'U', 9);
$pdf->Cell(40, 5, $data["productosComprados"], 0);
$pdf->Ln();
$pdf->SetFont('verdana', '', 9);
$pdf->Cell(50, 5, "Gastos de Producto: ", 0);
$pdf->SetFont('verdana', 'U', 9);
示例11: iconv
$SUMNIKI = "ŠČĆŽĐščćžđ";
$text = iconv("UTF-8//TRANSLIT", "iso-8859-2", $SUMNIKI);
//
//
//$text = iconv("iso-8859-1", "iso-8859-2", $SUMNIKI);
//test Šumnikov
///koliko bomo pomaknili vse v desno//
$XOF = 26;
$LN_DEFAULT = 5;
//Instanciation of inherited class
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->Image('img/obrazec.jpg', 0, 0, 197, 297);
//$pdf->AddFont('luxisb','','luxisb.php');
$pdf->AddFont('Arial', '', 'Arial.php');
$pdf->SetFont('Arial', '', 8);
//Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]])
//NAziv in sedez
$pdf->SetXY($XOF + 35, 15);
$pdf->Cell(0, 0, "Root d.o.o., cesta v {$text} 10 3320 velenje", 0, 0, 'L');
//$pdf->MultiCell(65, 4,'sss', '', 'TL',0);
$pdf->Ln($LN_DEFAULT);
$pdf->SetXY($XOF + 13, $pdf->getY());
//napisemo davcno//
$pdf->Cell(0, 0, spacer("123456789123", 4, 3), 0, 0, 'L');
//nova vrsta
$pdf->Ln($LN_DEFAULT);
$pdf->SetXY($XOF + 30, $pdf->getY());
//gospodarska dejavnost//
$pdf->Cell(0, 0, 'Struzenje in gledanje', 0, 0, 'L');
示例12: PDF
$this->Cell(0, 90, 'Kepala Biro Kepegawaian BKN di Jakarta;', 0, 0, 'L');
$this->Ln(0);
$this->Cell(15);
$this->Cell(5, 100, '3.', 0, 0, 'L');
$this->Cell(0, 100, 'Pegawai yang bersangkutan;', 0, 0, 'L');
$this->Ln(0);
$this->Cell(15);
$this->Cell(5, 110, '4.', 0, 0, 'L');
$this->Cell(0, 110, 'Pertinggal', 0, 0, 'L');
}
}
$pdf = new PDF('P', 'mm', array(210, 330));
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAutoPageBreak(0);
$pdf->AddFont('ArialNarrow', '', 'arialn.php');
$pdf->AddFont('ArialNarrow', 'B', 'arialnb.php');
$pdf->AddFont('ArialNarrow', 'BI', 'arialnbi.php');
$pdf->AddFont('ArialNarrow', 'I', 'arialni.php');
$pdf->SetFont('ArialNarrow', '', 10);
// VARIABEL
$sifat = 'Penting';
$lampiran = '-';
$perihal = 'Kenaikan Gaji Berkala';
$kota = 'Banjarbaru';
$nama = $kgb->nama;
$nip = split_nip($kgb->nip);
//ok
$unit_kerja = $kgb->unit_kerja;
//ok
$tgl_sk_lama = convert_tanggal('j M Y', $kgb->tgl_sk_lama);
示例13: convert_smart_quotes
while ($entry = mysql_fetch_array($result)) {
if ($entry['disc_num'] == 1) {
if ($entry['airabilityID'] == 3) {
$tracks[] = $entry['track_num'];
}
} else {
if ($entry['airabilityID'] == 3) {
$tracks[] = "D" . $entry['disc_num'] . ".T" . $entry['track_num'];
}
}
}
return $tracks;
}
$pdf = new PDF('P', 'in', 'A4');
$pdf->AddPage();
$pdf->AddFont('Basicmanual', '', 'svbasicmanual.php');
$pdf->AddFont('Basicmanual', 'B', 'svbasicmanual-bold.php');
$pdf->SetFont('Basicmanual', '', 12);
$pdf->SetAutoPageBreak(false);
function convert_smart_quotes($string)
{
$search = array(chr(0xe2) . chr(0x80) . chr(0x98), chr(0xe2) . chr(0x80) . chr(0x99), chr(0xe2) . chr(0x80) . chr(0x9c), chr(0xe2) . chr(0x80) . chr(0x9d), chr(0xe2) . chr(0x80) . chr(0x93), chr(0xe2) . chr(0x80) . chr(0x94));
$replace = array("'", "'", '"', '"', "-", "-");
return str_replace($search, $replace, $string);
}
$list = "";
$concat = "";
foreach ($albums as $album) {
$list .= $concat . "album_code = '" . $album . "'";
$concat = " or ";
}
示例14: action_template
public function action_template($id = null, $data, $name)
{
if ($id and $data and $name) {
define('FPDF_FONTPATH', '../fuel/app/views/fonts');
$pdf = new PDF('P', 'pt', array(595.28, 841.89));
$pdf->AddFont('Verdana');
$pdf->SetLineWidth(0.1);
$pdf->SetAutoPageBreak(true, 80);
$pdf->action = explode(',', $data);
$pdf->init($id);
$pdf->Output('Graph:' . $pdf->device->hostname . '.pdf', 'I');
}
}
示例15: Header
// require tFPDF
require_once 'fpdf/fpdf.php';
class PDF extends FPDF
{
// Page header
function Header()
{
// Logo
$this->Image('http://makerfaire.com/wp-content/themes/makerfaire/images/maker_sign.png', 0, 0, $this->w, $this->h);
// Arial bold 15
$this->SetFont('Benton Sans', 'B', 15);
}
}
// Instanciation of inherited class
$pdf = new PDF();
$pdf->AddFont('Benton Sans', 'B', 'bentonsans-bold-webfont.php');
$pdf->AddFont('Benton Sans', '', 'bentonsans-regular-webfont.php');
$pdf->AddPage('P', array(279.4, 431.8));
$pdf->SetFont('Benton Sans', '', 12);
$pdf->SetFillColor(255, 255, 255);
//get the entry-id, if one isn't set return an error
if (isset($_GET['eid']) && $_GET['eid'] != '') {
$entryid = $_GET['eid'];
createOutput($entryid, $pdf);
if (isset($_GET['type']) && $_GET['type'] == 'download') {
ob_clean();
$pdf->Output($entryid . '.pdf', 'D');
} elseif (isset($_GET['type']) && $_GET['type'] == 'save') {
$filename = TEMPLATEPATH . '/signs/NY15/' . $entryid . '.pdf';
$dirname = dirname($filename);
if (!is_dir($dirname)) {