本文整理汇总了PHP中PDF::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::setTitle方法的具体用法?PHP PDF::setTitle怎么用?PHP PDF::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF
的用法示例。
在下文中一共展示了PDF::setTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: OrderBarcode
}
if ($this->current_page > 0) {
$this->SetY(-14);
$this->SetFont('Arial', 'B', 8);
$this->Cell(0, 4, $this->printed_po . " page " . $this->current_page . ' ', 0, 1, 'C');
}
}
function OrderBarcode($barcode, $barcode_xpos, $barcode_ypos, $barcode_width)
{
$barcode_code39_no = $barcode;
$barcode_code39 = DIR_FS_BARCODES . drawBarcode('CODE39', 'AMVDPO', $barcode_code39_no, false, false);
$this->Image($barcode_code39, $barcode_xpos, $barcode_ypos, $barcode_width);
}
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('Amazon Packing Slip');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('k-Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(true, 25);
$pdf->AliasNbPages();
//$pdf->AddPage();
$margin = 10;
$ypos = $margin;
$box_width = 190;
$box_shipping_width = 80;
$box_billing_width = $box_width - $box_shipping_width;
$gap_between_boxes = 5;
$box1_height = 20;
$box2_height = 24;
$box3_height = 14;
示例2: 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);
//.........这里部分代码省略.........
示例3: PDF
//End ifelse:Line26
}
//End if:Line 24
}
//End if:Line 9
}
//End if:Line 8
$pdf = new PDF($orientacion, 'mm', 'Letter');
$pdf->SetPathLogo($cfg_rpt['logo_imagen']);
$pdf->Setancho_imagen($cfg_rpt['alto_imagen']);
$pdf->Setalto_imagen($cfg_rpt['ancho_imagen']);
$pdf->Setimagen_position_x($cfg_rpt['position_x']);
$pdf->Setimagen_position_y($cfg_rpt['position_y']);
$pdf->setAuthor($cfg_rpt['autor']);
$pdf->setDisplayMode('real');
$pdf->setTitle("Reporte de Fiscalizacion");
$pdf->SetMargins(3, 2, 3);
$pdf->AliasNbPages('Total_page');
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 11.5);
$pdf->Cell(0, 0, $Title_Principal . $desc_solicitud, 0, 0, 'C');
$pdf->Ln(3);
if (isset($orientacion)) {
if ($orientacion == 'P') {
$new_line = 6;
$pdf->Cell(150);
$pdf->Cell(0, 0, 'Solicitud N: ' . str_pad($obj_solicitud->getId_solicitud(), 10, "0", STR_PAD_LEFT), 0, 1, 'L');
$pdf->Ln(10);
$pdf->Cell(10);
// $pdf->Cell(0,0,'Estatus: '.$obj_solicitud->getStatus(),0,0,'L');
$pdf->Cell(21, 6, "Estatus: ", 0, 0, 'L');
示例4: elseif
$str = ' Utilisateur normal';
} elseif ($access == 'P') {
$str = ' Extension uniquement';
}
if ($SecUser->admin == 1) {
$str = ' Super Admin';
$admin = 1;
}
//-----------------------------------------------------
// Print result
$pdf = new PDF($cn);
$pdf->setDossierInfo(dossier::name() . ' Sécurité');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Sécurité", true);
$str_user = sprintf("( %d ) %s %s [ %s ] - %s", $SecUser->id, $SecUser->first_name, $SecUser->name, $SecUser->login, $str);
$pdf->SetFont('DejaVu', 'B', 9);
$pdf->Cell(0, 7, $str_user, 'B', 0, 'C');
$pdf->Ln();
if ($SecUser->active == 0) {
$pdf->SetTextColor(255, 0, 34);
$pdf->Cell(0, 7, 'Bloqué', 0, 0, 'R');
$pdf->Ln();
}
if ($SecUser->admin == 1) {
$pdf->SetTextColor(0, 0, 0);
$pdf->setFillColor(239, 251, 255);
$pdf->Cell(40, 7, 'Administrateur', 1, 1, 'R');
$pdf->Ln();
}
示例5: OrderBarcode
if ($this->doc_type == 'return-note') {
$this->SetY(-15);
$this->SetFont('Arial', '', 8);
//page numbers start counting from page #2
$this->Cell(0, 10, 'Seite ' . $this->PageNo() . ' von {nb}', 0, 0, 'C');
}
}
function OrderBarcode($joi_id, $barcode_xpos, $barcode_ypos, $barcode_width)
{
$barcode_code39_no = 'JR-' . $joi_id;
$barcode_code39 = DIR_FS_BARCODES . drawBarcode('CODE39', 'M', $barcode_code39_no, false, false);
$this->Image($barcode_code39, $barcode_xpos, $barcode_ypos, $barcode_width);
}
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('Retail Invoice');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(true, 20);
$margin = 10;
$address_width = 60;
$address_height = 30;
$address_height2 = 33;
$gray = 160;
$fontsize_big = '9';
$fontsize_med = '8';
$fontsize_sml = '7';
$fontsize_sml_med = '6';
$fontsize_tny = '5';
$order_counter = 0;
示例6: PrintPickingList
}
function OrderBarcode($barcode, $barcode_xpos, $barcode_ypos, $barcode_width)
{
$barcode_code39_no = $barcode;
$barcode_code39 = DIR_FS_BARCODES . drawBarcode('CODE39', 'M', $barcode_code39_no, false, false);
$this->Image($barcode_code39, $barcode_xpos, $barcode_ypos, $barcode_width);
}
function AcceptPageBreak()
{
$this->ean_ypos = $this->margin;
$this->total_ean_lines = 0;
return true;
}
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('HH Pick List');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('k-Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(true, 20);
$pdf->AliasNbPages();
PrintPickingList($pick_from_racks, $trolley, $bin_location_qty_collection, $need_repackage);
PrintOrdersList($orders_barcode, $orders, $trolley, $need_repackage);
//PRINT PICKING LIST
function PrintPickingList($pick_from_racks, $trolley, $bin_location_qty_collection, $need_repackage = false)
{
global $pdf;
$pdf->AddPage();
$margin = $pdf->margin;
$pdf->ean_ypos = $margin;
$counter_size = 10;
示例7: Header
{
var $left_margin;
var $page_width;
var $page_height;
var $font_size;
//Page header
function Header()
{
}
//Page footer
function Footer()
{
}
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('Invoice');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('k-Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->left_margin = 10;
$pdf->top_margin = 20;
$pdf->page_width = 210;
$pdf->page_height = 297;
$pdf->font_size = 11;
$pdf->line_height = 6;
$pdf->AddPage();
$pdf->setFont('Arial', '', $pdf->font_size);
//PAGING SETTING
$firstpagecount = 41;
$nextpagecount = 54;
//HEADER RIGHT
示例8: PDF
{
//Posición: a 1,5 cm del final
$this->SetY(-20);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Número de página
$this->Cell(0, 10, 'Sistema IMAUD ' . $this->PageNo() . '/{nb}', 0, 0, 'R');
$this->Ln(3);
$this->Cell(0, 10, 'Coop. Programación Web S.R.L.', 0, 0, 'R');
}
}
//Creación del objeto de la clase heredada
$pdf = new PDF('Portrait', 'mm', 'Letter');
$pdf->setAuthor('Sistema Imaud - Modulo de Fiscalizacion');
$pdf->setDisplayMode('real', 'continuous');
$pdf->setTitle('Fiscalizacion' . $registro[0]);
$pdf->SetMargins(3, 3, 3);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 11.5);
$pdf->Cell(0, 0, 'F I S C A L I Z A C I O N ', 0, 0, 'C');
$pdf->Ln(5);
$pdf->Cell(150);
$pdf->Cell(0, 0, 'N° ' . $registro[0], 0, 1, 'L');
$pdf->Ln(10);
/////////////////////////////////////////////////
$pdf->Cell(30);
$pdf->Cell(0, 0, 'Fecha de Solicitud: ', 0, 1, 'L');
$pdf->SetFont('Arial', '', '');
$pdf->Cell(85);
$pdf->Cell(0, 0, $fecha, 0, 1, 'L');
示例9: upper
$cond_poste .= ' pcm_val >= upper (\'' . Database::escape_string($from_poste) . '\')';
}
if ($to_poste != '') {
if ($cond_poste == '') {
$cond_poste = ' where pcm_val <= upper (\'' . Database::escape_string($to_poste) . '\')';
} else {
$cond_poste .= ' and pcm_val <= upper (\'' . Database::escape_string($to_poste) . '\')';
}
}
$sql = $sql . $cond_poste . ' order by pcm_val::text';
$a_poste = $cn->get_array($sql);
$pdf = new PDF($cn);
$pdf->setDossierInfo(" Periode : " . $from_periode . " - " . $to_periode);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->setTitle("Grand Livre", true);
$pdf->SetAuthor('NOALYSS');
if (count($a_poste) == 0) {
$pdf->Output();
return;
}
// Header
$header = array("Date", "Référence", "Libellé", "Pièce", "Let", "Débit", "Crédit", "Solde");
// Left or Right aligned
$lor = array("L", "L", "L", "L", "R", "R", "R", "R");
// Column widths (in mm)
$width = array(13, 20, 60, 15, 12, 20, 20, 20);
$l = isset($_REQUEST['letter']) ? 2 : 0;
$s = isset($_REQUEST['solded']) ? 1 : 0;
foreach ($a_poste as $poste) {
$Poste = new Acc_Account_Ledger($cn, $poste['pcm_val']);
示例10: date
$this->SetFont('Arial', 'B', 8);
$this->Cell(0, 4, 'Printed on ' . date('d.m.Y H:i') . ' ', 0, 1, 'C');
$this->SetFont('Arial', '', 8);
$this->Cell(0, 4, 'Page ' . $this->PageNo() . ' of {nb}', 0, 1, 'C');
}
}
$margin_top = 30;
$margin_left = 10;
$spacing = 10;
$line_height = 5;
$label_width = 20;
$value_width = 80;
$img_size = 18;
$img_path = DIR_WS_IMAGES . 'imagecache/';
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('Bonofactum Purchase Order');
$pdf->SetAuthor('Manobo');
$pdf->SetCreator('Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(false, 1);
$pdf->AliasNbPages();
$pdf->SetFillColor(200, 200, 200);
$pdf->po_id = $pocode;
$pdf->po_date = $order_date;
if ($mode == '2col') {
//PDF 2COLS Format for Silver Dragon
$img_boxpad = 2;
$product_per_col = 8;
$product_per_page = $product_per_col * 2;
$counter = 0;
foreach ($items2print as $e) {
示例11: Database
/* Security */
$cn = new Database($gDossier);
extract($_GET);
if (isset($poste_fille)) {
//choisit de voir tous les postes
$a_poste = $cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '{$poste_id}%' order by pcm_val");
} else {
$a_poste = $cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text = '{$poste_id}'");
}
$ret = "";
$pdf = new PDF($cn);
$pdf->setDossierInfo(" Periode : " . $_GET['from_periode'] . " - " . $_GET['to_periode']);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Détail poste comptable", true);
if (count($a_poste) == 0) {
$pdf->Output('poste.pdf', 'D');
exit;
}
$size = array(13, 25, 13, 65, 12, 20, 20, 20);
$align = array('L', 'C', 'C', 'L', 'R', 'R', 'R', 'R');
foreach ($a_poste as $poste) {
$Poste = new Acc_Account_Ledger($cn, $poste['pcm_val']);
list($array, $tot_deb, $tot_cred) = $Poste->get_row_date($from_periode, $to_periode, $_GET['ople']);
// don't print empty account
if (count($array) == 0) {
continue;
}
$Libelle = sprintf("(%s) %s ", $Poste->id, $Poste->get_name());
$pdf->SetFont('DejaVuCond', '', 10);
示例12: Periode
}
$pPeriode = new Periode($cn);
$a = $pPeriode->get_date_limit($from_periode);
$b = $pPeriode->get_date_limit($to_periode);
$per_text = " du " . $a['p_start'] . " au " . $b['p_end'];
if ($previous == 1) {
$pdf = new PDFLand($cn);
} else {
$pdf = new PDF($cn);
}
$pdf->setDossierInfo(" Balance " . $per_text);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('NOALYSS');
$pdf->SetFont('DejaVuCond', '', 7);
$pdf->setTitle("Balance comptable", true);
$pdf->Cell(30, 6, 'poste');
$pdf->LongLine(60, 6, 'Libellé');
if ($previous == 1) {
$pdf->Cell(20, 6, 'Débit N-1', 0, 0, 'R');
$pdf->Cell(20, 6, 'Crédit N-1', 0, 0, 'R');
$pdf->Cell(20, 6, 'Débiteur N-1', 0, 0, 'R');
$pdf->Cell(20, 6, 'Créditeur N-1', 0, 0, 'R');
}
$pdf->Cell(25, 6, 'Total Débit', 0, 0, 'R');
$pdf->Cell(25, 6, 'Total Crédit', 0, 0, 'R');
$pdf->Cell(25, 6, 'Solde Débiteur', 0, 0, 'R');
$pdf->Cell(25, 6, 'Solde Créditeur', 0, 0, 'R');
$pdf->Ln();
$pdf->SetFont('DejaVuCond', '', 8);
$tp_deb = 0;
示例13: ChapterBody
}
function ChapterBody($file)
{
// Read text file
$txt = file_get_contents($file);
// Font
$this->setFont('Times', '', 12);
// Output text in a 6 cm width column
$this->MultiCell(60, 5, $txt);
$this->ln();
// Mention
$this->setFont('', 'I');
$this->cell(0, 5, '(end of excerpt)');
// Go back to first column
$this->setCol(0);
}
function PrintChapter($num, $title, $file)
{
// Add chapter
$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();
示例14: explode
$rightpos = $this->left_margin + 50;
$this->SetXY($rightpos, $ypos);
if (strpos($text, "\n") === false) {
$this->Cell($label_width, $this->line_height, $text, 0, 0);
} else {
$textlines = explode("\n", $text);
$this->MultiCell($label_width, $this->line_height, $text);
}
}
//Page footer
function Footer()
{
}
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('Commercial Invoice');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('k-Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->left_margin = 10;
$pdf->top_margin = 10;
$pdf->page_width = 210;
$pdf->page_height = 297;
$pdf->font_size = 11;
$pdf->line_height = 6;
$pdf->AddPage();
$pdf->setFont('Arial', '', $pdf->font_size);
//HEADER
$ypos = 25;
$line_height = $pdf->line_height;
$pdf->LabelLeft($ypos, 'Date');
示例15: array
$zipper = new zip_file($zip_file);
$zipper->set_options(array('storepaths' => 0));
$pdf_temp_path = '../temp/pdfs/';
$pdf_files = array();
$margin_top = 40;
$margin_left = 10;
$spacing = 10;
$img_size = 18;
$line_height = 5;
$label_width = 20;
$value_width = 80;
$product_per_col = 8;
$product_per_page = $product_per_col * 2;
foreach ($supplier_list as $sup_id => $sl) {
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('J&G Elements Picking List');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('k-Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(false, 1);
$counter = 0;
foreach ($sl as $e) {
$pdf->currentSupplier = $suppliers[$sup_id];
if ($counter % $product_per_page == 0) {
$pdf->AddPage();
$pdf->setFont('Arial', '', '10');
$ypos = $margin_top;
}
if ($counter % $product_per_col == 0) {
$ypos = $margin_top;
}