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


PHP MYPDF::SetMargins方法代码示例

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


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

示例1: loadPage

 function loadPage()
 {
     // create new PDF document
     $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     $pdf->titulo = $this->getPlan();
     // set document information
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor('Red de Universidades Anahuac');
     $pdf->SetTitle('Plan Estrategico');
     $pdf->SetSubject($this->getPlan());
     $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
     // set default header data
     $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, 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, 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
     //$pdf->setLanguageArray($l);
     // ---------------------------------------------------------
     // set font
     $pdf->SetFont('helvetica', 'N', 11);
     // add a page
     $pdf->AddPage();
     $pdf->SetY(5);
     $html = "\n<!-- EXAMPLE OF CSS STYLE -->\n<style>  \n\ttd{\n\tborder:1px solid #666;\n\t}\n\t\n\ttd.title{\n\tbackground:#E5E5E5;\n\tpadding:10px;\n\t}\n   \n</style> <br />";
     $html .= $this->Model->getLineas();
     // output the HTML content
     $pdf->writeHTML($html, true, false, true, false, '');
     //Close and output PDF document
     $pdf->Output('plan_operativo.pdf', 'I');
 }
开发者ID:maroend,项目名称:protocolos,代码行数:41,代码来源:printplan.class.php

示例2: ProcessRequest

    function ProcessRequest()
    {
        // $pdf = $this->Pdf;
        //============================================================+
        // File name   : example_003.php
        // Begin       : 2008-03-04
        // Last Update : 2013-05-14
        //
        // Description : Example 003 for TCPDF class
        //               Custom Header and Footer
        //
        // Author: Nicola Asuni
        //
        // (c) Copyright:
        //               Nicola Asuni
        //               Tecnick.com LTD
        //               www.tecnick.com
        //               info@tecnick.com
        //============================================================+
        /**
         * Creates an example PDF TEST document using TCPDF
         * @package com.tecnick.tcpdf
         * @abstract TCPDF - Example: Custom Header and Footer
         * @author Nicola Asuni
         * @since 2008-03-04
         */
        // Include the main TCPDF library (search for installation path).
        // require_once('tcpdf_include.php');
        // create new PDF document
        $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        // set document information
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetAuthor('Nicola Asuni');
        $pdf->SetTitle('TCPDF Example 003');
        $pdf->SetSubject('TCPDF Tutorial');
        $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
        // set default header data
        $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, 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, 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);
        }
        // ---------------------------------------------------------
        // set font
        $pdf->SetFont('times', 'BI', 12);
        // add a page
        $pdf->AddPage();
        // set some text to print
        $txt = <<<EOD
TCPDF Example 003

Custom page header and footer are defined by extending the TCPDF class and overriding the Header() and Footer() methods.
EOD;
        // print a block of text using Write()
        $pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
        // ---------------------------------------------------------
        //Close and output PDF document
        $pdf->Output('example_003.pdf', 'I');
        //============================================================+
        // END OF FILE
        //============================================================+
        // $this->Save();
    }
开发者ID:rifkiferdian,项目名称:gtfw_boostab,代码行数:77,代码来源:ViewPdfx3.pdfx.class.php

示例3: pdfGen

