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


PHP TCPDF::SetPrintHeader方法代码示例

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


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

示例1: PdfAction

 public function PdfAction()
 {
     $pdf = new TCPDF('L');
     $pdf->SetPrintHeader(true);
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     // set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
     $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);
     }
     // set font
     $pdf->SetFont('helvetica', '', 8);
     // add a page
     $pdf->AddPage();
     //get report data into $data variable
     $project = $this->getServiceLocator()->get('ProjectTable');
     $data = $project->getWsr();
     $view = new PhpRenderer();
     $resolver = new TemplateMapResolver();
     //set the path of the pdf.phtml file
     $resolver->setMap(array('PDFTemplate' => '/var/www/html/WSRAutomation/module/Application/view/application/index/pdf.phtml'));
     $view->setResolver($resolver);
     $viewModel = new ViewModel();
     $viewModel->setTemplate('PDFTemplate')->setVariables(array('projects' => $data, 'view' => 'pdf'));
     $html = $view->render($viewModel);
     $pdf->writeHTML($html, true, 0, true, 0);
     $pdf->Output('WsrReport.pdf', 'I');
 }
开发者ID:vikas1monu,项目名称:ProductionWsr,代码行数:35,代码来源:IndexController.php

示例2: student_kolizijapdf


//.........这里部分代码省略.........
    // Privremeni hack za master
    if ($tipstudija == 3) {
        $mscfile = "-msc";
    } else {
        if ($tipstudija == 2) {
            $mscfile = "";
        }
    }
    // Ako čovjek upisuje prvu godinu nečeka (mastera), broj indexa je netačan!
    if ($godina == 1) {
        $brindexa = "";
    }
    // ----- Pravljenje PDF dokumenta
    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    // set document information
    $pdf->SetCreator("Zamger");
    $pdf->SetTitle('Domestic Learning Agreement / Ugovor o ucenju');
    // set default monospaced font
    $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
    //set margins
    $pdf->SetMargins(0, 0, 0);
    //set auto page breaks
    $pdf->SetAutoPageBreak(false);
    //set image scale factor
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    //$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO*2.083333);
    $pdf->setJPEGQuality(100);
    //set some language-dependent strings
    $pdf->setLanguageArray($l);
    // ---------------------------------------------------------
    // set font
    $pdf->SetFont('freesans', 'B', 9);
    $pdf->SetHeaderData("", 0, "", "");
    $pdf->SetPrintHeader(false);
    $pdf->SetPrintFooter(false);
    // add a page
    $pdf->AddPage();
    //	$pdf->Image("images/content/150dpi/ETF-Domestic-contract-PGS-ALL-0.png",210,297,0,0,'','','',true,150);
    $pdf->Image("images/content/150dpi/domestic-contract{$mscfile}-0.png", 0, 0, 210, 0, '', '', '', true, 150);
    $pdf->SetXY(175, 34);
    $pdf->Cell(23, 0, $agnaziv, 0, 0, 'C');
    $pdf->SetXY(175, 42);
    $pdf->Cell(23, 0, $godina . ".", 0, 0, 'C');
    $pdf->SetXY(175, 50);
    $pdf->Cell(23, 0, $sem1 . ". & " . $sem2, 0, 0, 'C');
    $pdf->SetXY(70, 48);
    $pdf->Cell(100, 0, $studijeng, 0, 0);
    $pdf->SetXY(70, 52);
    $pdf->Cell(100, 0, $studijbos, 0, 0);
    $pdf->SetXY(70, 62);
    $pdf->Cell(100, 0, $imeprezime);
    $pdf->SetXY(70, 69);
    $pdf->Cell(100, 0, $brindexa);
    // PRVI SEMESTAR
    $pdf->AddPage();
    $pdf->Image("images/content/150dpi/domestic-contract{$mscfile}-1.png", 0, 0, 210);
    $pdf->SetXY(175, 34);
    $pdf->Cell(23, 0, $agnaziv, 0, 0, 'C');
    $pdf->SetXY(175, 42);
    $pdf->Cell(23, 0, $godina . ".", 0, 0, 'C');
    $pdf->SetXY(175, 50);
    $pdf->Cell(23, 0, $sem1 . ".", 0, 0, 'C');
    $pdf->SetXY(70, 48);
    $pdf->Cell(100, 0, $studijeng, 0, 0);
    $pdf->SetXY(70, 52);
    $pdf->Cell(100, 0, $studijbos, 0, 0);
开发者ID:msehalic,项目名称:zamger,代码行数:67,代码来源:kolizijapdf.php

示例3: izvjestaj_prijemni_brzi_unos

