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


PHP MYPDF::writeHTMLCell方法代码示例

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


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

示例1: array

	<tr>
		<td style="font-size:8px">FACTURA N&ordm;</td>
		<td align="left" style="font-size:10px">: ' . $nfac . '</td>
	</tr>
	<tr>
		<td style="font-size:8px">AUTORIZACI&Oacute;N N&ordm;</td>
		<td align="left" style="font-size:10px">: ' . $nauto . '</td>
	</tr>
	<tr><td></td></tr>
	<tr>
		<td align = "center" colspan="2">' . $sfc . '</td>
	</tr>
	</table>
';
//imprime el contenido de la variable html
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '140', $y = '17', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
//dibuja un rectangulo
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->RoundedRect(138, 15, 61, 18, 2, '1111', null);
$imgdata = base64_decode($invoice->logo);
$pdf->Image('@' . $imgdata, '19', '10', 80, 24, '', '', 'T', false, 300, '', false, false, 0, false, false, false);
///title
$anchoDivFac = 480;
if ($invoice->type_third == 0) {
    $factura = "FACTURA";
    $tercero = "";
} else {
    $factura = "FACTURA POR TERCEROS";
    $tercero = $matriz->name;
    $anchoDivFac = 520;
}
开发者ID:Vrian7ipx,项目名称:repocas,代码行数:31,代码来源:ver2.blade.php

示例2: array

$pdf->SetFont('times', 'B', 11);
$nit = 7024739019;
$nfac = 01;
$nauto = 1234567890123;
$sfc = 01;
// add a page
$pdf->AddPage();
//cuadro roy
$html = '
<p style="line-height: 175% ">
NIT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: ' . $nit . ' <br>
AUTORIZACIÓN Nº  &nbsp;: ' . $nfac . '  <br>
FACTURA Nº &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	: ' . $nauto . ' <br>
SFC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: ' . $sfc . ' <br>
</p>					';
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '130', $y = '5', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
// Rounded rectangle
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->RoundedRect(126, 5, 75, 28, 2, '1111', null);
///title roy
$pdf->SetFont('times', 'B', 18);
$html2 = '<h1>FACTURA</h1>';
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '145', $y = '50', $html2, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
//nombre de la empresa roy
$pdf->SetFont('times', 'B', 12, false);
$datos = '
<p style="line-height: 150% ">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LA CASCADA S.A.
</p>';
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '35', $datos, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
//original scf-1 roy
开发者ID:Vrian7ipx,项目名称:cascadadev,代码行数:31,代码来源:invoice.blade.php

示例3:

    $pdf->SetTextColor(190);
    $pdf->SetY(5);
    $pdf->Write(10, 'Facture ' . $id_ventes . ' ', '', 0, 'R', true);
    /*écriture "ACQUITTEE"
    if ($donnees['paiement']==1){
    $pdf->SetFont('times', '', 49);
    $pdf->SetY(10);
    $pdf->SetTextColor(250,0,0);
    $pdf->Write(10, 'ACQUITTE','',0, 'R',true);
    }
    */
    $pdf->SetFont('times', '', 9);
    $pdf->SetY(30);
    $pdf->SetTextColor(0);
    // set columns width
    $first_column_width = 100;
    $second_column_width = 60;
    // get current vertical position
    $current_y_position = $pdf->getY();
    //trois colonnes
    $pdf->writeHTMLCell($first_column_width, '', '', $current_y_position, $txt_nous, 1, 0, 0, true);
    $pdf->writeHTMLCell($second_column_width, '', 133, '', $txt_eux, 1, 0, 0, true);
    $pdf->writeHTMLCell($second_column_width, '', 133, 60, $txt_divers, 1, 1, 0, 'C', true);
    $pdf->writeHTML($txt1);
    // ---------------------------------------------------------
    //Close and output PDF document
    //$pdf->Output('C:\wamp\www\valocal\valocal\admin-sec\pdf\factures\facture_'.$id_ventes.'.pdf', 'F'); //F for saving output to file
    $pdf->Output('/home/clients/fdd1a6019f1e8376cbae15369dc54de1/web/applis/admin-sec/pdf/recus/recu_' . $id_ventes . '.pdf', 'F');
    //F for saving output to file
    $pdf->Output('Facture-VALOCAL-' . $id_ventes . '.pdf', 'I');
}
开发者ID:kidsinhalf,项目名称:valocal,代码行数:31,代码来源:facture.php