function pdfGen($group_name, $mode = NULL, $start_date, $end_date, $stats, $l, $title, $path_www)
{
    global $centreon_path;
    // create new PDF document
    $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    // set document information
    $pdf->SetCreator("PDF Reports Module");
    $pdf->SetAuthor(getGeneralOptInfo("pdfreports_report_author"));
    //$pdf->SetAuthor('Fully Automated Nagios');
    $pdfTitle = $title . " " . $group_name;
    //$pdfTitle = "Rapport de supervision du hostgroup ".$group_name;
    $pdf->SetTitle($pdfTitle);
    //$pdf->SetSubject('TCPDF Tutorial');
    //$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
    // define default header data
    $header = $title . " " . $group_name;
    //$header = "Rapport de supervision du hostgroup ".$group_name;
    //$ip = $_SERVER['HOSTNAME'];
    $startDate = date("d/m/Y", $start_date);
    $time = time();
    $endDate = date("d/m/Y", $time);
    $string = _("From") . " " . strftime("%A", $start_date) . " " . $startDate . " " . _("to") . " " . strftime("%A", $time) . " " . $endDate . "\n";
    // set default header data
    $pdf->SetHeaderData('../../../img/headers/' . getGeneralOptInfo("pdfreports_report_header_logo"), PDF_HEADER_LOGO_WIDTH, $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, 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
    $pdf->setLanguageArray($l);
    // ---------------------------------------------------------
    // set font
    $pdf->SetFont('helvetica', '', 12);
    // add a page
    $pdf->AddPage();
    //Column titles
    $header = array('Status', 'Time', 'Total Time', 'Mean Time', 'Alert');
    // Pie chart Generation
    $piechart_img = pieGen($stats, $mode);
    //Data loading
    $data = $pdf->LoadData($stats);
    // print colored table
    //$pdf->ColoredTable($header, $data,$chart_img);
    if ($mode == "hgs") {
        // Hostgroup
        $pdf->ColoredTable($header, $data, $piechart_img, $path_www);
    } else {
        if ($mode == "sgs") {
            // Servicegroup
            $pdf->ServicesColoredTable($header, $data, $piechart_img, $path_www);
        }
    }
    // ---------------------------------------------------------
    //génération d'un nom de pdf
    $endDay = date("d", $time);
    $endYear = date("Y", $time);
    $endMonth = date("m", $time);
    $pdfDirName = getGeneralOptInfo("pdfreports_path_gen") . $endYear . $endMonth . $endDay . "/";
    $pdfFileName = $pdfDirName . $endYear . "-" . $endMonth . "-" . $endDay . "_" . $group_name . ".pdf";
    if (!is_dir($pdfDirName)) {
        mkdir($pdfDirName);
    }
    //Close and output PDF document
    $pdf->Output($pdfFileName, 'F');
    return $pdfFileName;
}
开发者ID:hagen3000,项目名称:centreon-pdf-reports,代码行数:75,代码来源:PDF-Func.php

示例4: array

    }
}
// create new PDF document
$custom_layout = array(80, $totalProductos * 8.300000000000001 + 162);
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, $custom_layout, true, 'UTF-8', false);
//SET DOCUMENT INFORMATION
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Recaudacion');
$pdf->SetTitle('Programa de Servicio de Salud');
$pdf->SetSubject('Detalle programa paciente');
$pdf->SetKeywords('Paciente, PSS, Programa');
//$pdf->SetHeaderData('../../img/logo.jpg', PDF_HEADER_LOGO_WIDTH,'SERVICIO DE SALUD ARICA ','HOSPITAL REGIONAL DE ARICA Y PARINACOTA');
$pdf->setHeaderFont(array('helvetica', '', 18));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(4, 5, 5, 1);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(0);
$pdf->SetAutoPageBreak(TRUE, 0);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setLanguageArray($l);
$pdf->setFontSubsetting(true);
$pdf->SetFont('helvetica', '', 9, '', true);
$pdf->setPrintFooter(false);
//CREA UNA PAGINA
$pdf->AddPage('L', 'A4');
//CARGA DE CLASES Y METODOS
require_once '../../class/Tipo_Producto.class.php';
$objTipPro = new Tipo_Producto();
require_once '../../class/Nota_Credito.class.php';
$objNot = new Nota_Credito();
开发者ID:brockoly,项目名称:recauda,代码行数:31,代码来源:generarArqueo_PDF.php

示例5: MYPDF

    }
}
// create new PDF document
$pdf = new MYPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('von-Buelow-Gymnasium');
$pdf->SetTitle('Bemerkungen zur Lernentwicklung');
$pdf->SetSubject('');
$pdf->SetKeywords('');
$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 marginsfile:///home/rft/Buelow/webform/auswertung
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, 25);
$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);
}
// set pdf viewer preferences
$pdf->setViewerPreferences(array('Duplex' => 'DuplexFlipLongEdge'));
//Doppelseitiger Druck in einem Befehl
$pdf->SetBooklet(true, 15, 25);
开发者ID:rft2014,项目名称:buelow_web,代码行数:31,代码来源:makeBeurteilung.php