function izvjestaj_prijemni_brzi_unos()
{
    require_once 'lib/tcpdf/tcpdf.php';
    $termin = intval($_REQUEST['termin']);
    $osoba = intval($_REQUEST['osoba']);
    $q10 = myquery("select ime, prezime, imeoca, jmbg from osoba where id={$osoba}");
    if (mysql_num_rows($q10) < 1) {
        biguglyerror("Nepostojeća osoba");
        zamgerlog("nepostojeca osoba {$osoba}", 3);
        return;
    }
    $ime = mysql_result($q10, 0, 0);
    $prezime = mysql_result($q10, 0, 1);
    $imeoca = mysql_result($q10, 0, 2);
    $jmbg = mysql_result($q10, 0, 3);
    $q20 = myquery("select sifra, jezik from prijemni_obrazac where osoba={$osoba} and prijemni_termin={$termin}");
    if (mysql_num_rows($q20) < 1) {
        biguglyerror("Ne postoji obrazac za ovu osobu");
        zamgerlog("za osobu u{$osoba} ne postoji obrazac na terminu {$termin}", 3);
        return;
    }
    $sifra = mysql_result($q20, 0, 0);
    $jezik = mysql_result($q20, 0, 1);
    $datum = date("d. m. Y.");
    $vrijeme = date("h:i");
    // ----- Pravljenje PDF dokumenta
    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    // set document information
    $pdf->SetCreator("Zamger");
    $pdf->SetTitle('Sifra kandidata i pregled vaznijih datuma');
    // set default monospaced font
    $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
    //set margins
    $pdf->SetMargins(0, 0, 0);
    //set auto page breaks
    $pdf->SetAutoPageBreak(false);
    //set image scale factor
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    //$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO*2.083333);
    $pdf->setJPEGQuality(100);
    //set some language-dependent strings
    $pdf->setLanguageArray($l);
    // ---------------------------------------------------------
    // set font
    $pdf->SetFont('freesans', '', 48);
    $pdf->SetHeaderData("", 0, "", "");
    $pdf->SetPrintHeader(false);
    $pdf->SetPrintFooter(false);
    // add a page
    $pdf->AddPage();
    //	$pdf->Image("images/content/150dpi/ETF-Domestic-contract-PGS-ALL-0.png",210,297,0,0,'','','',true,150);
    if ($jezik == "en") {
        $pdf->Image("images/content/150dpi/obrazac_sa_sifrom_en.png", 0, 0, 210, 0, '', '', '', true, 150);
        $en_offset = 7;
    } else {
        $pdf->Image("images/content/150dpi/obrazac_sa_sifrom.png", 0, 0, 210, 0, '', '', '', true, 150);
        $en_offset = 0;
    }
    $pdf->SetXY(130, 15);
    $pdf->Cell(23, 0, $sifra, 0, 0, 'C');
    $pdf->SetFont('freesans', '', 16);
    $pdf->SetXY(80, 62 + $en_offset);
    $pdf->Cell(23, 0, "{$ime} ({$imeoca}) {$prezime}");
    $pdf->SetXY(80, 73 + $en_offset);
    $pdf->Cell(23, 0, $jmbg);
    $pdf->SetFont('freesans', '', 14);
    $pdf->SetXY(40, 113 + $en_offset);
    $pdf->Cell(23, 0, $datum);
    $pdf->SetXY(130, 113 + $en_offset);
    $pdf->Cell(23, 0, $vrijeme);
    // ---------------------------------------------------------
    //Close and output PDF document
    $pdf->Output('obrazac_sa_sifrom.pdf', 'I');
    //============================================================+
    // END OF FILE
    //============================================================+
}
开发者ID:msehalic,项目名称:zamger,代码行数:77,代码来源:prijemni_brzi_unos.php

示例4: __construct

 /**
  * @param Layout $default_layout
  */
 public function __construct(Layout $default_layout)
 {
     $this->pdf = new \TCPDF('P', 'pt', 'A4', true, 'UTF-8');
     $this->pdf->SetTitle($default_layout->getReportTitle());
     $this->pdf->SetCreator('Thinreports Generator');
     $this->pdf->SetAutoPageBreak(false);
     $this->pdf->SetMargins(0, 0, 0, true);
     $this->pdf->SetCellPadding(0);
     $this->pdf->SetCellMargins(0, 0, 0, 0);
     $this->pdf->SetPrintHeader(false);
     $this->pdf->SetPrintFooter(false);
     $this->default_layout = $default_layout;
     $this->default_page_format = $this->buildPageFormat($default_layout);
 }
开发者ID:k-yamamura,项目名称:thinreports-php,代码行数:17,代码来源:Document.php

示例5: __construct

 /**
  * @param Layout|null $default_layout
  */
 public function __construct(Layout $default_layout = null)
 {
     $this->pdf = new \TCPDF('P', 'pt', 'A4', true, 'UTF-8');
     $this->pdf->SetCreator('Thinreports Generator');
     $this->pdf->SetAutoPageBreak(false);
     $this->pdf->SetMargins(0, 0, 0, true);
     $this->pdf->SetCellPadding(0);
     $this->pdf->SetCellMargins(0, 0, 0, 0);
     $this->pdf->SetPrintHeader(false);
     $this->pdf->SetPrintFooter(false);
     if ($default_layout !== null) {
         $this->pdf->SetTitle($default_layout->getReportTitle());
         $this->registerPageFormat($default_layout);
     }
     $this->initDrawer();
 }
开发者ID:monnouchi,项目名称:thinreports-php,代码行数:19,代码来源:Document.php

示例6: prepareStockStatusReport

