当前位置: 首页>>代码示例>>PHP>>正文


PHP MYPDF::setPrintHeader方法代码示例

本文整理汇总了PHP中MYPDF::setPrintHeader方法的典型用法代码示例。如果您正苦于以下问题:PHP MYPDF::setPrintHeader方法的具体用法?PHP MYPDF::setPrintHeader怎么用?PHP MYPDF::setPrintHeader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MYPDF的用法示例。


在下文中一共展示了MYPDF::setPrintHeader方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Footer

$stmt1 = "select * from cabang where kode = '{$cabang}'";
foreach (tampilData($stmt1) as $dataCabang) {
}
class MYPDF extends TCPDF
{
    public function Footer()
    {
        $this->SetY(-15);
        $this->SetFont('helvetica', 'I', 8);
        $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
$pdf = new MYPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(15, 10, 15);
$pdf->setPrintHeader(false);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->AddPage();
foreach (tampilData($stmt) as $grid) {
    $pdf->SetFont('helvetica', 'B', 9);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->Cell(0, 0, 'SLIP KOMISI SALES', 0, 2, 'C', 0, '', '');
    $pdf->SetFont('helvetica', '', 7);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->Cell(0, 0, 'PT. LUXINDO RAYA', 0, 2, 'C', 0, '', '');
    $pdf->SetFont('helvetica', 'B', 7);
    $pdf->setXY(15, $pdf->getY(), true);
    $pdf->MultiCell(15, 7, "NIS", 0, 'L', false, 0, '', '', false, 0, false, false, 7, 'M');
    $pdf->MultiCell(5, 7, ":", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
    $pdf->MultiCell(100, 7, $grid['nis'], 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
    $pdf->MultiCell(18, 7, "Periode", 0, 'L', false, 0, '', '', false, 0, false, false, '', 'M');
开发者ID:underdos,项目名称:sipkom,代码行数:31,代码来源:repCetakSlipKomisi.php

示例2: dirname

// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
    require_once dirname(__FILE__) . '/lang/eng.php';
    $pdf->setLanguageArray($l);
}
// set pdf viewer preferences
$pdf->setViewerPreferences(array('Duplex' => 'DuplexFlipLongEdge'));
//Doppelseitiger Druck in einem Befehl
$pdf->SetBooklet(true, 15, 25);
// start of creating the documents
while ($meineSchueler = mysql_fetch_assoc($meineSchueler_tmp)) {
    $schueler_uid = $meineSchueler['usr_id'];
    $schueler_vorname = $meineSchueler['firstname'];
    $schueler_nachname = $meineSchueler['lastname'];
    $pdf->SetFont('times', '', 14);
    $pdf->setPrintHeader(true);
    // add a page
    $pdf->AddPage('P', 'A4');
    //personenbezogene Kopfdaten
    $pdf->SetXY(20, 42);
    $pdf->Cell(45, 5, $schueler_nachname . ', ' . $schueler_vorname, 0, 0, 'L', 0, '', 0, false, 'C', 'C');
    $pdf->Cell(0, 5, $klassenbezeichner . ': ' . $kl, 0, 1, 'R', 0, '', 0, false, 'C', 'C');
    $pdf->Line(20, 47, 195, 47, $style2);
    $pdf->SetFont('helvetica', '', 14);
    $pdf->SetY(52);
    $pdf->SetFont('helvetica', 'B', 14);
    $pdf->MultiCell(0, 2, '', 0, 'L', 0, 1, '', '', true);
    //als verticaler Abstand, mir fiel grad nichts besseres ein
    $pdf->Cell(45, 5, 'Deine Lernziele im ' . $_SESSION['aktueller_term_name'], 0, 1, 'L', 0, '', 0, false, 'C', 'C');
    $pdf->MultiCell(0, 1, '', 0, 'L', 0, 1, '', '', true);
    //als verticaler Abstand, mir fiel grad nichts besseres ein
开发者ID:rft2014,项目名称:buelow_web,代码行数:31,代码来源:makeBeurteilung.php

示例3: MYPDF

         if (!isset($this->original_lMargin)) {
             $this->original_lMargin = $this->lMargin;
         }
         if (!isset($this->original_rMargin)) {
             $this->original_rMargin = $this->rMargin;
         }
         include "modules/SalesOrder/pdf_templates/footer.php";
     }
 }
 $page_num = '1';
 // create new PDF document
 //$pdf = new PDF( 'P', 'mm', 'A4' );
 $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
 // set font
 $pdf->SetFont($default_font, " ", $default_font_size);
 $pdf->setPrintHeader(0);
 //header switched off permanently
 // auto break on
 //$pdf->SetAutoPageBreak(true);
 // set footer fonts
 //$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
 //set margins
 $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
 $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
 $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
 // set pdf information
 $pdf->SetTitle($pdf_strings['FACTURE'] . ": " . $account_name);
 $pdf->SetAuthor($owner_firstname . " " . $owner_lastname . ", " . $org_name);
 $pdf->SetSubject($account_name);
 $pdf->SetCreator('PDF Creator from www.crm-now.com');
 //list product names as keywords
开发者ID:joomlacorner,项目名称:vtigerthai,代码行数:31,代码来源:pdfcreator.php

示例4: MYPDF

        $this->setY(-12);
        $this->SetFont('freesans', '', 6, '', true);
        $this->Cell(0, 3, mb_strtoupper(api_text("module-diary_export-page"), 'UTF-8') . " " . $this->getAliasNumPage() . " " . mb_strtoupper(api_text("module-diary_export-pageOf"), 'UTF-8') . " " . $this->getAliasNbPages(), 0, 0, 'L', 0);
        $this->Cell(0, 3, mb_strtoupper(api_text("module-diary_export-footer"), 'UTF-8') . " " . $training->datetraining, 0, 0, 'R', 0);
        //$this->Cell(0,3,mb_strtoupper(api_text("module-diary_export-footer"),'UTF-8')." ".$GLOBALS['module-diary']->number,0,0,'R',0);
    }
}
// create new pdf document
$pdf = new MYPDF('L', 'mm', 'A4', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
//$pdf->SetAuthor(api_account($training->addIdAccount)->name);
$pdf->SetTitle("Dettaglio allenamenti svolti");
//$pdf->SetSubject("Training nr. ".$training->number." - ".api_timestampFormat($request->timestamp,api_text("date")));
// header and footer
$pdf->setPrintHeader(true);
$pdf->setPrintFooter(true);
// set margins
$pdf->SetMargins(10, 30, 10);
$pdf->SetHeaderMargin(30);
$pdf->SetFooterMargin(10);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, 15);
// set font
$pdf->SetFont('freesans', '', 12, '', true);
// add a page
$pdf->AddPage();
// page styles
$pdf->SetTextColor(0);
$pdf->SetFillColor(245);
$fill = FALSE;
开发者ID:masKratter,项目名称:module-diary,代码行数:31,代码来源:module-diary_export_list.php

示例5: generarReporte