示例6: MYPDF

			<td width="578" align="center">Pág ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages() . '</td>
			</tr>
			</table>';
        $this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
        $this->Image('@' . $logoEmizor, '7', '128', 4, 12, '', 'www.emizor.com', 'T', false, 300, '', false, false, 0, false, false, false);
        $this->Image('@' . $emizorAvion, '145', '265', 5, 8, '', 'www.emizor.com', 'T', false, 300, '', false, false, 0, false, false, false);
    }
}
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('ipxserver');
$pdf->SetTitle('Nota de Entrega');
$pdf->SetSubject('Primera Nota');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set margins
$pdf->SetMargins(15, 20, 15);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// borra la linea de arriba en el area del header
$pdf->setPrintHeader(false);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set some language-dependent strings (optional)
if (@file_exists('/includes/tcpdf/examples/lang/spa.php')) {
    require_once '/includes/tcpdf/examples/lang/spa.php';
    $pdf->setLanguageArray($l);
}
$pdf->SetFont('helvetica', 'B', 11);
$nit = $invoice->account_nit;
$nfac = $invoice->invoice_number;
$nauto = $invoice->number_autho;
开发者ID:Vrian7ipx,项目名称:repocas,代码行数:31,代码来源:verNota.blade.php

示例7: cetak

    public function cetak($idquotationsales = null, $idrefstore = null)
    {
        if ($idquotationsales == null) {
            exit('Data Tidak Tersedia');
        }
        $data = $this->orm->quotationsales->where('idquotationsales', $idquotationsales)->fetch();
        if (count($this->orm->quotationsales->where('idquotationsales', $idquotationsales)) == 0) {
            echo "<h3>Data Tidak Tersedia</h3>";
            exit;
        }
        //check from web
        if ($idrefstore == null) {
            $email = $_SESSION['user']['email'];
            $idrefstore = $_SESSION['user']['idrefstore'];
        } else {
            //from mobile
            $email = $this->input->post('email');
        }
        ini_set('memory_limit', '512M');
        $this->load->library('TCPDF');
        // create new PDF document
        $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'A4', true, 'UTF-8', false);
        // set document information
        $pdf->SetCreator(WEB_TITLE);
        $pdf->SetAuthor($email);
        $pdf->SetTitle("Quotation - " . $data['nomor']);
        $pdf->SetSubject($data['nomor']);
        $pdf->nomor = $data['nomor'];
        $pdf->tanggal = $data['tanggal'];
        $pdf->namaPelanggan = $data->pelanggan['namapelanggan'];
        $pdf->dibuat_oleh = $data['dibuat_oleh'];
        $pdf->oleh = $email;
        $pdf->store = $this->orm->refstore->where('idrefstore', $idrefstore)->fetch();
        // set default monospaced font
        $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
        //set margins
        $pdf->SetMargins(5, 63, 5);
        $pdf->SetHeaderMargin(14);
        $pdf->SetFooterMargin(80);
        //set auto page breaks
        $pdf->SetAutoPageBreak(TRUE, 80);
        //set auto page breaks
        $pdf->SetAutoPageBreak(TRUE, 80);
        //set image scale factor
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        // ---------------------------------------------------------
        // set default font subsetting mode
        $pdf->setFontSubsetting(true);
        // Set font
        // dejavusans is a UTF-8 Unicode font, if you only need to
        // print standard ASCII chars, you can use core fonts like
        // helvetica or times to reduce file size.
        // use the font
        $pdf->SetFont('times', '', 10, '', false);
        // Add a page
        // This method has several options, check the source code documentation for more information.
        $resolution = array(310, 210);
        $pdf->AddPage('L', $resolution);
        // Set some content to print
        $html = '
            
            <style>
            body {
            letter-spacing:5px;
            }      
            </style> 
            	<style type="text/css">
            .rotate-text
             {

            /* Safari */
            -webkit-transform: rotate(-90deg);

            /* Firefox */
            -moz-transform: rotate(-90deg);

            /* IE */
            -ms-transform: rotate(-90deg);

            /* Opera */
            -o-transform: rotate(-90deg);

            /* Internet Explorer */
            filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);

            }
            .border-table{
            	border:0.5px solid #000;
            		
            }

            table {
            padding-top:2px;
            }

            </style>
            	
            <body>
              <table border="1">
             <tr><th style="text-align: center;" width="60"> No </th><th width="180" style="text-align: center;"> Nama Barang </th><th style="text-align: center;" width="100"> Jumlah Barang </th><th style="text-align: center;" width="300"> Harga Satuan </th><td style="text-align: center; "width="300"> Keterangan </td></tr>