示例4: actionCreateAccount


//.........这里部分代码省略.........
     $organ = Organ::model()->findByPk($params['OrganID'], array('select' => 'OrganName'))->attributes;
     $html = '<div style="height:24px; line-height:24px; background-color:#1f76c8">
             <div style="margin:0 auto; text-align:center">
             <span style="font-family:微软雅黑; font-size:24px; color:#fff; word-spacing:8px; letter-spacing: 1.5px;">' . $params['uyear'] . '年' . $params['umonth'] . '月对账单</span>
             </div>
         </div>
         <div style="font-size:16px; color:#343434; line-height:16px">
             <p style="margin:0px; ">亲爱的' . $organ['OrganName'] . ',您好!</p>
             <p style="margin:0px; ">感谢您使用由你配平台,以下是您' . $params['umonth'] . '月的平台交易明细:</p>
         </div>
         <div style="height:20px; line-height:18px; border-bottom:2px solid #c9c7c7; border-top:2px solid #c9c7c7; background-color:#f2f2f2; padding:0 30px">
             <div style="font-size:16px; font-weight:bold; color:#565656; line-height:18px;float:left">
                 本月净收益: <span style="color:#1f76c8">' . $gain . '</span> 元
             </div>
             <div style="font-size:16px; line-height:18px;float:right">
                 <p style="margin:0px; line-height:15px">
                 	本月总收入: <span style="color:#1f76c8;font-size:14px">' . $count1 . '</span>元
                    	&nbsp;&nbsp;
                    	本月总支出: <span style="color:#1f76c8;font-size:14px">' . $count2 . '</span>元</p>
                 <p style="margin:0px; line-height:15px">
                 	账单周期:' . $params['uyear'] . '年' . $params['umonth'] . '月01日—' . $params['uyear'] . '年' . $params['umonth'] . '月' . $day . '日
                 </p>
     </div>
     </div>';
     Yii::import('application.extensions.tcpdf.*');
     // create new PDF document
     $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     // 设置文档信息
     $pdf->SetCreator('--');
     $pdf->SetAuthor('北京嘉配科技有限公司');
     $pdf->SetTitle('由你配 - 对账单');
     $pdf->SetSubject('TCPDF Tutorial');
     $pdf->SetKeywords('TCPDF, PDF, PHP');
     // 设置页眉和页脚信恿
     $pdf->SetHeaderData('', 30, '', '', array(0, 64, 255), array(0, 64, 128));
     $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->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);
     // set image scale factor
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     // 设置字体
     $pdf->SetFont('stsongstdlight', '', 14, true);
     // 添加页面
     $pdf->AddPage();
     // Image example with resizing
     $pdf->Image(F::themeUrl() . '/images/jpd/logo_account.jpg', 20, 28, 30, 18, 'JPG', '', '', true, 150, '', false, false, 0, false, false, false);
     // 设置字体阴影
     //$pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));
     // 输出HTML内容
     $pdf->writeHTML($html, true, false, true, false, '');
     if (!empty($data1)) {
         $html = '<p style="color:#1f76c8">订单明细:</p>';
         $pdf->writeHTML($html, true, false, true, false, '');
         // 表格标题
         $header = array('时间', '交易类型', '修理厂名称', '订单编号', '收入(元)');
         // data loading
         $data = array();
         foreach ($data1 as $key => $val) {
             $data[$key][0] = date('Y-m-d', $val['CreateTime']);
             $data[$key][1] = $val['Payment'] == 2 ? '物流代收款' : '支付宝担保';
             if (!$val['BuyerName']) {
                 $val['BuyerName'] = Organ::model()->findByPk($val['BuyerID'], array('select' => 'OrganName'))->attributes['OrganName'];
             }
             $data[$key][2] = $val['BuyerName'];
             $data[$key][3] = $val['No'];
             $data[$key][4] = $val['Price'];
         }
         // 输出表格
         $pdf->ColoredTable($header, $data);
         //换行
         $pdf->Ln();
     }
     if (!empty($data2)) {
         $html = '<p style="color:#1f76c8;">退货明细:</p>';
         $pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);
         // 表格标题
         $header = array('时间', '退款方式', '修理厂名称', '退货单号', '支出(元)');
         // 导入数据
         $data = array();
         foreach ($data2 as $key => $val) {
             $data[$key][0] = date('Y-m-d', $val['CreateTime']);
             $data[$key][1] = $val['Payment'] == 1 ? '物流代收款' : '支付宝担保';
             $data[$key][2] = Organ::model()->findByPk($val['BuyerID'], array('select' => 'OrganName'))->attributes['OrganName'];
             $data[$key][3] = $val['No'];
             $data[$key][4] = $val['Price'];
         }
         // 输出表格
         $pdf->ColoredTable($header, $data);
     }
     $pdf->Output('Account.pdf', 'I');
 }