 public function generarReporte($atributosReceta, $labelCabecera, $labelDetalle, $labelPie, $datosCabecera, $datosDetalle, $datosExamen, $datosExamenUni, $datosGrupo, $datosPie, $modo, $nombreReceta, $parametros)
 {
     $lblCabecera = array();
     $lblDetalle = array();
     $lblPie = array();
     $styleCL = array();
     $styleCD = array();
     $styleDL = array();
     $styleDD = array();
     $stylePL = array();
     $stylePD = array();
     $o_classGeneral = new classGeneral();
     $o_classGeneral->setLabelCabecera($labelCabecera, $atributosReceta);
     $styleCL = $o_classGeneral->getStyleCL();
     $styleCD = $o_classGeneral->getStyleCD();
     $lblCabecera = $o_classGeneral->getLblCabecera();
     $o_classGeneral->setLabelDetalle($labelDetalle, $atributosReceta);
     $styleDL = $o_classGeneral->getStyleDL();
     $styleDD = $o_classGeneral->getStyleDD();
     $lblDetalle = $o_classGeneral->getLblDetalle();
     $o_classGeneral->setLabelPie($labelPie, $atributosReceta);
     $stylePL = $o_classGeneral->getStylePL();
     $stylePD = $o_classGeneral->getStylePD();
     $lblPie = $o_classGeneral->getLblPie();
     $pdf = new MYPDF($parametros["PDF_PAGE_ORIENTATION"], PDF_UNIT, $parametros["PDF_PAGE_FORMAT"], true, 'UTF-8', false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('Juan Carlos Ludeña Montesinos');
     $pdf->SetTitle('Generardor de Reportes');
     $pdf->SetSubject('Generardor de Reportes');
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     $pdf->setPrintHeader($parametros["PRINT_HEADER"]);
     $pdf->setPrintFooter($parametros["PRINT_FOOTER"]);
     $pdf->SetMargins($parametros["PDF_MARGIN_LEFT"], $parametros["PDF_MARGIN_TOP"], $parametros["PDF_MARGIN_RIGHT"]);
     $pdf->SetHeaderMargin($parametros["PDF_MARGIN_HEADER"]);
     $pdf->SetFooterMargin($parametros["PDF_MARGIN_FOOTER"]);
     $pdf->SetAutoPageBreak($parametros["AUTO_PAGE_BREAK"], $parametros["PDF_MARGIN_BOTTOM"]);
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     $pdf->SetFont('helvetica', '', 6);
     $pdf->AddPage();
     $style = array('position' => '', 'align' => 'C', 'stretch' => false, 'fitwidth' => true, 'cellfitalign' => '', 'border' => false, 'hpadding' => 'auto', 'vpadding' => 'auto', 'fgcolor' => array(0, 0, 0), 'bgcolor' => false, 'text' => false, 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4);
     $pdf->write1DBarcode($parametros["CODIGO_DE_BARRAS"], 'C39', 75, 278, 70, 8, 0.4, $style, 'N');
     $pdf->CargarDatos($lblCabecera, $lblDetalle, $lblPie, $datosCabecera, $datosDetalle, $datosExamen, $datosExamenUni, $datosGrupo, $datosPie, $styleCL, $styleDL, $stylePL, $styleCD, $styleDD, $stylePD, $modo);
     $pdf->lastPage();
     $pdf->Output($nombreReceta, 'I');
 }
开发者ID:gianpascal,项目名称:yachay,代码行数:49,代码来源:generadorDeReportesLaboratorio.php

示例6: MYPDF

		$requestData= $_REQUEST;
		   $reportname=$DB->get_record('block_cobalt_reports',array('id'=>$requestData['id']));
		  // Position at 15 mm from bottom
		 
		  // Set font
		  $this->SetFont('helvetica', 'I', 10);
         
		  $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
		  $this->SetY(-15);
		  $this->Cell(0, 10,'('.''.$reportname->name.''.')', 0, false, 'C', 0, '', 0, false, 'T', 'M');
	  }
   }
   
    $doc = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

    $doc->setPrintHeader(true);
    $doc->setPrintFooter(true);
   
   // set default header data
   $doc->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 059', PDF_HEADER_STRING);
   
   // set header and footer fonts
   $doc->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
   $doc->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
   
   // set default monospaced font
   $doc->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
   
   // set margins
   $doc->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
   $doc->SetHeaderMargin(PDF_MARGIN_HEADER);
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:31,代码来源:export.php

