本文整理汇总了PHP中PDF::SetAuthor方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::SetAuthor方法的具体用法?PHP PDF::SetAuthor怎么用?PHP PDF::SetAuthor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF
的用法示例。
在下文中一共展示了PDF::SetAuthor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateCodes
public function generateCodes(array $data)
{
$count = (int) $data['count'];
$teacherId = $data['teacher_id'];
$message = $data['message'];
if (is_null($count) || is_null($teacherId)) {
return false;
} else {
try {
\DB::beginTransaction();
$teacher = Authenticator::user($teacherId);
\PDF::setPrintHeader(false);
\PDF::setPrintFooter(false);
\PDF::AddPage();
for ($i = 0; $i < $count; $i++) {
$code = $this->codeRepo->generateCode();
$data = array();
$data = array_add($data, 'student_code', $code);
$data = array_add($data, 'teacher_id', $teacherId);
$code = $this->codeRepo->create($data);
$code->message = $message;
$this->codeRepo->clearModel();
$html = View::make('pages.code')->with('code', $code)->render();
if ($i % 5 === 0 && $i !== 0) {
\PDF::AddPage();
\PDF::writeHTML($html, false, false, false, false, 'L');
} else {
\PDF::writeHTML($html, false, false, false, false, 'L');
}
}
\PDF::SetCreator('');
\PDF::SetAuthor('');
$format = '%s/%s.pdf';
$subpath = sprintf($format, 'pdfs', $teacherId);
$format = '/%s/%s';
$fullpath = sprintf($format, public_path(), $subpath);
\PDF::Output($fullpath, 'F');
\DB::commit();
return $subpath;
} catch (\Exception $ex) {
\Log::error($ex);
\DB::rollback();
return false;
}
}
}
示例2: setup
/**
* PDF Setup - WT_Report_PDF
*/
function setup()
{
parent::setup();
// Setup the PDF class with custom size pages because WT supports more page sizes. If WT sends an unknown size name then the default would be A4
$this->pdf = new PDF($this->orientation, parent::unit, array($this->pagew, $this->pageh), self::unicode, "UTF-8", self::diskcache);
// Setup the PDF margins
$this->pdf->setMargins($this->leftmargin, $this->topmargin, $this->rightmargin);
$this->pdf->SetHeaderMargin($this->headermargin);
$this->pdf->SetFooterMargin($this->footermargin);
//Set auto page breaks
$this->pdf->SetAutoPageBreak(true, $this->bottommargin);
// Set font subsetting
$this->pdf->setFontSubsetting(self::subsetting);
// Setup PDF compression
$this->pdf->SetCompression(self::compression);
// Setup RTL support
$this->pdf->setRTL($this->rtl);
// Set the document information
// Only admin should see the version number
$appversion = WT_WEBTREES;
if (Auth::isAdmin()) {
$appversion .= " " . WT_VERSION;
}
$this->pdf->SetCreator($appversion . " (" . parent::wt_url . ")");
// Not implemented yet - WT_Report_Base::setup()
$this->pdf->SetAuthor($this->rauthor);
$this->pdf->SetTitle($this->title);
$this->pdf->SetSubject($this->rsubject);
$this->pdf->SetKeywords($this->rkeywords);
$this->pdf->setReport($this);
if ($this->showGenText) {
// The default style name for Generated by.... is 'genby'
$element = new CellPDF(0, 10, 0, "C", "", "genby", 1, ".", ".", 0, 0, "", "", true);
$element->addText($this->generatedby);
$element->setUrl(parent::wt_url);
$this->pdf->addFooter($element);
}
}
示例3: createPDF
function createPDF($ignoreStockStatusDepot = false, $output = 'D', $add_to_daily_statistic = false, $print_per_orders = true)
{
/*
OUTPUT : D -> WILL PRODUCE ONE PDF FOR ALL ORDERS WITH ITEMS IN IT
OUTPUT : F -> WILL PRODUCE MULTI PDF PER ORDER ITEMS
*/
global $class_jo, $class_o, $class_do;
$pi_printed_jg = array();
$pi_printed_sp = array();
$pi_printed_dp = array();
if ($output == 'D') {
//PRODUCE SINGLE PDF FILE
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('Production Instruction');
$pdf->SetAuthor('JULIE GRACE / Bonofactum');
$pdf->SetCreator('k-Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(false);
$pdf->AliasNbPages();
$pdf->SetFillColor(191, 191, 191);
}
$item_printed = 0;
$oiid_last_printed = '';
/* Moved this on function constructPIContent and replace using below $print_per_orders,
* so eventhough we use $output='F' we still could create pi which consists of collection of orders */
//foreach($this->orders as $order) {
// $o = $order['detail'];
// foreach($order['items'] as $oiid=>$i) {
// if($i['status']<8) $this->pi_printed[strtolower($o['type'])][] = $oiid;
// //if($i['status']<8) ${'pi_printed_'.strtolower($o['type'])}[] = $oiid;
// $this->constructPIContent($pdf, $output, $order, $oiid, $ignoreStockStatusDepot, $print_per_orders);
// $item_printed++;
// $oiid_last_printed = $oiid;
// }
//}
if ($print_per_orders) {
foreach ($this->orders as $order) {
$this->constructPIContent($pdf, $output, $order, $ignoreStockStatusDepot, true);
$item_printed++;
}
} else {
$this->constructPIContent($pdf, $output, $this->orders, $ignoreStockStatusDepot, false);
}
#PI Print Counter
if (count($this->pi_printed['sp']) > 0) {
$class_jo->printCountAdd($this->pi_printed['sp']);
}
if (count($this->pi_printed['jg']) > 0) {
$class_o->printCountAdd($this->pi_printed['jg']);
}
if (count($this->pi_printed['dp']) > 0) {
$class_do->printCountAdd($this->pi_printed['dp']);
}
/* D: Download; F: Save File on Server */
if ($output == 'D') {
$infix = '';
//$infix = count($this->orders)>1 ? '' : strtoupper($o['type']).'O'.$o['id'].'-';
//if($item_printed==1) $infix = strtoupper($o['type']).'-'.$oiid_last_printed.'-';
if ($item_printed == 1) {
$infix = array_keys($this->orders);
$infix = $infix[0] . '-';
}
$filename = 'PI-' . $infix . date('YmdHi');
$pdf->Output($filename . '.pdf', $output);
//$pdf->Output($filename.'.pdf','D');
}
if ($add_to_daily_statistic) {
$pt = new production_target();
$timestamp = date('Y-m-d H:i:s');
if ($this->qty_total_first_printed > 0) {
$pt->addDataToField($timestamp, 'start', $this->qty_total_first_printed);
}
}
}
示例4: Database
require_once NOALYSS_INCLUDE . '/class_user.php';
require_once NOALYSS_INCLUDE . '/header_print.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
require_once NOALYSS_INCLUDE . '/class_acc_report.php';
require_once NOALYSS_INCLUDE . '/class_pdf.php';
$gDossier = dossier::id();
$cn = new Database($gDossier);
extract($_GET);
$ret = "";
$Form = new Acc_Report($cn, $form_id);
$Libelle = sprintf("%s ", $Form->get_name());
$pdf = new PDF($cn);
$pdf->setDossierInfo($Libelle);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Rapport " . $Libelle, true);
// Step ??
//--
$step = HtmlInput::default_value_get("p_step", 0);
if ($step == 0) {
// No step asked
//--
if ($_GET['type_periode'] == 0) {
$array = $Form->get_row($_GET['from_periode'], $_GET['to_periode'], $_GET['type_periode']);
} else {
$array = $Form->get_row($_GET['from_date'], $_GET['to_date'], $_GET['type_periode']);
}
} else {
// yes with step
//--
示例5: ChapterBody
}
function ChapterBody($file)
{
//Read text file
$f = fopen($file, 'r');
$txt = fread($f, filesize($file));
fclose($f);
//Times 12
$this->SetFont('Times', '', 12);
//Output justified text
$this->MultiCell(0, 5, $txt);
//Line break
$this->Ln();
//Mention in italics
$this->SetFont('', 'I');
$this->Cell(0, 5, '(end of excerpt)');
}
function PrintChapter($num, $title, $file)
{
$this->AddPage();
$this->ChapterTitle($num, $title);
$this->ChapterBody($file);
}
}
$pdf = new PDF();
$title = '20000 Leagues Under the Seas';
$pdf->SetTitle($title);
$pdf->SetAuthor('Jules Verne');
$pdf->PrintChapter(1, 'A RUNAWAY REEF', '20k_c1.txt');
$pdf->PrintChapter(2, 'THE PROS AND CONS', '20k_c2.txt');
$pdf->Output();
示例6: ChapterBody
// Salto de l�nea
$this->Ln(4);
}
function ChapterBody($file)
{
// Leemos el fichero
$txt = file_get_contents($file);
// Times 12
$this->SetFont('Times', '', 12);
// Imprimimos el texto justificado
$this->MultiCell(0, 5, $txt);
// Salto de l�nea
$this->Ln();
// Cita en it�lica
$this->SetFont('', 'I');
$this->Cell(0, 5, '(fin del extracto)');
}
function PrintChapter($num, $title, $file)
{
$this->AddPage();
$this->ChapterTitle($num, $title);
$this->ChapterBody($file);
}
}
$pdf = new PDF();
$title = '20000 Leguas de Viaje Submarino';
$pdf->SetTitle($title);
$pdf->SetAuthor('Julio Verne');
$pdf->PrintChapter(1, 'UN RIZO DE HUIDA', '20k_c1.txt');
$pdf->PrintChapter(2, 'LOS PROS Y LOS CONTRAS', '20k_c2.txt');
$pdf->Output();
示例7: explode
<?php
$name = $_POST['name'];
$characteristics = $_POST['characteristics'];
$image = $_POST['image'];
$clues = explode(',', $_POST['clues']);
require 'MultiCellBlt2.php';
//Create pdf
$pdf = new PDF();
$pdf->AddPage();
//set document properties
$pdf->SetAuthor('Anon');
$pdf->SetTitle($name);
// Set the page break to 'true' and the bottom margin height
$pdf->SetAutoPageBreak(1, 10);
//set font for the entire document
$pdf->SetFont('Helvetica', 'B', 20);
$pdf->SetTextColor(50, 60, 100);
//insert Collage logo
$pdf->Image('logo.png', 10, 10, 33, 0);
//display the title without a border around it
$pdf->SetXY(50, 15);
$pdf->SetDrawColor(50, 60, 100);
$pdf->Cell(100, 10, $name, 0, 0, 'C', 0);
// Insert a dynamic image from a URL
$pdf->Image($image, 11, 30, 0, 50);
//Set x and y position for the main text, reduce font size and write content
$pdf->SetXY(65, 30);
$pdf->SetLeftMargin(65);
$pdf->SetFontSize(10);
$pdf->Write(5, $characteristics);
示例8: PDF
}
$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
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
示例9: PDF
} */
//This is an example of how to get custom questions for an attendee
//Get the questions for the attendee
/* $q_sql = "SELECT ea.answer, eq.question
FROM " . EVENTS_ANSWER_TABLE . " ea
LEFT JOIN " . EVENTS_QUESTION_TABLE . " eq ON eq.id = ea.question_id
WHERE ea.registration_id = '".$registration_id."'";
$q_sql .= " AND ea.question_id = '9' ";
$q_sql .= " ORDER BY eq.sequence asc ";
$wpdb->get_results($q_sql);
$organization_name = $wpdb->last_result[0]->answer;//question_id = '9' */
//Instanciation of inherited class
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->SetAuthor(pdftext($org_options['organization']));
if (isset($invoice_payment_settings['pdf_title'])) {
$pdf->SetTitle(pdftext($event_name . ' - ' . $invoice_payment_settings['pdf_title']));
} else {
$pdf->SetTitle(pdftext($event_name));
}
//$pdf->SetAutoPageBreak('auto');
$pdf->AddPage();
//Create the top right of invoice below header
$pdf->SetFont('Times', '', 12);
$pdf->Cell(180, 0, __('Date: ', 'event_espresso') . date(get_option('date_format')), 0, 1, 'R');
//Set invoice date
$pdf->Cell(180, 10, __('Primary Attendee ID: ', 'event_espresso') . $attendee_id, 0, 0, 'R');
//Set Invoice number
$pdf->Ln(0);
//Set the top left of invoice below header
示例10: generateReports
/**
*
* @global array $DIAMOND_BRAND_IDS
* @global string $server
* @global jng_sp $class_sp
* @global products_minierp $class_pm
* @global logger $logger
* @global string $icon_diamond
* @global string $icon_gold_585_w
* @global string $icon_gold_585_g
* @param string $timestamp
* @param int $jng_sp_id
* @return boolean
*/
function generateReports($timestamp, $jng_sp_id)
{
global $DIAMOND_BRAND_IDS, $server, $class_sp, $class_pm, $logger, $icon_diamond, $icon_gold_585_w, $icon_gold_585_g;
$log_date = strtotime($timestamp);
$sp_detail = $jng_sp_id > 0 ? $class_sp->retrieveDetail($jng_sp_id) : array('package_prefix' => 'JG.DE');
$filter_sold = 1;
$filter_age = 56;
$logger->write("GENERATING REPORT {$sp_detail['package_prefix']}");
/*
* Query get new products which:
* 1) age <= 8 weeks (56 days)
* 2) total sold >= 1
*/
$q = "SELECT p.products_id, p.products_model, p.products_image, p.products_price, p.material_expenses, p.stars ";
$q .= " , ptc.categories_id AS catid, cd.categories_name";
$q .= " , IFNULL(plps.sold_monthly_1, 0) AS sold_monthly_1, IFNULL(plps.sold_monthly_2, 0) AS sold_monthly_2";
if ($jng_sp_id > 0) {
$q .= " , ((jc.total_returned / jc.total_sold) * 100) AS returned_rate, jc.active_age";
} else {
$q .= " , 'N/A' AS returned_rate, DATEDIFF(NOW(), p.products_date_added) AS active_age";
}
$q .= " FROM products p";
if ($jng_sp_id > 0) {
$q .= " INNER JOIN jng_sp_catalog jc ON jc.jng_sp_id = {$jng_sp_id} AND jc.products_id = p.products_id";
} else {
$q .= " INNER JOIN orders_products op ON op.products_id = p.products_id";
}
$q .= " LEFT JOIN products_log_per_sp plps ON plps.products_id = p.products_id AND plps.jng_sp_id = {$jng_sp_id}";
$q .= " LEFT JOIN products_to_categories ptc ON ptc.products_id = p.products_id";
$q .= " LEFT JOIN categories_description cd ON cd.categories_id = ptc.categories_id AND cd.language_id = 1";
$q .= " WHERE";
if ($jng_sp_id > 0) {
$q .= " jc.active_age <= {$filter_age}";
$q .= " AND jc.active_status = 1";
$q .= " AND total_sold >= {$filter_sold}";
} else {
//$q .= " p.products_date_added >= '2013-01-01 00:00:00'";
$q .= " DATEDIFF(NOW(), p.products_date_added) <= {$filter_age}";
$q .= " AND p.products_status = 1";
$q .= " AND op.status NOT IN (10, 12)";
$q .= " GROUP BY p.products_id";
$q .= " HAVING SUM(op.products_quantity) >= {$filter_sold}";
}
//$q .= " LIMIT 5";
$dbq = tep_db_query($q);
$products = array();
while ($row = tep_db_fetch_array($dbq)) {
$row['margin'] = $class_pm->calculateMargin($row['products_price'], $row['material_expenses'], 1);
$products[$row['catid']][$row['products_id']] = $row;
}
if (count($products) == 0) {
$logger->write("NO DATA RETRIEVED");
return false;
}
//Start Creating PDF Reports
$margin = 20;
$ypos = 10;
$col_width = 48;
$col_height = 77;
$line_height = 5;
$cell_text_width = $col_width - 3;
$no = 0;
$row = 1;
$icon_w = 4;
$icon_h = 4;
$first_page = true;
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('New Comer Report');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('Manobo PDF Generator');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(true, 25);
$pdf->AliasNbPages();
$pdf->AddPage('L');
$pdf->setXY($margin, $ypos);
$pdf->setFont('Arial', 'B', '14');
$pdf->cell(240, 5, 'SALES REPORT NEWCOMER PRODUCT ' . $sp_detail['package_prefix'] . ' (' . date('d.m.Y', $log_date) . ')', 0, 0, 'C');
$pdf->setFont('Arial', '', '10');
$ypos += 15;
$pdf->setXY($margin, $ypos);
$catids = load_config('products-categories-sorting');
foreach ($catids as $catid) {
$xpos = $margin;
if (is_array($products[$catid])) {
foreach ($products[$catid] as $pid => $p) {
$obj_product = new product($pid);
//.........这里部分代码省略.........
示例11: date
$ruta_raiz = "..";
include "{$ruta_raiz}/fpdf/html2pdf.php";
$fecha = date("d-m-Y");
$fecha_hoy_corto = date("d-m-Y");
include "{$ruta_raiz}/class_control/class_gen.php";
$b = new CLASS_GEN();
$date = date("m/d/Y");
$fecha_hoy = $b->traducefecha($date);
$html = "<table width='100%' align='left'><tr><td></td></tr><tr><td colspan=3 > </td><td align='left'><b>" . strtoupper($ent) . "</b></td></tr></table>\n\t\t<p><p>\n\t\t<br><br><br>\n\t\t<b><center> \n\t\t \n\t\t \n\t\tACTA DE ANULACIÓN No. {$actaNo} </center></b><p><br>\n\t\t<CENTER><B>\n\t\t \n\t\tNUMEROS DE RADICACIÓN DE CORRESPONDENCIA ENVIADA AÑO {$anoActual}</B></CENTER><p>\n\t\t<CENTER><B> \n\t\t \n\t\t \n\t\tGESTIÓN DOCUMENTAL Y ARCHIVO </B></CENTER><p>\n\t\t<br>\n <p text-align:justify; padding:3px >\n\t\tEn cumplimiento a lo establecido en el Acuerdo No. 060 del 30 de octubre de 2001 expedido por el Archivo General de la Nación, en el cual se establecen pautas para la administración de las comunicaciones oficiales en las entidades públicas y privadas que cumplen funciones públicas, y con base especialmente en el parágrafo del Artículo Quinto, el cual establece que cuando existan errores en la radicación y se anulen los números, se debe dejar constancia por escrito, con la respectiva justificación y firma del Jefe de la unidad de correspondencia; el coordinador de Gestión Documental y Correspondencia de {$entidad} procede a anular los siguientes números de radicación de {$TituloActam} que no fueron tramitados por las dependencias radicadoras:\n </p><br><br><br><br>\n\t\t1.- Números de radicación de {$TituloActam} a anular: <br>\n\t\t {$radicadosPdf}\n\t\t<br><br>\n\t\t2.- Se deja copia de la presente acta en el archivo central de la Entidad para el trámite <br>\n\t\t respectivo de la organización física de los archivos.<p>\n\t\tSe firma la presente el {$fecha_hoy}\n\t\t<p><p>\t\n\t\t______________________________________________________ <br>\n\t\t" . iconv($odt->codificacion($usua_nomb), 'ISO-8859-1', $usua_nomb) . "<BR>\nCentro de Administración Documental";
$ruta_raiz = "..";
$pdf = new PDF();
$pdf->Open();
$pdf->SetCreator("HTML2PDF");
$pdf->SetTitle("Acta de Anulacion de Radicados");
$pdf->SetSubject("Anulacion radicados");
$pdf->SetAuthor("Correspondencia");
$pdf->SetFont('Arial', '', 12);
$pdf->AddPage();
if (ini_get('magic_quotes_gpc') == '1') {
$html = stripslashes($html);
}
$pdf->WriteHTML($html);
//save and redirect
$noArchivo_out = "../" . $carpetaBodega . $noArchivo;
$pdf->Output($noArchivo_out);
?>
<center>Ver Acta <a href='../seguridadImagen.php?fec=<?php
echo base64_encode($noArchivo);
?>
'>Acta No <?php
echo $actaNo;
示例12: import
/**
* Internal function to return the cover for publishing a research
* @param $sectionEditorSubmission SectionEditorSubmission
* @return string path to cover created
*/
function &_generateCover($sectionEditorSubmission)
{
$journal =& Request::getJournal();
import('classes.lib.tcpdf.pdf');
import('classes.lib.tcpdf.tcpdf');
Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER));
$pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// No header and footer for this document
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor($journal->getJournalTitle());
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, 20, PDF_MARGIN_RIGHT);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// Right now this cover page is only in english, but the english translation keys are ready
$pdf->AddPage();
$pdf->SetFont('dejavusans', 'B', 14);
$pdf->MultiCell(0, 6, 'Final Technical Report', 0, 'C');
// Locale::translate('editor.finalReport')
$pdf->ln();
$pdf->ln();
$pdf->MultiCell(0, 6, 'for', 0, 'C');
// Locale::translate('editor.finalReport.for')
$pdf->ln();
$pdf->ln();
$pdf->MultiCell(0, 6, 'Research Project', 0, 'C');
// Locale::translate('editor.finalReport.researchProject')
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$abstract = $sectionEditorSubmission->getAbstractByLocale('en_US');
// Right now, considering only the english language
$pdf->SetFont('dejavusans', 'B', 16);
$pdf->MultiCell(0, 6, $abstract->getScientificTitle(), 0, 'C');
$pdf->ln();
$authors = $sectionEditorSubmission->getAuthors();
$coInvestigatorsString = (string) '';
$pInvestigatorsString = (string) '';
foreach ($authors as $author) {
if (!$author->getPrimaryContact()) {
if ($coInvestigatorsString == '') {
$coInvestigatorsString = $author->getFullName() . ' (' . $author->getAffiliation() . ')';
} else {
$coInvestigatorsString = $coInvestigatorsString . ', ' . $author->getFullName() . ' (' . $author->getAffiliation() . ')';
}
} else {
$pInvestigatorsString = $author->getFullName() . ' (' . $author->getAffiliation() . ')';
}
}
$pdf->SetFont('dejavusans', '', 16);
$pdf->MultiCell(0, 6, 'Principal Investigator: ' . $pInvestigatorsString, 0, 'C');
// Locale::translate('user.role.primaryInvestigator')
if ($coInvestigatorsString != '') {
$pdf->MultiCell(0, 6, 'Co-Investigator(s): ' . $coInvestigatorsString, 0, 'C');
// Locale::translate('user.role.coinvestigator')
}
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->ln();
$pdf->SetFont('dejavusans', 'B', 16);
$pdf->MultiCell(0, 6, $sectionEditorSubmission->getProposalId(), 0, 'C');
$pdf->ln();
$pdf->ln();
$decision = $sectionEditorSubmission->getLastSectionDecision();
$pdf->MultiCell(0, 0, date("F Y", strtotime($decision->getDateDecided())), 0, 'L', 0, 1, '', 250, true);
$pdf->Image("public/site/images/mainlogo.png", 'C', 230, 40, '', '', false, 'C', false, 300, 'R', false, false, 0, false, false, false);
$pdf->AddPage();
$pdf->SetFont('dejavusans', 'B', 14);
$pdf->MultiCell(0, 6, 'Final Technical Report', 0, 'C');
// Locale::translate('editor.finalReport')
$pdf->ln();
$pdf->ln();
$pdf->SetFont('dejavusans', 'B', 12);
$pdf->MultiCell(0, 6, 'Disclaimer', 0, 'C');
// Locale::translate('editor.finalReport.disclaimer')
$pdf->ln();
$pdf->ln();
$pdf->SetFont('dejavusans', '', 11);
$pdf->writeHTMLCell(0, 6, '', '', $journal->getSetting('reportDisclaimer'), 0, 0, false, true, 'J');
$filePath = Config::getVar('files', 'files_dir') . '/articles/' . $sectionEditorSubmission->getArticleId() . '/public/';
if (!FileManager::fileExists($filePath, 'dir')) {
FileManager::mkdirtree($filePath);
}
$pdf->Output($filePath . 'tempCover.pdf', 'F');
return $filePath;
}
示例13: savePdf
function savePdf()
{
$meeting =& $this->meeting;
$meetingAttendanceDao =& DAORegistry::getDAO("MeetingAttendanceDAO");
$meetingAttendances =& $meetingAttendanceDao->getMeetingAttendancesByMeetingId($meeting->getId());
$suppGuestNames = $this->getData("suppGuestName");
$suppGuestAffiliations = $this->getData("suppGuestAffiliation");
$meetingDateTime = date("d F Y g:ia", strtotime($meeting->getDate()));
$meetingDate = date("d F Y", strtotime($meeting->getDate()));
$details = Locale::translate('editor.meeting.attendanceReport.intro1') . ' ' . $this->getData("venue") . ' ' . Locale::translate('common.date.on') . ' ' . $meetingDateTime . ' ' . Locale::translate('editor.meeting.attendanceReport.intro2') . ' ' . $this->quorum . ' ' . Locale::translate('editor.meeting.attendanceReport.intro3') . ' ' . $this->getData('adjourned') . ".";
$journal = Request::getJournal();
$user = Request::getUser();
import('classes.lib.tcpdf.pdf');
$pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor($user->getFullName());
$pdf->SetTitle($journal->getJournalTitle());
$pdf->SetSubject($meeting->getPublicId() . ' - ' . Locale::translate('editor.minutes.attendance'));
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE . ' 020', PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, 58, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->AddPage();
$pdf->SetFont('dejavusans', 'B', 13);
$sectionDao =& DAORegistry::getDAO("SectionDAO");
$erc =& $sectionDao->getSection($meeting->getUploader());
$pdf->SetFont('dejavusans', 'I', 13);
$pdf->MultiCell(0, 6, $erc->getSectionTitle(), 0, 'C');
$pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.meetingDate') . ' ' . $meetingDate, 0, 'C');
$pdf->ln();
$memberCount = 0;
$pdf->SetFont('dejavusans', 'BU', 12);
$pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.membersPresent'), 0, 'L');
$pdf->ln();
$pdf->SetFont('dejavusans', '', 12);
foreach ($meetingAttendances as $meetingAttendance) {
if ($meetingAttendance->getWasPresent() == 1) {
$member =& $meetingAttendance->getUser();
$pdf->MultiCell(0, 6, $member->getFullName(), 0, 'L');
$memberCount++;
}
}
if ($memberCount == 0) {
$pdf->MultiCell(0, 6, Locale::translate('common.none'), 0, 'L');
}
$pdf->ln();
$memberCount = 0;
$pdf->SetFont('dejavusans', 'BU', 12);
$pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.membersAbsent'), 0, 'L');
$pdf->ln();
$pdf->SetFont('dejavusans', '', 12);
foreach ($meetingAttendances as $meetingAttendance) {
if ($meetingAttendance->getWasPresent() == 2) {
$member =& $meetingAttendance->getUser();
$pdf->MultiCell(0, 6, $member->getFullName() . ' (' . Locale::translate('editor.meeting.attendanceReport.reasonForAbsence') . ' ' . $meetingAttendance->getReasonForAbsence() . ')', 0, 'L');
$memberCount++;
}
}
if ($memberCount == 0) {
$pdf->MultiCell(0, 6, Locale::translate('common.none'), 0, 'L');
}
$pdf->ln();
if (count($suppGuestNames) > 0) {
$suppGuestCount = 0;
foreach ($suppGuestNames as $key => $guest) {
if ($guest != "" && $guest != null) {
if ($suppGuestCount == 0) {
$pdf->SetFont('dejavusans', 'BU', 12);
$pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.suppGuest'), 0, 'L');
$pdf->ln();
$pdf->SetFont('dejavusans', '', 12);
}
$pdf->MultiCell(0, 6, $guest . ' (' . $suppGuestAffiliations[$key] . ')', 0, 'L');
$suppGuestCount++;
}
}
$pdf->ln();
}
$pdf->MultiCell(0, 6, $details, 0, 'L');
$pdf->ln();
if ($this->getData("announcements")) {
$pdf->SetFont('dejavusans', 'BU', 12);
$pdf->MultiCell(0, 6, Locale::translate('editor.meeting.attendanceReport.announcements'), 0, 'L');
$pdf->ln();
$pdf->SetFont('dejavusans', '', 12);
$pdf->MultiCell(0, 6, $this->getData("announcements"), 0, 'L');
$pdf->ln();
}
$pdf->SetFont('dejavusans', 'BU', 12);
//.........这里部分代码省略.........
示例14: Footer
$this->Cell(0, 10, 'ACTA DE DENUNCIA', 0, 1, 'C');
$this->Cell(0, 5, 'Fuerza Especial de Lucha Contra el Crimen', 0, 1, 'C');
}
function Footer()
{
$this->SetY(-15);
$this->SetFont('Helvetica', 'I', 10);
//$this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C');
}
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->SetMargins(25, 20);
$pdf->AliasNbPages();
$pdf->AddPage();
//Datos del Titulo
$pdf->SetAuthor('Aquino Romero Ramiro');
$pdf->SetTitle('2 Parcial');
$pdf->SetTextColor(0x0, 0x0, 0x0);
$pdf->SetFont("Arial", "", 9);
//$pdf->SetFontTitle("Arial","b",15);
//$pdf->Cell(0,5,'REPORTE DE '."$u",0,1,'C');
$pdf->Image('../img/escudo.png', 10, 8, 33);
$pdf->Image('../img/escudo.png', 170, 8, 33);
//Se muestra la tabla
$pdf->Ln();
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(40, 10, "Caso N*", 0, 'C');
$pdf->SetFont("Arial", "", 9);
$pdf->Cell(40, 10, "{$ID_C}", 0, 'C');
$pdf->SetFont("Arial", "B", 9);
$pdf->Cell(40, 10, "Fecha de la Denuncia", 0, 'C');
示例15: PDF
{
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
//$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
}
}
$pdf = new PDF('P');
$pdf->AliasNbPages();
$pdf->SetAuthor("khurramnaseem@gmail.com");
$pdf->SetSubject("Party Contact");
$pdf->SetTitle("Party Contact");
$pdf->SetCreator("Khurram Naseem");
$prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => TRUE, 'formatNumberDecimal' => 0, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
$pdf->AddPage();
foreach ($data as $vid => $d) {
//$vehicle = $d['Rank'];
$pdf->AddCol('party_name', '20%', '', 'L');
$pdf->AddCol('party_address', '25%', '', 'L');
$pdf->AddCol('Phone1', '10%', '', 'L');
$pdf->AddCol('Phone2', '10%', '', 'L');
$pdf->AddCol('Cell', '10%', '', 'L');
$pdf->AddCol('contact_person', '12%', '', 'L');
$pdf->AddCol('vehicle_name', '13%', '', 'L');
$pdf->Table($d['data'], $prop, TRUE, FALSE);