开发者ID:zwq,项目名称:unpei,代码行数:101,代码来源:SellerorderController.php

示例5: Footer

            $this->Ln();
            $this->Cell(190, 5, '', 'B', 0, 'C');
            $this->Ln();
            $this->Ln();
        }
        // Page footer
        public function Footer()
        {
            if ($this->PageNo() > 1) {
                //Position at 1.5 cm from bottom
                $this->SetY(-15);
                //Arial italic 8
                $this->SetFont('DejaVu Sans ', 'I', 8);
                //Text color in gray
                $this->SetTextColor(128);
                //Page number
                $this->Cell(0, 10, 'Stranica ' . $this->PageNo(), 0, 0, 'C');
            }
        }
    }
    // Prva stranica
    $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    $pdf->AddFont("DejaVuSans", "", "DejaVuSans.php");
    $pdf->AddFont("DejaVuSans", "", "DejaVuSans-Bold.php");
    $pdf->SetFont('DejaVuSans', '', 4);
    $pdf->AddPage();
    $sadrzaj_bafera_za_pdf = str_replace("\t", "        ", $sadrzaj_bafera_za_pdf);
    $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $sadrzaj_bafera_za_pdf, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'center', $autopadding = true);
    ob_end_clean();
    $pdf->Output('Raspored.pdf', 'I');
}
开发者ID:msehalic,项目名称:zamger,代码行数:31,代码来源:pdfraspored.php

示例6:

$nit = $invoice->account_nit;
$nfac = $invoice->invoice_number;
$nauto = $invoice->number_autho;
$sfc = $invoice->sfc;
// add a page
$pdf->AddPage('P', 'LETTER');
$logoEmpresa = base64_decode($invoice->logo);
$pdf->Image('@' . $logoEmpresa, '14', '10', 50, 20, '', '', 'T', false, 300, '', false, false, 0, false, false, false);
///title
$titleFactura = '<table>
<tr>
<td align="rigth"><font color="#333333">NOTA DE ENTREGA</font></td>
</tr>
</table>';
$pdf->SetFont('helvetica', 'B', 27);
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '10', $titleFactura, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
$pdf->SetFont('helvetica', 'B', 11);
//nombre de la empresa
$business = $invoice->account_name;
$unipersonal = $invoice->account_uniper;
$pdf->SetFont('helvetica', 'B', 12, false);
$NombreEmpresa = '
    <p style="line-height: 150%">
        <font color="#333333">
            ' . $business . '
        </font>
    </p>';
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '10', $y = '31', $NombreEmpresa, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'left', $autopadding = true);
$pdf->SetFont('helvetica', 'B', 8, false);
//datos de la empresa
$casa = $matriz->name;
开发者ID:Vrian7ipx,项目名称:repocas,代码行数:31,代码来源:verNota.blade.php