示例7: printToServer

function printToServer($content, $name, $client, $folder_name, $version)
{
    //$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    // set document information
    $pdf->setVersion($version);
    $pdf->SetCreator(PDF_CREATOR);
    $pdf->SetAuthor('Ignitor Labs');
    $pdf->setHeaderFont(false);
    $pdf->setPrintHeader(false);
    $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, PDF_MARGIN_TOP, 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);
    // set some language-dependent strings (optional)
    if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
        require_once dirname(__FILE__) . '/lang/eng.php';
        $pdf->setLanguageArray($l);
    }
    // ---------------------------------------------------------
    // add a page
    $pdf->AddPage();
    // set font
    $pdf->SetFont('times', 'BI', 20, '', 'false');
    //$pdf->Write(0, 'Example of HTML Justification', '', 0, 'L', true, 0, false, false, 0);
    // create some HTML content
    $html = $content;
    // set core font
    $pdf->SetFont('helvetica', '', 10);
    // output the HTML content
    $pdf->writeHTML($html, true, 0, true, true);
    // ---------------------------------------------------------
    //Close and output PDF document
    $pdf->Output('assets/contracts/' . $folder_name . '/' . $client . '_' . $name . '.pdf', 'F');
}
开发者ID:aanyun,项目名称:online-contract-signing,代码行数:42,代码来源:API.php