//.........这里部分代码省略.........
开发者ID:rifaiaja,项目名称:orpsystem,代码行数:101,代码来源:po_pemesanan.php

示例8: Footer

        $this->setPageMark();
    }
    public function Footer()
    {
        //$image_file = "img/pie.jpg";
        //$this->Image($image_file, 7, 250, 198, 23, 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);
    }
}
// create new PDF document
$pdf = new MYPDF();
//set document information
$pdf->SetAuthor('DIRECCION DE PENSIONES');
$pdf->SetTitle('DEL MUNICIPIO DE OAXACA DE JUÁREZ OAX');
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(0, PDF_MARGIN_TOP, 0);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$resolution = array(216, 355);
$consultaTram = "SELECT idContrato, fecha, titular, nombre, importePrestamo, MontoRedocumentacion,sindicato,idSindicato FROM repAltasRedocumenta ORDER BY idSindicato ASC";
$consulta = mysql_query($consultaTram);
$pdf->AddPage('L', $resolution);
$pdf->SetFont('helvetica', '', 10);
$pdf->MultiCell(334, 20, 'RESUMEN DE ALTAS Y REDOCUMENTACION DE PRESTAMOS', 0, 'C', false, 1, 12, 20, true, 0, true, true, 0, 'M', false);
$pdf->MultiCell(334, 20, 'CONSULTA DEL ' . $fechadeInicio . ' AL ' . $fechadeFin, 0, 'C', false, 1, 12, 25, true, 0, true, true, 0, 'M', false);
//$pdf->MultiCell(200, 5, 'FECHA INICIAL: '.$fechadeInicio, 0, 'C', false, 0, 0, 25, true, 0, true, true, 0, 'M', false);
//$pdf->MultiCell(200, 5, 'FECHA FINAL: '.$fechadeFin, 0, 'C', false, 0, 155, 25, true, 0, true, true, 0, 'M', false);
//$pdf->setPageOrientation('L');
$Cont = 1;
开发者ID:algerion,项目名称:prestamos,代码行数:31,代码来源:ResumenAltasRedocumentacion.php

示例9: MYPDF

        //         $this->Cell(0, 10, 'Sayfa '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