function prepareStockStatusReport($conn)
{
    $lan = $_POST['lan'];
    if ($lan == 'en-GB') {
        $MonthList = array('1' => 'January', '2' => 'February', '3' => 'March', '4' => 'April', '5' => 'May', '6' => 'June', '7' => 'July', '8' => 'August', '9' => 'September', '10' => 'October', '11' => 'November', '12' => 'December');
    } else {
        $MonthList = array('1' => 'Janvier', '2' => 'F�vrier', '3' => 'Mars', '4' => 'Avril', '5' => 'Mai', '6' => 'Juin', '7' => 'Juillet', '8' => 'Ao�t', '9' => 'Septembre', '10' => 'Octobre', '11' => 'Novembre', '12' => 'D�cembre');
    }
    require_once 'tcpdf/tcpdf.php';
    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    $pdf->SetPrintHeader(false);
    $pdf->SetPrintFooter(false);
    $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
        require_once dirname(__FILE__) . '/lang/eng.php';
        $pdf->setLanguageArray($l);
    }
    $pdf->SetFont('dejavusans', '', 12);
    $pdf->AddPage();
    ini_set('magic_quotes_gpc', 'off');
    $html = htmlentities($_POST['html'], ENT_QUOTES, "UTF-8");
    $html = html_entity_decode($html, ENT_QUOTES, "UTF-8");
    $alavel = htmlentities($_POST['alavel'], ENT_QUOTES, "UTF-8");
    $alavel = html_entity_decode($alavel, ENT_QUOTES, "UTF-8");
    $filePath = SITEDOCUMENT . 'administrator/components/com_jcode/source/report/pdfslice/stock_status.svg';
    if (file_exists($filePath)) {
        unlink($filePath);
    }
    $file = fopen($filePath, "w");
    fwrite($file, $html);
    fclose($file);
    $pdf->ImageSVG($file = 'pdfslice/stock_status.svg', $x = 8, $y = 20, $w = 180, $h = '', $link = '', $align = 'left', $palign = 'center', $border = 0, $fitonpage = false);
    $html2 = <<<EOF
    <!-- EXAMPLE OF CSS STYLE -->
    <style>
    </style>
    <body>
        <div id="barchartlegend">
            {$alavel}
        </div>
    </body>
EOF;
    echo $html2;
    $pdf->writeHTMLCell($w = 150, $h = 30, $x = 15, $y = 0, $html2, $border = 0, $ln = 0, $fill = false, $reseth = true, $align = 'C', $autopadding = true);
    $filePath = SITEDOCUMENT . 'administrator/components/com_jcode/source/report/pdfslice/StockStatusChart.pdf';
    if (file_exists($filePath)) {
        unlink($filePath);
    }
    $pdf->Output('pdfslice/StockStatusChart.pdf', 'F');
}
开发者ID:sankam-nikolya,项目名称:lptt,代码行数:55,代码来源:r_report_stock_status_different_level_pdf.php

示例7: prepareFundingStatusReport

function prepareFundingStatusReport($conn)
{
    require_once 'tcpdf/tcpdf.php';
    //$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    $pdf = new TCPDF('L', PDF_UNIT, 'Letter', true, 'UTF-8', false);
    $pdf->SetPrintHeader(false);
    $pdf->SetPrintFooter(false);
    $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
        require_once dirname(__FILE__) . '/lang/eng.php';
        $pdf->setLanguageArray($l);
    }
    $pdf->SetFont('dejavusans', '', 7);
    $pdf->AddPage($orientation = L, $format = 'Letter', $keepmargins = true, $tocpage = false);
    ini_set('magic_quotes_gpc', 'off');
    $html = htmlentities($_POST['html'], ENT_QUOTES, "UTF-8");
    $html = html_entity_decode($html, ENT_QUOTES, "UTF-8");
    $alavel = htmlentities($_POST['alavel'], ENT_QUOTES, "UTF-8");
    $alavel = html_entity_decode($alavel, ENT_QUOTES, "UTF-8");
    $filePath = SITEDOCUMENT . 'administrator/components/com_jcode/source/report/pdfslice/funding_status.svg';
    if (file_exists($filePath)) {
        unlink($filePath);
    }
    $file = fopen($filePath, "w");
    fwrite($file, $html);
    fclose($file);
    $pdf->ImageSVG($file = 'pdfslice/funding_status.svg', $x = 3, $y = 20, $w = 1291, $h = 400, $link = '', $align = '', $palign = 'center', $border = 0, $fitonpage = false);
    $html2 = <<<EOF
    <!-- EXAMPLE OF CSS STYLE -->
    <style>
    </style>
    <body>
        <div id="barchartlegend">
            {$alavel}
        </div>
    </body>
EOF;
    echo $html2;
    $pdf->writeHTMLCell($w = 150, $h = 30, $x = 15, $y = 130, $html2, $border = 0, $ln = 0, $fill = false, $reseth = true, $align = 'middle', $autopadding = true);
    $filePath = SITEDOCUMENT . 'administrator/components/com_jcode/source/report/pdfslice/FundingStatusChart.pdf';
    if (file_exists($filePath)) {
        unlink($filePath);
    }
    $pdf->Output('pdfslice/FundingStatusChart.pdf', 'F');
}
开发者ID:sankam-nikolya,项目名称:lptt,代码行数:50,代码来源:r_report_funding_status_pdf.php

示例8: postAdicionar

 public function postAdicionar()
 {
     $pdf = new TCPDF();
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('GestBiblio - Sistema de Gestão de Bibliotecas');
     $pdf->SetTitle('Comprovante de Imprestimo');
     $pdf->SetPrintHeader(false);
     $pdf->SetPrintFooter(false);
     $pdf->AddPage();
     $html = '';
     $pdf->Text(90, 140, 'This is a test');
     $filename = storage_path() . '/test.pdf';
     $pdf->output($filename, 'F');
     return Response::view($filename);
 }
开发者ID:bening2011,项目名称:GestBiblio-TCC,代码行数:15,代码来源:FpdfController.php