示例7: array

$pdf->setLanguageArray($l);
// ---------------------------------------------------------
$pdf->setFontSubsetting(true);
$pdf->SetFont('arial', '', 10, '', true);
$pdf->setRTL(false);
// add a page
$pdf->AddPage();
// set text shadow effect
$pdf->setTextShadow(array('enabled' => true, 'depth_w' => 0.2, 'depth_h' => 0.2, 'color' => array(196, 196, 196), 'opacity' => 1, 'blend_mode' => 'Normal'));
//$text = "Filter: " . "Date From: " . $param[filter][dateFrom] . "; Date To: " . $param[filter][dateTo] . "; Approver: " . $param[filter][approver] .
//		"; Area: " . $param[filter][area] . "; Block: " . $param[filter][block] . "; Street: " . $param[filter][street] . "; PACI Number: " . $param[filter][paciNumber];
//$df = $param[filter][dateFrom];
$text = <<<EOD
Filter: <br/>
Date From: {$param[filter][dateFrom]}; Date To: {$param[filter][dateTo]} <br/>
Approver: {$param[filter][approver]} <br/>
Area: {$param[filter][area]}; Block: {$param[filter][block]}; Street: {$param[filter][street]}; PACI Number: {$param[filter][paciNumber]}
EOD;
// Print text using writeHTMLCell()
$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $text, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
$pdf->setRTL(true);
$header = array(array(14, 20, 12, 30, 15, 18, 18, 18, 18), array('رقم الملف', 'المنطقة', 'القطعة', 'رقم القسيمة حسب الوثيقة', 'المشرف الكهربائي', 'تاريخ استلام المعاملة', 'تاريخ تحويل المعاملة لقسم التكييف', 'الرقم الموحد للمبنى', 'اسم الموظف مدخل البيانات'));
foreach ($res as $r2) {
    $data[] = array($r2[doc]->docFileNumber, $r2[doc]->docArea, $r2[doc]->docBlock, $r2[doc]->docStreet, $r2[doc]->docBuilding, '', $r2[doc]->docHistory[0]->docDate, $r2[doc]->docPACINumber, $r2[doc]->docHistory[0]->docApprover);
}
//throw new Exception (print_r($data));
$pdf->PrintTable($header, $data);
// ---------------------------------------------------------
//Close and output PDF document
$file_name = "temp/" . uniqid() . ".pdf";
$pdf->Output($file_name, 'F');
开发者ID:rid50,项目名称:thuraya,代码行数:31,代码来源:byApprover.php