// create new PDF document
$pdf = new MYPDF('L', PDF_UNIT, 'A3', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('MYK');
$pdf->SetTitle('Denetim Rapor');
$pdf->SetSubject('Denetim Rapor');
// $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
// $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetMargins(1, PDF_MARGIN_TOP, 1);
$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 default font subsetting mode
$pdf->setFontSubsetting(true);
// Set font
// dejavusans is a UTF-8 Unicode font, if you only need to
// print standard ASCII chars, you can use core fonts like
// helvetica or times to reduce file size.
$pdf->SetFont('DejaVuSans', '', 7, '', true);
// $pdf->setLanguageArray($l);
// Add a page
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:tesvikpdf.php

示例10: MYPDF

        $this->setPageMark();
    }
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
//SET DOCUMENT INFORMATION
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Recaudacion');
$pdf->SetTitle('Programa de Servicio de Salud');
$pdf->SetSubject('Detalle programa paciente');
$pdf->SetKeywords('Paciente, PSS, Programa');
//$pdf->SetHeaderData('../../img/logo.jpg', PDF_HEADER_LOGO_WIDTH,'SERVICIO DE SALUD ARICA ','HOSPITAL REGIONAL DE ARICA Y PARINACOTA');
$pdf->setHeaderFont(array('helvetica', '', 6));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetMargins(3, 5, 3);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetAutoPageBreak(TRUE, 15);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setLanguageArray($l);
$pdf->setFontSubsetting(true);
$pdf->SetFont('helvetica', '', 8, '', true);
//CREA UNA PAGINA
$pdf->AddPage('L', 'A4');
//RECEPCION VARIABLE
if ($_REQUEST['id_paciente']) {
    $id_paciente = $_REQUEST['id_paciente'];
}
if ($_REQUEST['cta_cte']) {
    $cta_cte = $_REQUEST['cta_cte'];
开发者ID:brockoly,项目名称:recauda,代码行数:31,代码来源:generarArqueo_PDF.php

示例11: actionCetaklaporan

    public function actionCetaklaporan($tgl_awal, $tgl_akhir, $toko, $status)
    {
        $criteria = new CDbCriteria();
        if (!empty($tgl_awal) && empty($tgl_akhir)) {
            $criteria->condition = "TGL_PENGADAAN>='{$tgl_awal}'";
        } else {
            if (empty($tgl_awal) && !empty($tgl_akhir)) {
                $criteria->condition = "TGL_PENGADAAN<='{$tgl_akhir}'";
            } else {
                if (!empty($tgl_awal) && !empty($tgl_akhir)) {
                    $criteria->condition = "TGL_PENGADAAN>='{$tgl_awal}' and TGL_PENGADAAN<='{$tgl_akhir}'";
                }
            }
        }
        $criteria->compare('NAMA_TOKO', $toko, true);
        $criteria->compare('STATUS', $status);
        $model = Pengadaan::model()->findAll($criteria);
        $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        spl_autoload_register(array('YiiBase', 'autoload'));
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetTitle("Laporan Rekap Pengadaan");
        $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
        $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
        $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->SetFont('helvetica', '', 8);
        $pdf->SetTextColor(80, 80, 80);
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        $pdf->AddPage();
        $pdf->setJPEGQuality(75);
        $html = <<<EOD
\t\t<h1 align="center">LAPORAN PENGADAAN</h1>
\t\t<table align="left" border="1" cellpadding="2" cellspacing="0" vertical-align="middle">
\t\t\t<tbody>
\t\t\t\t<tr>
\t\t\t\t\t<td width="40" align="center">NO</td>
\t\t\t\t\t<td width="75" align="center">Nomor PO</td>
\t\t\t\t\t<td width="65" align="center">Tanggal Pengadaan</td>
\t\t\t\t\t<td width="175" align="center">Permintaan</td>
\t\t\t\t\t<td width="75" align="center">Nama Toko</td>
\t\t\t\t\t<td width="75" align="center">Harga Total</td>
\t\t\t\t\t<td width="125" align="center">Status</td>
\t\t\t\t</tr>
EOD;
        $no_urut = 0;
        foreach ($model as $mod) {
            $no_urut++;
            $tgl_peng = "";
            if ($mod->TGL_PENGADAAN != "0000-00-00") {
                $tgl_peng = date("d-M-y", strtotime($mod->TGL_PENGADAAN));
            } else {
                $tgl_peng = '-';
            }
            $html .= <<<EOD
\t\t\t\t<tr>
\t\t\t\t\t<td width="40" align="center">{$no_urut}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->NO_PO}</td>
\t\t\t\t\t<td width="65" align="center">{$tgl_peng}</td>
\t\t\t\t\t<td width="175" align="center">{$mod->PERMINTAAN}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->NAMA_TOKO}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->HARGA_TOTAL}</td>
\t\t\t\t\t<td width="125" align="center">{$mod->STATUS}</td>
\t\t\t\t</tr>
EOD;
        }
        $html .= <<<EOD