示例9: printPost

 /**
  * [พิมพ์ post]
  * @param  [type] $id [description]
  * @return [type]     [description]
  */
 public function printPost($id)
 {
     if (Session::get('c3') == 1) {
         $sql = ' select c.*, concat(n.pname,n.fname," ",n.lname) as fullname from c_blog_posts c left join n_datageneral n on n.cid=c.created_by';
         $sql .= ' where postID =' . e($id) . ' ';
         $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
         $pdf->SetPrintHeader(false);
         $pdf->SetPrintFooter(false);
         // set header and footer fonts
         $pdf->setHeaderFont(array('angsanaupc', '', PDF_FONT_SIZE_MAIN));
         $pdf->setFooterFont(array('angsanaupc', '', PDF_FONT_SIZE_DATA));
         // set default monospaced font
         $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
         // set margins
         $pdf->SetMargins(15, 15, 15);
         $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
         $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
         $pdf->AddPage();
         $pdf->SetFont('angsanaupc', 'B', 16, '', true);
         $pdf->SetXY(15, 15);
         $pdf->MultiCell(180, 0, 'ใบประสานงานขอรถ', 0, 'C', 0, 1, '', '', true);
         $data = DB::select($sql);
         $pdf->SetFont('angsanaupc', '', 14, '', true);
         $tbl = '<br /><br /><table style="width: 100%; padding:2px;" cellspacing="0">';
         foreach ($data as $key => $value) {
             $tbl = $tbl . '<tr>
                   <td style="border: 0px solid #000000; text-align:left"> เรื่อง ' . $value->postTitle . '</td>
               </tr>';
             $tbl = $tbl . '<tr>
                   <td style="border: 0px solid #000000; text-align:left"> สร้างโดย ' . $value->fullname . ' วันที่ ' . date("d-m", strtotime($value->postDate)) . '-' . (date("Y", strtotime($value->postDate)) + 543) . ' เวลา ' . date("H:i:s", strtotime($value->postDate)) . '</td>
               </tr>';
             $tbl = $tbl . '<tr>
                   <td style="border: 0px solid #000000; text-align:left"> ' . $value->postDesc . '</td>
               </tr>';
         }
         $tbl = $tbl . '</table>';
         $pdf->writeHTML($tbl, true, false, false, false, '');
         $filename = storage_path() . '/report_post.pdf';
         $contents = $pdf->output($filename, 'I');
         $headers = array('Content-Type' => 'application/pdf');
         return Response::make($contents, 200, $headers);
     } else {
         return Redirect::to('contact');
     }
 }
开发者ID:themesanasang,项目名称:car,代码行数:50,代码来源:ContactController.php