示例8: UcretDuzenle

}
$html .= '<tr>';
$html .= '<td align="center"><strong>' . $say . '</strong></td>';
$html .= '<td colspan="6" align="center"><strong>TOPLAM</strong></td>';
$html .= '<td align="center"><strong>' . number_format($TopSinav, 2, ',', '.') . '-TL</strong></td>';
$html .= '<td align="center"><strong>' . number_format($FonBürüt, 2, ',', '.') . '-TL</strong></td>';
// $html .= '<td align="center"><strong>'.number_format($FonNet,2,',','.').'-TL</strong></td>';
$html .= '<td align="center"><strong>' . number_format($TopBelgeMasraf, 2, ',', '.') . '-TL</strong></td>';
$html .= '<td colspan="2"></td>';
$html .= '</tr>';
$html .= '</tbody>
</table>
';
// $pdf->Cell(30, 0, 'Top-Center', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'C');
// writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true)
$pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, 'L', true);
$pdf->SetFont('DejaVuSans', '', 12, '', true);
$temmuzYazi = '1-' . $temSay . ' sıra no arasındaki adayların MYK belge ücretleri kendileri tarafından yatırıldığından, toplam MYK belge ücreti olan <strong>' . number_format($temmuzOncesi, 2, ',', '.') . ' TL</strong> geri ödenmek üzere adayların hesaplarına yatırılacak ve bu adaylar için 50.00 TL ilave ücret iadesi yapılacaktır.';
$pdf->writeHTMLCell(0, 0, '', '', $temmuzYazi, 0, 1, 0, true, 'L', true);
// Close and output PDF document
// This method has several options, check the source code documentation for more information.
$pdf->Output('#4447_Ek_3_Yaranlanıcı Listesi.pdf');
exit;
function UcretDuzenle($ucret)
{
    return str_replace(',', '.', $ucret);
}
function DamgasizHesapla($alinacak)
{
    $dat = $alinacak - $alinacak * 0.00759;
    $dat = floor($dat * 100) / 100;
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:tesvikpdf.php

示例9: round

        $FonBürüt += $alinacak;
        $FonNet += round($alinacak - $alinacak * 0.00759, 2);
        $html .= '<td width="5%" align="center">' . number_format(round($alinacak - $alinacak * 0.00759, 2), 2, ',', '.') . '</td>';
        $html .= '<td width="5%" align="center">' . number_format(50, 2, ',', '.') . '</td>';
        // $html .= '<td width="12%">'.$row['IBAN'].'</td>';
        $html .= '<td width="13%" align="center">TR888888888889999999999999999999</td>';
        // $html .= '<td width="7%">'.$row['TELEFON'].'</td>';
        $html .= '<td width="6%" align="center">+905438888888</td>';
        $html .= '</tr>';
        $belgeUcret += 50;
    }
}
$html .= '<tr>';
$html .= '<td align="center"><strong>' . $say . '</strong></td>';
$html .= '<td colspan="6" align="center"><strong>TOPLAM</strong></td>';
$html .= '<td align="center"><strong>' . number_format($TopSinav, 2, ',', '.') . '-TL</strong></td>';
$html .= '<td align="center"><strong>' . number_format($FonBürüt, 2, ',', '.') . '-TL</strong></td>';
$html .= '<td align="center"><strong>' . number_format($FonNet, 2, ',', '.') . '-TL</strong></td>';
$html .= '<td align="center"><strong>' . number_format($belgeUcret, 2, ',', '.') . '-TL</strong></td>';
$html .= '<td colspan="2"></td>';
$html .= '</tr>';
$html .= '</tbody>
</table>
';
// $pdf->Cell(30, 0, 'Top-Center', 1, $ln=0, 'C', 0, '', 0, false, 'C', 'C');
// writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true)
$pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, 'L', true);
// Close and output PDF document
// This method has several options, check the source code documentation for more information.
$pdf->Output($this->tesvikId . '#Tesvik İstek Raporu.pdf');
exit;
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:CopyOftest.php

示例10:

        </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();
//echo"<pre>";
//print_r($_POST);
//echo"</pre>";
$pdf->Output('Ap' . $CveAps . '.pdf', 'I');
//            <tr><td class="conBorde" border="1" colspan="2" style="text-align:center">' . $concepto . '</td><td class="conBorde" border="1" colspan="3" style="text-align:center">$'.$_SESSION['montoAutorizado'].'</td></tr>
?>

