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


PHP MYPDF::setCellHeightRatio方法代码示例

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


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

示例1: getModel

 function dispNstore_digitalCertificate()
 {
     $oNstore_digitalModel = getModel('nstore_digital');
     $logged_info = Context::get('logged_info');
     $cart_srl = Context::get('cart_srl');
     if (!Context::get('is_logged')) {
         return new Object(-1, 'msg_login_required');
     }
     $config = $oNstore_digitalModel->getModuleConfig();
     $item_info = $oNstore_digitalModel->getPurchasedItem($logged_info->member_srl, $cart_srl);
     Context::set('item_info', $item_info);
     if (!in_array($item_info->order_status, array('3'))) {
         return new Object(-1, '구매완료된 상품이 아닙니다.');
     }
     // 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 006');
     $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.' 006', 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));
     // remove default header/footer
     //$pdf->setPrintHeader(false);
     $pdf->setPrintFooter(false);
     // 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('dejavusans', '', 10);
     $pdf->SetFont('cid0kr', '', 16);
     // table line height
     //$pdf->setCellHeightRatio(1.9);
     $pdf->setCellHeightRatio(1.7);
     // add a page
     $pdf->AddPage();
     // output the HTML content
     $this->setTemplatePath($this->module_path . "tpl");
     $oTemplate =& TemplateHandler::getInstance();
     $output = $oTemplate->compile($this->module_path . 'tpl', 'certificate');
     $pdf->writeHTML($output, true, false, true, false, '');
     // reset pointer to the last page
     $pdf->lastPage();
     //Close and output PDF document
     $pdf->Output('certificate.pdf', 'I');
     exit;
 }
开发者ID:bjrambo,项目名称:nurigo,代码行数:64,代码来源:nstore_digital.view.php

示例2:

            </style>
        <table class="head conBorde titulo" border="1" width="100%">
            <tr><td>RELACIÓN DE DOCUMENTACIÓN SOPORTE DE LA AUTORIZACIÓN DE PAGO</td></tr>
        </table>
        <br><br><br>
        <table border="1" cellpadding="10" style="border-collapse:collapse;" width="100%">            
            <tr class="head subtitulo"><td width="20%">No. DE FOLIO</td><td width="45%">TIPO DE DOCUMENTO</td><td width="20%">IMPORTE \$</td><td width="15%">PARTIDA<br>PRESUPUESTAL</td></tr>
            {$tablaComprobantes}
        </table>           
EOD;
    $pdf->SetPrintHeader(false);
    $pdf->SetPrintFooter(false);
    $pdf->Addpage("P");
    //    $pdf->writeHTMLCell($w=0, $h=200, $x='', $y='', $contenido2, $border='L', $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
    $pdf->writeHTML($contenido2, true, false, false, false, '');
    $pdf->setCellHeightRatio(5);
    $contenido3 = <<<EOD
            <style>
    .head{background-color: #aaa7a7; text-align:center;}
    .titulo{font-weight: bold; font-size: 12px;}
    .subtitulo{font-weight: bold;}
    .conBorde{border: black solid 1; border-collapse:collapse; }
            </style>
        <table border="1" cellpadding="10" style="border-collapse:collapse;" width="100%">            
            <tr class="head subtitulo" style="line-height: 100%;"><td width="20%">TITULAR DE LA UNIDAD<BR>EJECUTORA</td><td width="80%">DIRECCIÓN GENERAL DE INVERSIÓN<BR>(RECIBE ORIGINAL Y COPIA)</td></tr>
            <tr class="subtitulo"><td></td><td></td></tr>
        </table>           
EOD;
    $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = 250, $contenido3, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
}
ob_end_clean();
开发者ID:jkarlos1402,项目名称:DGIMy,代码行数:31,代码来源:impresionAp.php

示例3: Footer

		public function Footer() {
			if ($this->page != 1) {
	            // Position at 15 mm from bottom
	            $this->SetY(-15);
	            // Set font
	            $this->SetFont('times', '', 11);
	            // Page number
	          	$this->Cell(0, 0, $this->getAliasNumPage(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
	        }     
        }    
	}
	$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false, 'test');
	$pdf->setStoryTitle($title[0]['title']);
	$pdf->finished($finished[0]['date']);
	$pdf->setstoryWriters($writers);
	$pdf->setHeaderFont(array('times', '', 25));
	$pdf->setFooterData(array(0,64,0), array(0,64,128));
	$pdf->setMargins(10,30,10,30);
	$pdf->AddPage();
	$pdf->AddPage();
	$text = '';
	foreach($words as $word) {
		$text .= ' ' . $word['words'];
	}
	$pdf->Text(9,35,$text,0);
	$pdf->SetFont('courier');
	$pdf->setCellHeightRatio(3);
	// $pdf->MultiCell(0, 0, 0, 0, 'L', false, 1, 10, 30, true, 2, false, true, 0, 'T', true);
	$pdf->Output('GN_' . $title[0]['title'] . '.pdf', 'I');

?>
开发者ID:pesa0015,项目名称:greatnonsens,代码行数:31,代码来源:with_pdf.php


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