\t\t\t</tbody>
\t\t</table>
EOD;
        $pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);
        $filename = Yii::getPathOfAlias('webroot') . '/laporan/pengadaan/rekap pengadaan tanggal ' . date('d-M-y') . '.pdf';
        $pdf->Output($filename, 'F');
        //Yii::app()->end();
        $this->redirect(Yii::app()->request->baseUrl . '/laporan/pengadaan/rekap pengadaan tanggal ' . date('d-M-y') . '.pdf');
    }
开发者ID:aunorafiq,项目名称:jks,代码行数:77,代码来源:PengadaanController.php

示例12: array

    </td>
</tr>
<tr><td colspan="2">Leyenda</td></tr>
</table>
EOD;
$style = array('position' => '', 'align' => 'C', 'stretch' => false, 'fitwidth' => true, 'cellfitalign' => '', 'border' => false, 'hpadding' => 'auto', 'vpadding' => 'auto', 'fgcolor' => array(0, 0, 0), 'bgcolor' => false, 'text' => true, 'font' => 'helvetica', 'fontsize' => 6, 'stretchtext' => 4);
$pdf = new MYPDF('L', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
//-----------------------------
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(10, 19, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetAutoPageBreak(true, 0);
// set auto page breaks
//    $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set font
$pdf->SetFont('helvetica', '', 6.5);
$pdf->Addpage();
$pdf->writeHTML($contenido, true, false, false, false, '');
if ($marcaAgua === '1') {
    // get the current page break margin
    $bMargin = $pdf->getBreakMargin();
    // get current auto-page-break mode
    $auto_page_break = $pdf->getAutoPageBreak();
开发者ID:jkarlos1402,项目名称:DGIMy,代码行数:31,代码来源:impresionAp.php

示例13: MYPDF

        $this->Cell(0, 10, 'Sayfa ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
// create new PDF document
$pdf = new MYPDF('L', PDF_UNIT, 'A4', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('MYK');
$pdf->SetTitle('Tesvik Istek');
$pdf->SetSubject('Tesvik Istek');
// $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
// $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetMargins(8, 15, 8);
$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 default font subsetting mode
$pdf->setFontSubsetting(true);
// Set font
// dejavusans is a UTF-8 Unicode font, if you only need to
// print standard ASCII chars, you can use core fonts like
// helvetica or times to reduce file size.
$pdf->SetFont('DejaVuSans', '', 8, '', true);
// $pdf->setLanguageArray($l);
// Add a page
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:tesvikpdf.php

示例14:

 $pdf->SetTitle($invoicedetails[0]->title);
 $pdf->SetSubject('Order Invoice');
 $pdf->SetKeywords('TCPDF, PDF, example, test, guide');
 // remove default header/footer
 /*$pdf->setPrintHeader(false);
 		$pdf->setPrintFooter(false);*/
 // 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 margins
 $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
 $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
 // set default monospaced font
 $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
 //set margins
 $pdf->SetMargins(0, 28.5, 0);
 //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
 $pdf->setLanguageArray($l);
 //--------------------------------------------------------
 // set font
 $pdf->SetFont('helvetica', '', 12);
 // add a page
 $pdf->AddPage();
 // output the HTML content
 $pdf->writeHTML($html, true, false, true, false, '');
 //--------------//--------------------------------------------------------
 $pdf->lastPage();
开发者ID:rinkuvantage,项目名称:puyangantemples,代码行数:31,代码来源:payumoneysuccess.php

示例15: MYPDF

        // Page number
        // Title
        $this->Cell(30, 0, 'Expense Report - HSU -VKU ', 0, 0, 'L', 0, '');
        $this->SetFont('helvetica', 'I', 8);
        // Page number
        $this->Cell(0, 0, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'R', 0, '', 0, false, 'T', 'M');
    }
}
// create new PDF document
//$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'Letter', true, 'UTF-8', false);
$pdf = new MYPDF('L', PDF_UNIT, 'Letter', true, 'UTF-8', false);
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
//$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetMargins(10, 10, 10, false);
//$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
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
// define some HTML content with style
$html = <<<EOF
开发者ID:rme,项目名称:er2,代码行数:31,代码来源:GenerateExpenseReport3.php


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