示例10: initialize_pdf

 /**
  * Sets up a new PDF object with the necessary settings
  *
  * @return  FPDF            A new PDF object
  */
 protected function initialize_pdf()
 {
     global $CFG;
     require_once $CFG->dirroot . '/local/elisreports/lib/tcpdf/tcpdf.php';
     $newpdf = new TCPDF('L', 'in', 'letter');
     //prevent the library from automatically outputting
     //header or footer bars
     $newpdf->SetPrintHeader(false);
     $newpdf->SetPrintFooter(false);
     $newpdf->setMargins(self::marginx, self::marginy);
     $newpdf->SetFont('freesans', '', 9);
     $newpdf->AddPage();
     $newpdf->SetFont('freesans', '', 16);
     $newpdf->MultiCell(0, 0.2, $this->report->title, 0, 'C');
     $newpdf->Ln(0.2);
     $newpdf->SetFont('freesans', '', 8);
     $newpdf->SetFillColor(225, 225, 225);
     return $newpdf;
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:24,代码来源:php_report_export_pdf.class.php

示例11: TCPDF

 function _pdf_create($content = null, $fileName = null)
 {
     // create pdf by tcpdf
     $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('Nicola Asuni');
     $pdf->SetTitle('TCPDF Example 001');
     $pdf->SetSubject('TCPDF Tutorial');
     $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
     $pdf->setFooterData(array(0, 64, 0), array(0, 64, 128));
     //$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     //$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     $pdf->SetPrintFooter(false);
     $pdf->SetPrintHeader(false);
     $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     $pdf->setFontSubsetting(true);
     $pdf->SetFont('times', '', 11, '', true);
     $pdf->AddPage();
     $pdf->writeHTMLCell(0, 0, '', '', $content, 0, 1, 0, true, '', true);
     $pdf->Output(IMAGE_LOCATION . $fileName . '.pdf', 'F');
 }
开发者ID:sohelsarder,项目名称:mdocDashboard,代码行数:22,代码来源:PrescriptionsController.php

示例12: generateShipmentReport

function generateShipmentReport($conn)
{
    global $gTEXT;
    require_once 'tcpdf/tcpdf.php';
    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    $pdf->SetPrintHeader(false);
    $pdf->SetPrintFooter(false);
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
        require_once dirname(__FILE__) . '/lang/eng.php';
        $pdf->setLanguageArray($l);
    }
    $pdf->AddPage();
    $pdf->SetFillColor(255, 255, 255);
    //=====================================================National Inventory Table=======================================================
    /*	$months = $_POST['MonthNumber']; 
        $monthIndex = date("n");
        $yearIndex = date("Y");
        settype($yearIndex, "integer");    
        if ($monthIndex == 1){
    		$monthIndex = 12;				
    		$yearIndex = $yearIndex - 1;				
    	}else{
    	    $monthIndex = $monthIndex - 1;
    	}
        $months = $months - 1;  
          	   
        $currentYearMonth = $yearIndex."-0".$monthIndex."-"."01";    
        $currentYearMonth = date('Y-m-d', strtotime($currentYearMonth));
    	$lastYearMonth = date("Y-m-d", strtotime(date("Y-m-d", strtotime($currentYearMonth)) . "-".$months." month"));  
        */
    $StartMonthId = $_POST['StartMonthId'];
    $StartYearId = $_POST['StartYearId'];
    $EndMonthId = $_POST['EndMonthId'];
    $EndYearId = $_POST['EndYearId'];
    if ($_POST['MonthNumber'] != 0) {
        $months = $_POST['MonthNumber'];
        $monthIndex = date("m");
        $yearIndex = date("Y");
        settype($yearIndex, "integer");
        $startDate = $yearIndex . "-" . $monthIndex . "-" . "01";
        $startDate = date('Y-m-d', strtotime($startDate));
        $months--;
        $endDate = date("Y-m-d", strtotime(date("Y-m-d", strtotime($startDate)) . "+" . $months . " month"));
    } else {
        $startDate = $StartYearId . "-" . $StartMonthId . "-" . "01";
        $startDate = date('Y-m-d', strtotime($startDate));
        $d = cal_days_in_month(CAL_GREGORIAN, $EndMonthId, $EndYearId);
        $endDate = $EndYearId . "-" . $EndMonthId . "-" . $d;
        $endDate = date('Y-m-d', strtotime($endDate));
    }
    $CountryId = $_POST['ACountryId'];
    $AFundingSourceId = $_POST['AFundingSourceId'];
    $ASStatusId = $_POST['ASStatusId'];
    $ItemGroup = $_POST['ItemGroup'];
    $OwnerTypeId = $_POST['OwnerType'];
    if ($AFundingSourceId) {
        $AFundingSourceId = " AND a.FundingSourceId = '" . $AFundingSourceId . "' ";
    }
    if ($ASStatusId) {
        $ASStatusId = " AND a.ShipmentStatusId = '" . $ASStatusId . "' ";
    }
    if ($ItemGroup) {
        $ItemGroup = " AND e.ItemGroupId = '" . $ItemGroup . "' ";
    }
    if ($OwnerTypeId) {
        $OwnerTypeId = " AND f.OwnerTypeId = '" . $OwnerTypeId . "' ";
    }
    $sLimit = "";
    if (isset($_POST['iDisplayStart'])) {
        $sLimit = " LIMIT " . mysql_real_escape_string($_POST['iDisplayStart']) . ", " . mysql_real_escape_string($_POST['iDisplayLength']);
    }
    $sOrder = "";
    if (isset($_POST['iSortCol_0'])) {
        $sOrder = " ORDER BY  ";
        for ($i = 0; $i < mysql_real_escape_string($_POST['iSortingCols']); $i++) {
            $sOrder .= fnColumnToField_agencyShipment(mysql_real_escape_string($_POST['iSortCol_' . $i])) . "" . mysql_real_escape_string($_POST['sSortDir_' . $i]) . ", ";
        }
        $sOrder = substr_replace($sOrder, "", -2);
    }
    $sWhere = "";
    if ($_POST['sSearch'] != "") {
        $sWhere = "  AND (a.ItemNo LIKE '%" . mysql_real_escape_string($_POST['sSearch']) . "%'  OR " . " e.ItemName LIKE '%" . mysql_real_escape_string($_POST['sSearch']) . "%' OR " . " c.ShipmentStatusDesc LIKE '%" . mysql_real_escape_string($_POST['sSearch']) . "%')  ";
    }
    $sql = "SELECT SQL_CALC_FOUND_ROWS AgencyShipmentId, a.FundingSourceId, d.FundingSourceName, a.ShipmentStatusId, c.ShipmentStatusDesc, a.CountryId, \n            b.CountryName, a.ItemNo, e.ItemName, a.ShipmentDate, a.Qty, a.OwnerTypeId, f.OwnerTypeName \n\t\t\tFROM t_agencyshipment as a\n            INNER JOIN t_country b ON a.CountryId = b.CountryId\n            INNER JOIN t_shipmentstatus c ON a.ShipmentStatusId = c.ShipmentStatusId\n            INNER JOIN t_fundingsource d ON a.FundingSourceId= d.FundingSourceId\n            INNER JOIN t_itemlist e ON a.ItemNo = e.ItemNo\n            INNER JOIN t_owner_type f ON a.OwnerTypeId = f.OwnerTypeId \n            WHERE CAST(a.ShipmentDate AS DATETIME) BETWEEN CAST('{$startDate}' AS DATETIME) AND CAST('{$endDate}' AS DATETIME) \n            AND (a.CountryId = " . $CountryId . " OR " . $CountryId . " = 0) \n            " . $AFundingSourceId . " " . $ASStatusId . " " . $ItemGroup . " " . $OwnerTypeId . "\n\t\t\t{$sWhere} {$sOrder} {$sLimit} ";
    $result = mysql_query($sql, $conn);
    $total = mysql_num_rows($result);
    $i = 0;
    $f = 0;
    $GrandtotalQty = 0;
    $SubtotalQty = 0;
    $OldCountry = ' ';
    $NewCountry = ' ';
    $serial = 1;
    $tblHTML = '';
    if ($total > 0) {
//.........这里部分代码省略.........
开发者ID:sankam-nikolya,项目名称:lptt,代码行数:101,代码来源:r_report_shipment_pdf.php

示例13: view_reserve

 public function view_reserve($id)
 {
     if (Session::get('level') == '1' || Session::get('level') == '3') {
         $sql = ' select * from c_reserve_cars ';
         $sql .= ' where reserve_id =' . $id . ' ';
         $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
         $pdf->SetPrintHeader(false);
         $pdf->SetPrintFooter(false);
         // set header and footer fonts
         $pdf->setHeaderFont(array('angsanaupc', '', PDF_FONT_SIZE_MAIN));
         $pdf->setFooterFont(array('angsanaupc', '', PDF_FONT_SIZE_DATA));
         // set default monospaced font
         $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
         // set margins
         $pdf->SetMargins(10, 10, 10);
         $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
         $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
         $pdf->SetFont('angsanaupc', '', 14, '', true);
         $pdf->AddPage();
         $pdf->SetXY(10, 10);
         $pdf->Image('images/krut.jpg', '', '', 20, 20, '', '', 'T', false, 300, '', false, false, 0, false, false, false);
         $pdf->SetFont('angsanaupc', 'B', 18, '', true);
         $pdf->SetXY(75, 20);
         $pdf->MultiCell(60, 0, 'บันทึกข้อความ', 0, 'C', 0, 1, '', '', true);
         $result = DB::select($sql);
         foreach ($result as $key) {
             $pdf->SetFont('angsanaupc', 'B', 14, '', true);
             $pdf->SetXY(10, 32);
             $pdf->MultiCell(25, 0, 'ส่วนราชการ', 0, 'L', 0, 1, '', '', true);
             //$pdf->SetFont('angsanaupc','',14,'',true);
             $pdf->SetXY(35, 32);
             $pdf->MultiCell(160, 0, 'ฝ่าย........................................................................................โรงพยาบาลโนนไทย อำเภอโนนไทย จังหวัดนครราชสีมา', 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(44, 31);
             $pdf->MultiCell(65, 0, $key->department, 0, 'L', 0, 1, '', '', true);
             //$pdf->SetFont('angsanaupc','B',14,'',true);
             $pdf->SetXY(10, 40);
             $pdf->MultiCell(10, 0, 'ที่', 0, 'L', 0, 1, '', '', true);
             //$pdf->SetFont('angsanaupc','B',14,'',true);
             $pdf->SetXY(20, 40);
             $pdf->MultiCell(170, 0, 'นม 0032.301/...........................................วันที่.............................................................................', 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(43, 39);
             $pdf->MultiCell(31, 0, $key->num_nm, 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(83, 39);
             $pdf->MultiCell(44, 0, $key->date_nm == '0000-00-00' ? '' : $this->get_monthyearThai($key->date_nm), 0, 'L', 0, 1, '', '', true);
             //$pdf->SetFont('angsanaupc','B',14,'',true);
             $pdf->SetXY(10, 48);
             $pdf->MultiCell(10, 0, 'เรื่อง', 0, 'L', 0, 1, '', '', true);
             //$pdf->SetFont('angsanaupc','B',14,'',true);
             $pdf->SetXY(20, 48);
             $pdf->MultiCell(60, 0, ' ขออนุมัติไปราชการ', 0, 'L', 0, 1, '', '', true);
             $style = array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '', 'phase' => 5, 'color' => array(0, 0, 0));
             $pdf->Line(10, 57, 195, 57, $style);
             //$pdf->SetFont('angsanaupc','B',14,'',true);
             $pdf->SetXY(10, 62);
             $pdf->MultiCell(70, 0, 'เรียน ผู้อำนวยการโรงพยาบาลโนนไทย', 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(20, 72);
             $pdf->MultiCell(176, 0, 'ด้วยข้าพเจ้า..........................................................................ตำแหน่ง...........................................................................................................', 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(39, 71);
             $pdf->MultiCell(55, 0, $key->req_name, 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(108, 71);
             $pdf->MultiCell(70, 0, $key->position, 0, 'L', 0, 1, '', '', true);
             $sql2 = ' select * from c_together where together_id=' . $key->together_id . ' ';
             $result2 = DB::select($sql2);
             $n = 0;
             $r = 0;
             $pdf->SetXY(10, 80);
             $pdf->MultiCell(20, 0, 'พร้อมด้วย', 0, 'L', 0, 1, '', '', true);
             if (count($result2) > 0) {
                 foreach ($result2 as $key2) {
                     $n++;
                     $r = $r + 7;
                     $pdf->SetXY(20, 84 + $r);
                     $pdf->MultiCell(176, 0, $n . '.................................................................................ตำแหน่ง.....................................................................................................................', 0, 'L', 0, 1, '', '', true);
                     $pdf->SetXY(25, 83 + $r);
                     $pdf->MultiCell(60, 0, $key2->req_name, 0, 'L', 0, 1, '', '', true);
                     $pdf->SetXY(100, 83 + $r);
                     $pdf->MultiCell(90, 0, $key2->position, 0, 'L', 0, 1, '', '', true);
                 }
             } else {
                 $pdf->SetXY(10, 85);
                 $pdf->MultiCell(20, 0, '-', 0, 'L', 0, 1, '', '', true);
             }
             $pdf->SetXY(10, 91 + $r);
             $pdf->MultiCell(186, 0, 'ขออนุมัติเดินทางไปราชการที่.............................................................................หน่วยงานผู้จัด...............................................................................', 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(50, 90 + $r);
             $pdf->MultiCell(59, 0, $key->location, 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(130, 90 + $r);
             $pdf->MultiCell(60, 0, $key->institution, 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(10, 97 + $r);
             $pdf->MultiCell(186, 0, 'เรื่อง...........................................................................................................................................................................................................................', 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(20, 96 + $r);
             $pdf->MultiCell(175, 0, $key->title, 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(10, 103 + $r);
             $pdf->MultiCell(187, 0, 'ตามหนังสือที่.........................................................................................................................ลงวันที่........................................................................', 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(32, 102 + $r);
             $pdf->MultiCell(74, 0, $key->ref_book_number, 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(136, 102 + $r);
             $pdf->MultiCell(50, 0, $key->ref_book_date == '0000-00-00' ? '' : $this->get_monthyearThai($key->ref_book_date), 0, 'L', 0, 1, '', '', true);
             $pdf->SetXY(10, 110 + $r);
             $pdf->MultiCell(186, 0, 'ทั้งนี้ตั้งแต่วันที่.........................................................................ถึงวันที่...........................................................................รวม............................วัน', 0, 'L', 0, 1, '', '', true);
//.........这里部分代码省略.........
开发者ID:themesanasang,项目名称:car,代码行数:101,代码来源:ReserveController.php

示例14: generateFacilityInventoryReport

function generateFacilityInventoryReport($conn)
{
    global $gTEXT;
    require_once 'tcpdf/tcpdf.php';
    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    $pdf->SetPrintHeader(false);
    $pdf->SetPrintFooter(false);
    $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
        require_once dirname(__FILE__) . '/lang/eng.php';
        $pdf->setLanguageArray($l);
    }
    $pdf->setFontSubsetting(false);
    $pdf->AddPage();
    $pdf->SetFillColor(255, 255, 255);
    //=====================================================Facility Inventory Table=======================================================
    $MonthId = $_REQUEST['MonthId'];
    $YearId = $_REQUEST['YearId'];
    $mosTypeId = $_REQUEST['MosTypeId'];
    $countryId = $_REQUEST['CountryId'];
    $fLevelId = $_REQUEST['FLevelId'];
    $FacilityId = $_REQUEST['FacilityId'];
    $ItemGroupId = $_REQUEST['ItemGroupId'];
    $regionId = $_REQUEST['RegionId'];
    $districtId = $_REQUEST['DistrictId'];
    $ownerTypeId = $_REQUEST['OwnerTypeId'];
    $region = $_REQUEST['Region'];
    $district = $_REQUEST['District'];
    $ownerType = $_REQUEST['OwnerType'];
    $year = $_REQUEST['Year'];
    $CountryName = $_REQUEST['CountryName'];
    $monthName = $_REQUEST['MonthName'];
    $ItemGroupName = $_REQUEST['ItemGroupName'];
    $FacilityName = $_REQUEST['FacilityName'];
    $lan = $_REQUEST['lan'];
    if ($lan == 'en-GB') {
        $SITETITLE = SITETITLEENG;
    } else {
        $SITETITLE = SITETITLEFRN;
    }
    $column_name = array();
    $sQuery1 = "SELECT\n\t\t\t    MosTypeId\n\t\t\t    , MosTypeName\n\t\t\t    , ColorCode\n\t\t\tFROM\n\t\t\t    t_mostype_facility\n\t\t\tWHERE CountryId = {$countryId} AND FLevelId = {$fLevelId}  AND (MosTypeId = {$mosTypeId} OR {$mosTypeId} = 0)\n\t\t\tORDER BY MosTypeId;";
    $rResult1 = mysql_query($sQuery1);
    $output1 = array();
    $col = '';
    while ($row1 = mysql_fetch_array($rResult1)) {
        $output1[] = $row1;
        array_push($column_name, $row1['MosTypeName']);
    }
    $col .= '<tr><th width="180" align="left"><b>' . $gTEXT['Product Name'] . '</b></th>';
    $col .= '<th width="60" align="left"><b>' . $gTEXT['Closing Balance'] . '</b></th>';
    $col .= '<th width="45" align="left"><b>' . $gTEXT['AMC'] . '</b></th>';
    $col .= '<th width="40" align="left"><b>' . $gTEXT['MOS'] . '</b></th>';
    $f = 0;
    for ($f = 0; $f < count($output1); $f++) {
        $col .= '<th width="70" align="right"><b>' . $column_name[$f] . '</b></th>';
    }
    $col .= '</tr>';
    /*
    	$sQuery = "SELECT p.MosTypeId, ItemName, MOS FROM (SELECT
    				    a.ItemNo
    				    , b.ItemName
    				    , a.MOS
    				,(SELECT MosTypeId FROM t_mostype_facility x WHERE CountryId = $countryId AND FLevelId = $fLevelId  AND (MosTypeId = $mosTypeId OR $mosTypeId = 0) AND a.MOS >= x.MinMos AND a.MOS < x.MaxMos) MosTypeId
    				FROM t_cfm_stockstatus a, t_itemlist b,  t_cfm_masterstockstatus c
    				WHERE a.itemno = b.itemno AND a.MOS IS NOT NULL AND a.MonthId = " . $_REQUEST['MonthId'] . " AND a.Year = '" . $_REQUEST['YearId'] . "' AND a.CountryId = " . $_REQUEST['CountryId'] . " AND a.FacilityId = " . $_REQUEST['FacilityId'] . " AND a.ItemGroupId = " . $_REQUEST['ItemGroupId'] . " AND a.CFMStockId = c.CFMStockId" . " AND c.StatusId = 5 " . ") p
    				WHERE (p.MosTypeId = $mosTypeId OR $mosTypeId = 0) 
    				ORDER BY ItemName";
    */
    if ($ownerTypeId == 1 || $ownerTypeId == 2) {
        $sQuery = "SELECT p.MosTypeId, ItemName, MOS ,ClStock,AMC FROM (SELECT\n\t\t\t\t    a.ItemNo, b.ItemName, a.MOS ,a.ClStock,a.AMC\n\t\t\t\t,(SELECT MosTypeId FROM t_mostype_facility x WHERE CountryId = {$countryId} \n                AND FLevelId = {$fLevelId}  AND (MosTypeId = {$mosTypeId} OR {$mosTypeId} = 0) \n                AND a.MOS >= x.MinMos AND a.MOS < x.MaxMos ) MosTypeId\n\t\t\t\tFROM t_cfm_stockstatus a, t_itemlist b,  t_cfm_masterstockstatus c, t_facility g\n\t\t\t\tWHERE a.itemno = b.itemno AND a.MOS IS NOT NULL AND a.MonthId = " . $MonthId . " \n                AND a.Year = '" . $YearId . "' AND a.CountryId = " . $countryId . " \n                AND a.FacilityId = " . $FacilityId . " AND a.ItemGroupId = " . $ItemGroupId . "\n                AND a.CFMStockId = c.CFMStockId" . " AND c.StatusId = 5 " . "\n                AND a.FacilityId=g.FacilityId \n                AND g.OwnerTypeId = {$ownerTypeId} \n                AND  (g.RegionId = {$regionId} OR {$regionId} = 0)\n                AND (g.DistrictId = {$districtId} OR {$districtId} = 0)\n                 ) p\n                \n\t\t\t\tWHERE (p.MosTypeId = {$mosTypeId} OR {$mosTypeId} = 0) \n\t\t\t\tORDER BY ItemName";
    } else {
        $sQuery = "SELECT p.MosTypeId, ItemName, MOS ,ClStock,AMC FROM (SELECT\n\t\t\t\t    a.ItemNo, b.ItemName, a.MOS ,a.ClStock,a.AMC\n\t\t\t\t,(SELECT MosTypeId FROM t_mostype_facility x WHERE CountryId = {$countryId} \n                AND FLevelId = {$fLevelId}  AND (MosTypeId = {$mosTypeId} OR {$mosTypeId} = 0) \n                AND a.MOS >= x.MinMos AND a.MOS < x.MaxMos ) MosTypeId\n\t\t\t\tFROM t_cfm_stockstatus a, t_itemlist b,  t_cfm_masterstockstatus c, t_facility g\n\t\t\t\tWHERE a.itemno = b.itemno AND a.MOS IS NOT NULL AND a.MonthId = " . $MonthId . " \n                AND a.Year = '" . $YearId . "' AND a.CountryId = " . $countryId . " \n                AND a.FacilityId = " . $FacilityId . " AND a.ItemGroupId = " . $ItemGroupId . "\n                AND a.CFMStockId = c.CFMStockId" . " AND c.StatusId = 5 " . "\n                AND a.FacilityId=g.FacilityId\n                AND g.AgentType = {$ownerTypeId} \n                AND  (g.RegionId = {$regionId} OR {$regionId} = 0)\n                AND (g.DistrictId = {$districtId} OR {$districtId} = 0) ) p\n                \n\t\t\t\tWHERE (p.MosTypeId = {$mosTypeId} OR {$mosTypeId} = 0) \n\t\t\t\tORDER BY ItemName";
    }
    //echo $sQuery;
    mysql_query("SET character_set_results=utf8");
    $rResult = mysql_query($sQuery);
    $aData = array();
    $total = mysql_num_rows($rResult);
    if ($total > 0) {
        while ($row = mysql_fetch_array($rResult)) {
            $tmpRow = array();
            /*	foreach ($output1 as $rowMosType) {
            			if ($rowMosType['MosTypeId'] == $row['MosTypeId']) {
            				//$tmpRow[] = '<span class="glyphicon glyphicon-ok-circle" style="color:' . $rowMosType['ColorCode'] . ';font-size:2em;"></span>';
            				$tmpRow[] = '<i class="fa fa-check-circle fa-lg" style="color:' . $rowMosType['ColorCode'] . ';font-size:2.5em;"></i>';
            
            			} else
            				$tmpRow[] = '';
            		}
            		array_unshift($tmpRow, $row['ItemName'], number_format($row['MOS'], 1));
            		$aData[] = $tmpRow;*/
            $col .= '<tr style="page-break-inside:avoid;">
			           <td>' . $row['ItemName'] . '</td>
					   <td>' . $row['ClStock'] . '</td>
					   <td>' . $row['AMC'] . '</td>
//.........这里部分代码省略.........
开发者ID:sankam-nikolya,项目名称:lptt,代码行数:101,代码来源:r_facility_inventory_control_pdf.php

示例15: TCPDF

<?php

$footer = "ważna do <b>" . file_get_contents("config/data.txt") . "</b>";
require_once 'lib/tcpdf.php';
$pdf = new TCPDF("P", "mm", "A4");
$pdf->SetCreator("Legitk(s)i");
$pdf->SetFontSubsetting(false);
$pdf->SetPrintFooter(false);
$pdf->SetPrintHeader(false);
$pdf->SetAutoPageBreak(TRUE, 0);
/* SIZE CONFIG - in mm */
$leftMargin = 5;
$topMargin = 5;
$cellsPerPage = 10;
$cellWidth = 80;
$cellHeight = 50;
//$cellWidth=85; $cellHeight=54; //<-- -1mm for border (A4 is 297mm heigh)
$cellWidth = 78;
$cellHeight = 49;
$handle = fopen("config/ludzie.txt", "r");
if ($handle) {
    $i = -1;
    while (($line = fgets($handle)) !== false) {
        $i = ($i + 1) % $cellsPerPage;
        if ($i == 0) {
            //page change
            $x = $leftMargin;
            $y = $topMargin;
            $pdf->AddPage();
        }
        if ($i % 2 == 0) {
开发者ID:KSIUJ,项目名称:legitksi,代码行数:31,代码来源:legitksi.php


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