示例8: generarMYPDF

 public function generarMYPDF($atributosReceta, $labelCabecera, $labelDetalle, $labelPie, $datosCabecera, $datosDetalle, $datosPie, $modo, $nombreReceta, $parametros)
 {
     /* =======================================        Obs       ============================================ */
     // width->0, height->1, top->2, left->3, color->4 TipoLetra=>5 EstiloLetra=>6 TamañoLetra=>6
     /* ===================================================================================================== */
     $lblCabecera = array();
     $lblDetalle = array();
     $lblPie = array();
     $styleCL = array();
     $styleCD = array();
     $styleDL = array();
     $styleDD = array();
     $stylePL = array();
     $stylePD = array();
     $o_classGeneral = new classGeneral();
     $o_classGeneral->setLabelCabecera($labelCabecera, $atributosReceta);
     $styleCL = $o_classGeneral->getStyleCL();
     $styleCD = $o_classGeneral->getStyleCD();
     $lblCabecera = $o_classGeneral->getLblCabecera();
     $o_classGeneral->setLabelDetalle($labelDetalle, $atributosReceta);
     $styleDL = $o_classGeneral->getStyleDL();
     $styleDD = $o_classGeneral->getStyleDD();
     $lblDetalle = $o_classGeneral->getLblDetalle();
     $o_classGeneral->setLabelPie($labelPie, $atributosReceta);
     $stylePL = $o_classGeneral->getStylePL();
     $stylePD = $o_classGeneral->getStylePD();
     $lblPie = $o_classGeneral->getLblPie();
     /* ====================================================================================================== */
     // create new PDF document  //PDF_PAGE_ORIENTATION(P,L)
     $pdf = new MYPDF($parametros["PDF_PAGE_ORIENTATION"], PDF_UNIT, $parametros["PDF_PAGE_FORMAT"], true, 'UTF-8', false);
     // set document information
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('Juan Carlos Ludeña Montesinos');
     $pdf->SetTitle('Generardor de Reportes');
     $pdf->SetSubject('Generardor de Reportes');
     //$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
     // set default header data
     //$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 011', 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);
     // remove default header/footer
     $pdf->setPrintHeader($parametros["PRINT_HEADER"]);
     $pdf->setPrintFooter($parametros["PRINT_FOOTER"]);
     //set margins
     $pdf->SetMargins($parametros["PDF_MARGIN_LEFT"], $parametros["PDF_MARGIN_TOP"], $parametros["PDF_MARGIN_RIGHT"]);
     $pdf->SetHeaderMargin($parametros["PDF_MARGIN_HEADER"]);
     $pdf->SetFooterMargin($parametros["PDF_MARGIN_FOOTER"]);
     //set auto page breaks
     $pdf->SetAutoPageBreak($parametros["AUTO_PAGE_BREAK"], $parametros["PDF_MARGIN_BOTTOM"]);
     //set image scale factor
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     //set some language-dependent strings
     //$pdf->setLanguageArray($l);
     // ---------------------------------------------------------
     // set font
     $pdf->SetFont('helvetica', '', 6);
     // add a page
     $pdf->AddPage();
     //Data loading
     // print colored table
     $pdf->ColoredTable($lblCabecera, $lblDetalle, $lblPie, $datosCabecera, $datosDetalle, $datosPie, $styleCL, $styleDL, $stylePL, $styleCD, $styleDD, $stylePD, $modo);
     $pdf->lastPage();
     // ---------------------------------------------------------
     //Close and output PDF document
     $pdf->Output($nombreReceta, 'I');
     //$pdf->extractCSSproperties();
     //============================================================+
     // END OF FILE
     //============================================================+
 }
开发者ID:gianpascal,项目名称:yachay,代码行数:73,代码来源:generadorDeReportes.php


注:本文中的MYPDF::setPrintHeader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。