开发者ID:jkarlos1402,项目名称:DGIMy,代码行数:29,代码来源:impresionAp.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:

   $doc->SetHeaderMargin(PDF_MARGIN_HEADER);
   $doc->SetFooterMargin(PDF_MARGIN_FOOTER);
   
   // set auto page breaks
   $doc->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
   
   // set auto page breaks
   $doc->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
   
   // set image scale factor
   $doc->setImageScale(PDF_IMAGE_SCALE_RATIO);
   
   // add a page
   $doc->AddPage();

   // set JPEG quality
   $doc->setJPEGQuality(75);

     $doc->writeHTMLCell($w = 0, $h = 0, $x = '10', $y = '30',$headers, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
     $doc->writeHTMLCell($w = 0, $h = 0, $x = '80', $y = '40',$time, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
     $doc->writeHTMLCell($w = 0, $h = 0, $x = '10', $y = '50',$table , $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);

    //if($fname==''){
    //$doc->Output();
	 $doc->Output($filename, 'I');
    //exit;
    //}else{
    //    $doc->Output($filename,'F');
    //}
}
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:30,代码来源:export.php

示例13: creatNewPdf

    function creatNewPdf()
    {
        $agru = func_get_arg(0);
        $logo = $agru['logo'];
        $link = $agru['link'];
        $target = $agru['target'];
        $logoExtention = $agru['logo_extention'];
        $date = $agru['date'];
        $title = $agru['title'];
        $disc = $agru['description'];
        $image = $agru['image'];
        $content = $agru['content'];
        $copyright = $agru['copyright'];
        $fileName = $agru['file_name'];
        $pdfCreator = $agru['pdf_creator'];
        $pdfAuthor = $agru['pdf_author'];
        $pdfTitle = $agru['pdf_title'];
        $pdfSubject = $agru['pdf_subject'];
        $pdfKeywords = $agru['pdf_keywords'];
        // create new PDF document
        $pdf = new MYPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        $pdf->setTempRTL('R');
        $pdf->image_file = $logo;
        $pdf->href = $target;
        $pdf->link = $link;
        $pdf->copyright = $copyright;
        $this->extention = $logoExtention;
        # must included in each decument[Must Include]
        // appear in document properties
        $pdf->SetCreator($pdfCreator);
        $pdf->SetAuthor($pdfAuthor);
        $pdf->SetTitle($pdfTitle);
        $pdf->SetSubject($pdfSubject);
        $pdf->SetKeywords($pdfKeywords);
        $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, ' ', ' ', array(0, 64, 255), array(0, 64, 128));
        $pdf->setFooterData(array(0, 64, 0), array(0, 64, 128));
        // 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));
        // end of header
        # set default monospaced font[Must Include]
        $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
        # set margins[Must Include]
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
        // header & footer margin
        $pdf->SetHeaderMargin(50);
        $pdf->SetFooterMargin(20);
        $pdf->SetAutoPageBreak(TRUE, 30);
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        $pdf->setFontSubsetting(true);
        //$pdf->SetFont('almohanad', '', 13);
        $pdf->setRTL(true);
        // cehck here if ar or en
        $pdf->startPageGroup();
        $pdf->AddPage();
        $lg = array();
        $lg['a_meta_charset'] = 'UTF-8';
        $lg['a_meta_dir'] = 'rtl';
        $pdf->setLanguageArray($lg);
        $pdf->SetFont('almohanad', '', 13);
        $pdf->setRTL(true);
        // cehck here if ar or en
        $html = '

<div >
<br/>
  <span id="date"style="color:#008080"  > ' . $date . ' </span>        
  <h3 id="title" style="color:#191970"> ' . $title . ' </h3>        
  <h5 id="description" style="color:#6A5ACD"> ' . $disc . ' </h5> 
  <img src="' . $image . '" alt="' . $title . '"  /> 
   <div style="align:justify"> ' . $content . '  </div>   

</div>

               ';
        // $pdf->writeHTML($html, true, false, false, true, "");
        $pdf->writeHTMLCell($w = 170, $h = 0, $x = 0, $y = 0, $html, $border = 0, $ln = 0, $fill = false, $reseth = true, $align = "R");
        $pdf->setRTL(true);
        #excute the file
        $pdf->Output(PDF_FILES . $fileName . '.pdf', 'F');
    }
开发者ID:EYETS,项目名称:eshop,代码行数:81,代码来源:Pdf.php

示例14: actionCetaklaporan

    public function actionCetaklaporan($nopol, $tgl_awal, $tgl_akhir, $jenis)
    {
        $criteria = new CDbCriteria();
        if (!empty($tgl_awal) && empty($tgl_akhir)) {
            $criteria->condition = "TGL_PERBAIKAN>='{$tgl_awal}'";
        } else {
            if (empty($tgl_awal) && !empty($tgl_akhir)) {
                $criteria->condition = "TGL_PERBAIKAN<='{$tgl_akhir}'";
            } else {
                if (!empty($tgl_awal) && !empty($tgl_akhir)) {
                    $criteria->condition = "TGL_PERBAIKAN>='{$tgl_awal}' and TGL_PERBAIKAN<='{$tgl_akhir}'";
                }
            }
        }
        $criteria->with = array('iDKENDARAAN');
        $criteria->compare('iDKENDARAAN.NOPOL', $nopol, true);
        $criteria->compare('JENIS_PERBAIKAN', $jenis);
        $model = Perbaikan::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 Perbaikan");
        $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 PERBAIKAN</h1>
\t\t<table align="left" border="1" cellpadding="2" cellspacing="0">
\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">Nopol Kendaraan</td>
\t\t\t\t\t<td width="65" align="center">Tanggal Perbaikan</td>
\t\t\t\t\t<td width="150" align="center">Kerusakan</td>
\t\t\t\t\t<td width="75" align="center">Estimasi Waktu Perbaikan (hari)</td>
\t\t\t\t\t<td width="75" align="center">Jenis Perbaikan</td>
\t\t\t\t\t<td width="75" align="center">Status</td>
\t\t\t\t\t<td width="75" align="center">PJ Mekanik</td>
\t\t\t\t</tr>
EOD;
        $no_urut = 0;
        foreach ($model as $mod) {
            $no_urut++;
            $nopol = $mod->iDKENDARAAN->NOPOL;
            $jenis_perbaikan = "";
            if ($mod->JENIS_PERBAIKAN == 0) {
                $jenis_perbaikan = "Perbaikan";
            } else {
                if ($mod->JENIS_PERBAIKAN == 1) {
                    $jenis_perbaikan = "Penggantian";
                } else {
                    if ($mod->JENIS_PERBAIKAN == 2) {
                        $jenis_perbaikan = "Perbaikan dan Penggantian";
                    }
                }
            }
            $tgl_perb = "";
            if ($mod->TGL_PERBAIKAN != "0000-00-00") {
                $tgl_perb = date("d-M-y", strtotime($mod->TGL_PERBAIKAN));
            } else {
                $tgl_perb = '-';
            }
            $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">{$nopol}</td>
\t\t\t\t\t<td width="65" align="center">{$tgl_perb}</td>
\t\t\t\t\t<td width="150" align="center">{$mod->KERUSAKAN}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->ESTIMASI_WAKTU_PERBAIKAN}</td>
\t\t\t\t\t<td width="75" align="center">{$jenis_perbaikan}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->STATUS}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->PJ_MEKANIK}</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/perbaikan/rekap perbaikan tanggal ' . date('d-M-y') . '.pdf';
        $pdf->Output($filename, 'F');
        //Yii::app()->end();
        $this->redirect(Yii::app()->request->baseUrl . '/laporan/perbaikan/rekap perbaikan tanggal ' . date('d-M-y') . '.pdf');
    }
开发者ID:aunorafiq,项目名称:jks,代码行数:93,代码来源:PerbaikanController.php

示例15: cetak


//.........这里部分代码省略.........
        // 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>
            ';
        $no = 1;
        foreach ($this->orm->quotationsalesdetail->where('idquotationsales', $idquotationsales) as $row) {
            $html .= "<tr><td>" . $no . "</td><td>" . $row->refbarang['namabarang'] . "</td><td style=\"text-align: right;\">" . $row['jumlahbarang'] . "</td><td style=\"text-align: right;\">" . number_format($row['hargasatuan'], 0, ',', '.') . "</td><td>" . $row['keterangan'] . "</td></tr>";
            $no++;
        }
        $html .= '</table>
</body>';
        //print_r($html); exit;
        // Print text using writeHTMLCell()
        $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
        //$pdf->writeHTML($html, true, 0, true, true);
        // ---------------------------------------------------------
        // Close and output PDF document
        // This method has several options, check the source code documentation for more information.
        $pdf->Output("Quotation - " . $data['nomor'], 'I');
        //============================================================+
        // END OF FILE
        //============================================================+
    }
开发者ID:rifaiaja,项目名称:orpsystem,代码行数:101,代码来源:po_pemesanan.php


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