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


PHP PDF::AliasNbPages方法代码示例

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


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

示例1: index

 public function index()
 {
     $pdf = new PDF();
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Times', '', 12);
     for ($i = 1; $i <= 40; $i++) {
         $pdf->Cell(0, 10, 'Printing line number ' . $i, 0, 1);
     }
     $pdf->Output();
 }
开发者ID:iamonuwa,项目名称:ivote,代码行数:11,代码来源:Test.php

示例2: index

 function index()
 {
     // Instanciation of inherited class
     $pdf = new PDF();
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Times', '', 12);
     for ($i = 1; $i <= 40; $i++) {
         $pdf->Cell(0, 10, 'Printing line number ' . $i, 0, 1);
     }
     $pdf->Output();
 }
开发者ID:akbarhakim29,项目名称:restclient,代码行数:12,代码来源:pdf.php

示例3: listadoAction

 public function listadoAction($aditionalFilter = '')
 {
     $pdf = new PDF("P", 'mm', "A4");
     $pdf->SetTopMargin(15);
     $pdf->SetLeftMargin(10);
     $pdf->AliasNbPages();
     $pdf->SetFillColor(210);
     $per = new Permisos();
     $em = new EntityManager($per->getConectionName());
     $query = "select t1.IdPerfil,t1.Permisos,t4.Perfil,t2.Titulo as Opcion,t3.Titulo as SubOpcion\n                from AgtPermisos as t1,menu as t2, submenu as t3, perfiles as t4\n                where t1.IDOpcion=t2.IDOpcion\n                and t1.IDOpcion=t3.IDOpcion\n                and t3.Id=t1.IDSubOpcion\n                and t1.IdPerfil=t4.Id\n                order by t1.IdPerfil,t1.IDOpcion,t1.IDSubOpcion;";
     $em->query($query);
     $rows = $em->fetchResult();
     $em->desConecta();
     unset($per);
     $perant = "";
     $opcant = "";
     foreach ($rows as $row) {
         if ($perant != $row['IDPerfil']) {
             $pdf->AddPage();
             $pdf->Cell(40, 5, $row['Perfil'], 0, 0, "L", 1);
         } else {
             $pdf->Cell(40, 5, "", 0, 0, "L", 0);
         }
         $pdf->SetFillColor(240);
         if ($opcant != $row['Opcion']) {
             $pdf->Cell(30, 5, $row['Opcion'], 0, 0, "L", 1);
         } else {
             $pdf->Cell(30, 5, "", 0, 0, "L", 0);
         }
         $perant = $row['IDPerfil'];
         $opcant = $row['Opcion'];
         $pdf->Cell(40, 5, $row['SubOpcion'], 0, 0, "L", 0);
         $permisos = array('C' => substr($row['Permisos'], 0, 1), 'I' => substr($row['Permisos'], 1, 1), 'B' => substr($row['Permisos'], 2, 1), 'A' => substr($row['Permisos'], 3, 1), 'L' => substr($row['Permisos'], 4, 1), 'E' => substr($row['Permisos'], 5, 1));
         $pdf->Cell(13, 5, $permisos['C'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['I'], 0, 0, "C", 1);
         $pdf->Cell(13, 5, $permisos['B'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['A'], 0, 0, "C", 1);
         $pdf->Cell(13, 5, $permisos['L'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['E'], 0, 1, "C", 1);
         $pdf->SetFillColor(210);
     }
     $archivo = "docs/docs" . $_SESSION['emp'] . "/pdfs/" . md5(date('d-m-Y H:i:s')) . ".pdf";
     $pdf->Output($archivo, 'F');
     $this->values['archivo'] = $archivo;
     return array('template' => '_global/listadoPdf.html.twig', 'values' => $this->values);
 }
开发者ID:albatronic,项目名称:agentescloud,代码行数:46,代码来源:PerfilesController.class.php

示例4: PDF

				case "10": $mes2 = Outubro; break;
				case "11": $mes2 = Novembro; break;
				case "12": $mes2 = Dezembro; break;
			};
	//SQL que retorna o ID do paciente
	$sqlpac = "SELECT nomepaciente FROM procodont WHERE convenio = '$convenio' AND data LIKE '$anoatual-$mesatual-%' GROUP BY nomepaciente;";
	$resultadopac = mysql_query($sqlpac);
	
	//Pega as informa��es na tabela convenios com o convenio informado
	$sqlconv = "SELECT nome FROM convenios WHERE id = '$convenio';";
	$resultadoconv = mysql_query($sqlconv);
	$resultconv = mysql_fetch_array($resultadoconv);
	
	//Instanciação da classe herdada
	$pdf=new PDF("P","mm","A4"); //P->Retrato, L->Paisagem; mm-> milímetros; A4-> padrão da folha
	$pdf->AliasNbPages(); //Recebe o total de páginas
	$pdf->AddPage(); //Coloca uma página em branco
	$pdf->SetFont('Arial','B',16);
	$pdf->Cell(65);
	$pdf->Cell(70,10,utf8_decode('Relatório por Convênio'),0,0,'C');
	$pdf->SetFont('Arial','U',12);
	$pdf->Ln(7);
	$pdf->Cell(50,10,'                                                                                                                                                                  ',0,0);
	$pdf->Ln(7);
	$pdf->SetFont('Arial','U',12);
	$pdf->Cell(15);
	$pdf->Cell(50,10,utf8_decode('Convênio: ').$resultconv[0],0,0);
	$pdf->Ln(7);
	$pdf->Cell(15);
	$pdf->Cell(30,10,utf8_decode('Mês: ').utf8_decode($mes2),0,0);
	$pdf->Cell(10);
开发者ID:aguedesjr,项目名称:nutrosiscare,代码行数:31,代码来源:gerarelatconv.php

示例5: Imprimir_Checks

function Imprimir_Checks($codper, $codsol, $link, $swInit, $pdf)
{
    /*	echo "SELECT a.codchkser,
    			CONCAT(c.apepatper,' ',c.apematper,', ',c.nomper) AS nombre,
    			d.despue AS puesto,
    			a.imgreniec,
    			a.obsimgreniec,
    			a.indrefpol, a.refpolchk,
    			a.indantpol,
    			a.indreqjud,
    			a.indrefter,
    			a.indrefdro,
    			a.indimpsalpai,
    			a.indinvpen,a.invpenchk,
    			e.desdel,
    			a.recchk
    			FROM tb_chkservice AS a
    			LEFT JOIN tb_detallesolicitud AS b ON b.codper=a.codper AND b.codsol=a.codsol
    			LEFT JOIN tb_persona AS c ON c.codper=a.codper
    			LEFT JOIN tb_puesto AS d ON d.codpue=b.codpue
    			LEFT JOIN tb_delito AS e ON e.coddel=a.coddel
    			WHERE a.codper in ($codper) AND a.codsol=$codsol";*/
    /*Check Service*/
    $result = mysql_query("SELECT a.codchkser,\r\n\t\t\tCONCAT(c.apepatper,' ',c.apematper,', ',c.nomper) AS nombre,\r\n\t\t\td.despue AS puesto,\r\n\t\t\ta.imgreniec,\r\n\t\t\ta.obsimgreniec,\r\n\t\t\ta.indrefpol, a.refpolchk,\r\n\t\t\ta.indantpol,\r\n\t\t\ta.indreqjud,\r\n\t\t\ta.indrefter,\r\n\t\t\ta.indrefdro,\r\n\t\t\ta.indimpsalpai,\r\n\t\t\ta.indinvpen,a.invpenchk,\r\n\t\t\ta.recchk\r\n\t\t\tFROM tb_chkservice AS a\r\n\t\t\tLEFT JOIN tb_detallesolicitud AS b ON b.codper=a.codper AND b.codsol=a.codsol\r\n\t\t\tLEFT JOIN tb_persona AS c ON c.codper=a.codper\r\n\t\t\tLEFT JOIN tb_puesto AS d ON d.codpue=b.codpue\r\n\t\t\tWHERE a.codper in ({$codper}) AND a.codsol={$codsol}", $link);
    if (!isset($pdf)) {
        $pdf = new PDF();
        $pdf->AliasNbPages();
    }
    while ($row = mysql_fetch_array($result)) {
        $nombre = utf8_decode($row['nombre']);
        $puesto = utf8_decode($row['puesto']);
        $imgreniec = utf8_decode($row['imgreniec']);
        $obs = utf8_decode($row['obsimgreniec']);
        $indrefpol = utf8_decode($row['indrefpol']);
        $refpolchk = utf8_decode($row['refpolchk']);
        $indantpol = utf8_decode($row['indantpol']);
        $indreqjud = utf8_decode($row['indreqjud']);
        $indrefter = utf8_decode($row['indrefter']);
        $indrefdro = utf8_decode($row['indrefdro']);
        $indimpsalpai = utf8_decode($row['indimpsalpai']);
        $indinvpen = utf8_decode($row['indinvpen']);
        $invpenchk = utf8_decode($row['invpenchk']);
        $delitos = mysql_query("SELECT cd.coddel,d.nomdel,d.desdel FROM tb_delito_chkservice cd\r\n                                                    LEFT JOIN tb_delito d ON cd.coddel=d.coddel\r\n                                                    where cd.codsol=" . $codsol . " and cd.codper=" . $codper);
        $desdel = "";
        while ($fildel = mysql_fetch_array($delitos)) {
            $desdel = $desdel . utf8_decode($fildel['nomdel']) . " : " . utf8_decode($fildel['desdel']) . "\n\n";
        }
        //			$desdel= utf8_decode($row['desdel']);
        $recchk = utf8_decode($row['recchk']);
        $sw1 = 0;
        if ($indrefpol == 0) {
            $TXTindrefpol = 'No Registra';
        } else {
            $TXTindrefpol = 'Si Registra';
            $sw1 = 1;
        }
        if ($indantpol == 0) {
            $TXTindantpol = 'No Registra';
        } else {
            $TXTindantpol = 'Si Registra';
            $sw1 = 1;
        }
        if ($indreqjud == 0) {
            $TXTindreqjud = 'No Registra';
        } else {
            $TXTindreqjud = 'Si Registra';
            $sw1 = 1;
        }
        if ($indrefter == 0) {
            $TXTindrefter = 'No Registra';
        } else {
            $TXTindrefter = 'Si Registra';
            $sw1 = 1;
        }
        if ($indrefdro == 0) {
            $TXTindrefdro = 'No Registra';
        } else {
            $TXTindrefdrol = 'Si Registra';
            $sw1 = 1;
        }
        if ($indimpsalpai == 0) {
            $TXTindimpsalpai = 'No Registra';
        } else {
            $TXTindimpsalpai = 'Si Registra';
            $sw1 = 1;
        }
        $sw2 = 0;
        if ($indinvpen == 0) {
            $TXTindinvpen = 'No Registra';
        } else {
            $TXTindinvpen = 'Si Registra';
            $sw2 = 1;
        }
        //Creación del objeto de la clase heredada
        //	$pdf=new PDF();
        //	$pdf->AliasNbPages();
        $pdf->AddPage();
        $pdf->SetDisplayMode('fullpage');
        $pdf->SetMargins(20, 20, 20);
        $pdf->SetFont('Arial', 'BU', 14);
//.........这里部分代码省略.........
开发者ID:ehuertasf,项目名称:pro_new,代码行数:101,代码来源:rptChecks2.php

示例6: Footer

         $this->Cell($wlain / 100 * $width, $height, $_SESSION['lang']['selisih'], 1, 0, 'C', 1);
         $this->Cell($wlain / 100 * $width, $height, $_SESSION['lang']['realisasi'], 1, 0, 'C', 1);
         $this->Cell($wlain / 100 * $width, $height, $_SESSION['lang']['anggaran'], 1, 0, 'C', 1);
         $this->Cell($wlain / 100 * $width, $height, $_SESSION['lang']['selisih'], 1, 0, 'C', 1);
         $this->Ln();
     }
     function Footer()
     {
         $this->SetY(-15);
         $this->SetFont('Arial', 'I', 8);
         $this->Cell(10, 10, 'Page ' . $this->PageNo() . " / {totalPages}", 0, 0, 'L');
     }
 }
 //================================
 $pdf = new PDF('L', 'pt', 'A4');
 $pdf->AliasNbPages('{totalPages}');
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $height = 15;
 $pdf->AddPage();
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetFont('Arial', '', 9);
 $no = 1;
 // pdf array content =========================================================================
 //    $pdf->Cell($wkiri/100*$width,$height,$_SESSION['lang']['tbsdiolah'],1,0,'L',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($bireal_tbsdiolah,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($bibudget_tbsdiolah,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($biselisih_tbsdiolah,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($sdbireal_tbsdiolah,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($sdbibudget_tbsdiolah,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($sdbiselisih_tbsdiolah,0),1,0,'R',1);
 //    $pdf->Ln();
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:lbm_slave_pks_byperawatan.php

示例7: concat

    function process_inclusive_dates() {
        if (func_num_args()>0) {
            $arg_list = func_get_args();
            $menu_id = $arg_list[0];
            $post_vars = $arg_list[1];
            $get_vars = $arg_list[2];
            $validuser = $arg_list[3];
            $isadmin = $arg_list[4];
            print_r($arg_list);
        }
        // loop through m_consult_disease_notifiable
        $sql = "select p.patient_id, c.consult_id, concat(p.patient_lastname, ', ', p.patient_firstname) patient_name, c.onset_date, ".
               "round((to_days(now())-to_days(p.patient_dob))/365 , 1) patient_age, p.patient_gender, c.disease_id  ".
               "from m_consult_disease_notifiable c, m_patient p ".
               "where c.patient_id = p.patient_id";
        if ($result = mysql_query($sql)) {
            if (mysql_num_rows($result)) {
                while ($report = mysql_fetch_array($result)) {
                    // blank variables
                    $family_id = 0;
                    $patient_address = '';
                    $barangay_name = '';
                    $disease_name = '';
                    $icd_code = '';
                    // retrieve other data
                    $family_id = family::get_family_id($report["patient_id"]);
                    if ($family_id) {
                        $patient_address = family::show_address($family_id);
                        $barangay_name = family::barangay_name($family_id);
                    }
                    $disease_name = notifiable::get_notifiable_disease_name($report["disease_id"]);
                    $icd_code = notifiable_report::get_disease_icdcode($report["disease_id"]);

                    // insert data into tcl
                    $sql_insert = "insert into m_patient_notifiable_tcl (consult_id, patient_id, ".
                                  "patient_name, onset_date, patient_age, patient_gender, patient_address, ".
                                  "barangay_name, diagnosis, icd10) ".
                                  "values ('".$report["consult_id"]."', '".$report["patient_id"]."', ".
                                  "'".$report["patient_name"]."', '".$report["onset_date"]."', '".$report["patient_age"]."', ".
                                  "'".$report["patient_gender"]."', '$patient_address', '$barangay_name', ".
                                  "'$disease_name', '$icd_code')";
                    $result_insert = mysql_query($sql_insert);
                } // while
                print $sql = "select patient_name, onset_date, patient_age, patient_gender, ".
                       "patient_address, barangay_name, diagnosis, icd10 ".
                       "from m_patient_notifiable_tcl order by diagnosis";
                $pdf = new PDF('P','pt','A4');
                $pdf->SetFont('Arial','',10);
                $pdf->AliasNbPages();
                $pdf->connect('localhost','root','kambing','game');
                $attr=array('titleFontSize'=>14,'titleText'=>'NOTIFIABLE DISEASE REGISTER');
                $pdf->mysql_report($sql,false,$attr, "../modules/_uploads/ntp_tcl.pdf");
                header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&report_menu=TCL");
            }
        }
    }
开发者ID:BackupTheBerlios,项目名称:chits-svn,代码行数:56,代码来源:class.notifiable_report.php

示例8: PDF

 function display_pdf()
 {
     $array = $this->load();
     if (empty($array)) {
         return;
     }
     $pdf = new PDF($this->db);
     $pdf->Setdossierinfo(dossier::name());
     $pdf->setTitle("Balance analytique", true);
     $pdf->SetAuthor('NOALYSS');
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pa = new Anc_Plan($this->db, $this->pa_id);
     $pa->get();
     $pb = new Anc_Plan($this->db, $this->pa_id2);
     $pb->get();
     $pdf->SetFont('DejaVu', 'B', 9);
     $pdf->Cell(0, 7, sprintf("Balance croise plan %s %s ", $pa->name, $pb->name), 1, 0, 'C');
     $filtre_date = "";
     $filtre_pa = "";
     $filtre_pb = "";
     if ($this->from != "" || $this->to != "") {
         $filtre_date = sprintf("Filtre date  %s %s", $this->from, $this->to);
     }
     if ($this->from_poste != "" || $this->to_poste != "") {
         $filtre_pa = sprintf("Filtre poste plan1  %s %s", $this->from_poste != "" ? "de " . $this->from_poste : " ", $this->to_poste != "" ? "jusque " . $this->to_poste : "");
     }
     if ($this->from_poste2 != "" || $this->to_poste2 != "") {
         $filtre_pb = sprintf("Filtre poste plan2   %s  %s", $this->from_poste2 != "" ? "de " . $this->from_poste2 : " ", $this->to_poste2 != "" ? "jusque " . $this->to_poste2 : "");
     }
     $pdf->SetFont('DejaVu', '', 8);
     $pdf->Cell(50, 7, $filtre_date);
     $pdf->Cell(50, 7, $filtre_pa);
     $pdf->Cell(50, 7, $filtre_pb);
     $pdf->Ln();
     $pdf->SetFont('DejaVu', '', 6);
     $pdf->Cell(20, 7, 'id', 'B');
     $pdf->Cell(100, 7, 'Poste Comptable', 'B');
     $pdf->Cell(20, 7, 'Débit', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'Crédit', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'Solde', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'D/C', 'B', 0, 'L');
     $pdf->Ln();
     for ($i = 0; $i < count($array); $i++) {
         $row = $array[$i];
         $pdf->Cell(20, 6, $row['a_po_name'], 0, 0, 'L');
         $pdf->Cell(40, 6, mb_substr($row['a_po_description'], 0, 31), 0, 0, 'L');
         $pdf->Cell(20, 6, $row['b_po_name'], 0, 0, 'L');
         $pdf->Cell(40, 6, mb_substr($row['b_po_description'], 0, 31), 0, 0, 'L');
         $pdf->Cell(20, 6, $row['a_d'], 0, 0, 'R');
         $pdf->Cell(20, 6, $row['a_c'], 0, 0, 'R');
         $pdf->Cell(20, 6, $row['a_solde'], 0, 0, 'R');
         $pdf->Cell(20, 6, $row['a_debit'], 0, 0, 'C');
         $pdf->Ln();
     }
     $sum = $this->show_sum($array);
     $pdf->SetFont('DejaVu', 'B', 8);
     $pdf->Cell(70, 6, 'Somme', 1, 0, 'C');
     $pdf->Ln(5);
     $pdf->SetFont('DejaVu', '', 6);
     $pdf->Cell(20, 7, 'Poste');
     $pdf->Cell(60, 7, 'Description', 'B');
     $pdf->Cell(20, 7, 'Débit', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'Crédit', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'Solde', 'B', 0, 'L');
     $pdf->Cell(20, 7, 'D/C', 'B', 0, 'L');
     $pdf->Ln();
     for ($i = 0; $i < count($sum); $i++) {
         $row = $sum[$i];
         $pdf->Cell(20, 6, $row['poste'], 0, 0, 'L');
         $pdf->Cell(60, 6, $row['desc'], 0, 0, 'L');
         $pdf->Cell(20, 6, sprintf('%.2f', $row['debit']), 0, 0, 'R');
         $pdf->Cell(20, 6, sprintf('%.2f', $row['credit']), 0, 0, 'R');
         $pdf->Cell(20, 6, sprintf('%.2f', $row['solde']), 0, 0, 'R');
         $pdf->Cell(20, 6, $row['dc'], 0, 0, 'R');
         $pdf->Ln();
     }
     $fDate = date('dmy-Hi');
     $pdf->output('crossbalance-' . $fDate . '.pdf', 'D');
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:80,代码来源:class_anc_balance_double.php

示例9: pdfreportmakerAction

 public function pdfreportmakerAction()
 {
     require "fpdf/pdfheader.php";
     $month = $this->getRequest()->getParam('pdf_month');
     $year = $this->getRequest()->getParam('pdf_year');
     $email = $this->getRequest()->getParam('email');
     $apper_id = $this->getRequest()->getParam('apper_id');
     $cc = Mage::getModel('customer/customer')->load($apper_id);
     $apper_email = $cc->getEmail();
     $zmodel = Mage::getModel('zcredit/zcredit');
     $cus = $zmodel->checkmail($apper_email);
     $s_id = $cus[s_id];
     //$cus_id=$cus['cus_id'];
     $customer = Mage::getModel('customer/customer')->loadByEmail($email);
     $cus_data = $customer->getData();
     $agent_name = $cus_data['agent_name'];
     $defaultBilling = $customer->getDefaultBillingAddress();
     $address = $defaultBilling->getData();
     $full_name = $address['firstname'] . " " . $address['lastname'];
     $cus_id = $customer->getId();
     $results1 = $zmodel->frontsortorderpdf($s_id);
     $tot_amt_paid1 = 0;
     $tot_amt_invoice1 = 0;
     foreach ($results1 as $result) {
         $or_id = $result[order_id];
         $getdate = $zmodel->getbaltablecomdate($or_id);
         $date = $getdate['amt_paid_date'];
         $byear = date('Y', strtotime($date));
         $bmonth = date('m', strtotime($date));
         $inv_detail = $zmodel->getBaltrantopdf($result[order_id]);
         //$pdf->SetX(5);
         //$pdf->Cell(40,7,"$result[payment_status],");
         $tot_balsheet = $zmodel->getTotCnOaa($or_id);
         if ($year == $byear && $month == $bmonth && $result[maker] == $email) {
             foreach ($inv_detail as $inv) {
                 $tot_amt_invoice1 = $tot_amt_invoice1 + $inv[invoice_amount];
             }
             $tot_amt_paid1 = $tot_amt_paid1 + $tot_balsheet[amt_paid] + $tot_balsheet[sus_ac_use_pay];
         }
     }
     $pdf = new PDF();
     //$m_start=date('Y', strtotime($year));
     //$m_end=date('F', strtotime($month));
     $m_start = $year;
     $m_end = date('F', mktime(0, 0, 0, $month, 10));
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetY(30);
     $pdf->Line(10, 31, 200, 31);
     $pdf->SetFont('Times', 'B', 12);
     $pdf->Cell(40, 7, 'CREDIT STATEMENT');
     $pdf->setX(120);
     $pdf->SetFont('Times', '', 10);
     $pdf->Cell(40, 7, "Year: {$m_start}");
     $pdf->Cell(20, 7, "Month: {$m_end}", 2, 2, 'C');
     $pdf->Line(10, 36, 200, 36);
     //$pdf->Ln(10);
     //Customer detail start//
     $pdf->SetX(10);
     $pdf->SetFont('Times', 'B', 10);
     $pdf->Cell(35, 5, 'Customer Name');
     $pdf->SetFont('Times', '', 10);
     $pdf->Cell(150, 5, ": {$full_name}");
     $pdf->SetX(120);
     $pdf->SetFont('Times', 'B', 10);
     $pdf->Cell(35, 5, 'Total Amount Paid');
     $pdf->SetFont('Times', '', 10);
     $pdf->Cell(35, 5, ": {$tot_amt_paid1}", 2, 2, 'L');
     $pdf->SetX(10);
     $pdf->SetFont('Times', 'B', 10);
     $pdf->Cell(35, 5, 'Company Name &');
     $pdf->SetFont('Times', '', 10);
     $pdf->Cell(150, 5, ":{$cus['company_name']}");
     $pdf->SetX(120);
     $pdf->SetFont('Times', 'B', 10);
     $pdf->Cell(35, 5, 'Total Amount Invoice');
     $pdf->SetFont('Times', '', 10);
     $pdf->Cell(35, 5, ": {$tot_amt_invoice1}", 2, 2, 'L');
     $pdf->SetX(10);
     $pdf->SetFont('Times', 'B', 10);
     $pdf->Cell(35, 5, 'Address ');
     $pdf->SetFont('Times', '', 10);
     $pdf->Cell(20, 5, ": {$address['street']}");
     //$pdf->Cell(20,5,'Address1',2,2);
     //$pdf->Cell(20,5,'Address1');
     $pdf->SetX(120);
     $pdf->SetFont('Times', 'B', 10);
     $pdf->Cell(35, 5, 'Credit Limit');
     $pdf->SetFont('Times', '', 10);
     $pdf->Cell(35, 5, ": {$cus['credit_limit']}", 2, 2, 'L');
     $pdf->SetX(45);
     $pdf->Cell(25, 5, "  {$address['city']},{$address['region']}");
     $pdf->SetX(120);
     $pdf->SetFont('Times', 'B', 10);
     $pdf->Cell(35, 5, 'Available Limit ');
     $pdf->SetFont('Times', '', 10);
     $pdf->Cell(35, 5, ": {$cus['avail_bal']}", 2, 2, 'L');
     $pdf->SetX(45);
     $pdf->Cell(25, 5, "  {$address['postcode']}");
     $pdf->SetX(120);
//.........这里部分代码省略.........
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:101,代码来源:OrderController.php

示例10: createPDF

 function createPDF($ignoreStockStatusDepot = false, $output = 'D', $add_to_daily_statistic = false, $print_per_orders = true)
 {
     /*
         OUTPUT : D -> WILL PRODUCE ONE PDF FOR ALL ORDERS WITH ITEMS IN IT
         OUTPUT : F -> WILL PRODUCE MULTI PDF PER ORDER ITEMS
     */
     global $class_jo, $class_o, $class_do;
     $pi_printed_jg = array();
     $pi_printed_sp = array();
     $pi_printed_dp = array();
     if ($output == 'D') {
         //PRODUCE SINGLE PDF FILE
         $pdf = new PDF('P', 'mm', 'A4');
         $pdf->setTitle('Production Instruction');
         $pdf->SetAuthor('JULIE GRACE / Bonofactum');
         $pdf->SetCreator('k-Auto Generated PDF');
         $pdf->SetDisplayMode('real');
         $pdf->SetAutoPageBreak(false);
         $pdf->AliasNbPages();
         $pdf->SetFillColor(191, 191, 191);
     }
     $item_printed = 0;
     $oiid_last_printed = '';
     /* Moved this on function constructPIContent and replace using below $print_per_orders, 
      * so eventhough we use $output='F' we still could create pi which consists of collection of orders */
     //foreach($this->orders as $order) {
     //    $o = $order['detail'];
     //    foreach($order['items'] as $oiid=>$i) {
     //        if($i['status']<8) $this->pi_printed[strtolower($o['type'])][] = $oiid;
     //        //if($i['status']<8) ${'pi_printed_'.strtolower($o['type'])}[] = $oiid;
     //        $this->constructPIContent($pdf, $output, $order, $oiid, $ignoreStockStatusDepot, $print_per_orders);
     //        $item_printed++;
     //        $oiid_last_printed = $oiid;
     //    }
     //}
     if ($print_per_orders) {
         foreach ($this->orders as $order) {
             $this->constructPIContent($pdf, $output, $order, $ignoreStockStatusDepot, true);
             $item_printed++;
         }
     } else {
         $this->constructPIContent($pdf, $output, $this->orders, $ignoreStockStatusDepot, false);
     }
     #PI Print Counter
     if (count($this->pi_printed['sp']) > 0) {
         $class_jo->printCountAdd($this->pi_printed['sp']);
     }
     if (count($this->pi_printed['jg']) > 0) {
         $class_o->printCountAdd($this->pi_printed['jg']);
     }
     if (count($this->pi_printed['dp']) > 0) {
         $class_do->printCountAdd($this->pi_printed['dp']);
     }
     /* D: Download; F: Save File on Server */
     if ($output == 'D') {
         $infix = '';
         //$infix = count($this->orders)>1 ? '' : strtoupper($o['type']).'O'.$o['id'].'-';
         //if($item_printed==1) $infix = strtoupper($o['type']).'-'.$oiid_last_printed.'-';
         if ($item_printed == 1) {
             $infix = array_keys($this->orders);
             $infix = $infix[0] . '-';
         }
         $filename = 'PI-' . $infix . date('YmdHi');
         $pdf->Output($filename . '.pdf', $output);
         //$pdf->Output($filename.'.pdf','D');
     }
     if ($add_to_daily_statistic) {
         $pt = new production_target();
         $timestamp = date('Y-m-d H:i:s');
         if ($this->qty_total_first_printed > 0) {
             $pt->addDataToField($timestamp, 'start', $this->qty_total_first_printed);
         }
     }
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:74,代码来源:production_instruction_pdf.php

示例11: home__memberlist_printview

function home__memberlist_printview()
{
    global $base_url, $files_dir, $config;
    // $content='<html><head><meta http-equiv="Content-Type" content="application/pdf; charset=utf-8" />';
    // drupal_add_css(BOOTSTRAP.'/css/bootstrap.min.css');
    // drupal_add_css(CHURCHDB.'/cdb_printview.css');
    // $content=$content.drupal_get_header();
    if (!user_access("view memberliste", "churchdb")) {
        addErrorMessage(t("no.permission.for", t("list.of.members")));
        return " ";
    }
    require_once ASSETS . '/fpdf17/fpdf.php';
    $compact = true;
    if (isset($_GET["compact"])) {
        $compact = $_GET["compact"];
    }
    // Instanciation of inherited class
    $pdf = new PDF('P', 'mm', 'A4');
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', 9);
    $res = home_getMemberList();
    $pdf->SetLineWidth(0.4);
    $pdf->SetDrawColor(200, 200, 200);
    $fields = _home__memberlist_getSettingFields()->fields;
    foreach ($res as $p) {
        $pdf->Line(8, $pdf->GetY() - 1, 204, $pdf->GetY() - 1);
        $pdf->Cell(10, 10, "", 0);
        if ($p->imageurl == null || !file_exists("{$files_dir}/fotos/{$p->imageurl}")) {
            $p->imageurl = "nobody.gif";
        }
        $pdf->Image("{$files_dir}/fotos/{$p->imageurl}", $pdf->GetX() - 10, $pdf->GetY() + 1, 9);
        $pdf->Cell(2);
        $pdf->Cell(13, 9, $p->anrede, 0, 0, 'L');
        $pdf->Cell(48, 9, utf8_decode("{$p->name}, {$p->vorname}"), 0, 0, 'L');
        $pdf->Cell(45, 9, utf8_decode("{$p->strasse}"), 0, 0, 'L');
        // TODO: second occurence of code part - whats this for?
        $birthday = "";
        if ($p->geburtsdatum != null) {
            if ($p->year < 7000) {
                $birthday = "{$p->day}.{$p->month}.";
            }
            if ($p->year != 1004 && $fields["memberlist_birthday_full"]->getValue()) {
                if ($p->year < 7000) {
                    $birthday = $birthday . $p->year;
                } else {
                    $birthday = $birthday . $p->year - 7000;
                }
            }
        }
        $pdf->Cell(20, 9, $birthday, 0, 0, 'L');
        if ($fields["memberlist_telefonprivat"]->getValue() && $p->telefonprivat != "") {
            $pdf->Cell(30, 9, $p->telefonprivat, 0, 0, 'L');
        } else {
            if ($fields["memberlist_telefongeschaeftlich"]->getValue() && $p->telefongeschaeftlich != "") {
                $pdf->Cell(30, 9, $p->telefongeschaeftlich, 0, 0, 'L');
            } else {
                if ($fields["memberlist_telefongeschaeftlich"]->getValue() && $p->fax != "") {
                    $pdf->Cell(30, 9, $p->fax . " (Fax)", 0, 0, 'L');
                } else {
                    $pdf->Cell(30, 9, "", 0, 0, 'L');
                }
            }
        }
        if ($fields["memberlist_telefonhandy"]->getValue() && $p->telefonhandy != "") {
            $pdf->Cell(30, 9, $p->telefonhandy, 0, 0, 'L');
        }
        // Zeilenumbruch
        $pdf->Ln(5);
        $pdf->Cell(73);
        $pdf->Cell(48, 10, "{$p->plz} " . utf8_decode($p->ort), 0, 0, 'L');
        $pdf->Cell(17);
        if ($fields["memberlist_email"]->getValue() && $p->email != "") {
            $pdf->SetFont('Arial', '', 8);
            $pdf->Cell(30, 9, $p->email);
            $pdf->SetFont('Arial', '', 9);
        }
        $pdf->Ln(12);
    }
    $pdf->Output(t("list.of.members") . '.pdf', 'I');
}
开发者ID:lhaselauer,项目名称:churchtools_basic,代码行数:81,代码来源:home.php

示例12: generapdfadmin

function generapdfadmin($args)
{
    $dom = ZLanguage::getModuleDomain('IWbooks');
	require_once(ModUtil::getVar('IWbooks', 'fpdf').'fpdf.php');
	
//	print_r($args);
	
	// directori amb fitxers temporals (ha de tenir perm�s d'escriptura))
	       // $dir = "modules/IWbooks/tmp/";
	$dir = ModUtil::getVar('IWmain', 'documentRoot')."/".ModUtil::getVar('IWmain', 'tempFolder')."/";
	$dir = ModUtil::getVar('IWmain', 'documentRoot')."/".ModUtil::getVar('IWmain', 'tempFolder')."/";
	// mida de la lletra llibres
	$mida = 9;

	// Netegem els fitxers temporals amb X segons d'antiguitat
	NetejaFitxers($dir);

	$file = $dir."tmp".date('h'.'m'.'s'.'d').".pdf";

	extract($args);
	$cursacad    = ModUtil::apiFunc('IWbooks', 'user', 'cursacad', array('any' => $any));
	
	if ($materia == 'TOT'){
	    $nommateria = __('All subjects', $dom);
	}else{
	    $nommateria  = ModUtil::apiFunc('IWbooks', 'user', 'nommateria', array('codi_mat' => $materia));    
	}
	
	if ($nivell == ''){
	    $nivell_abre = __('All courses', $dom);
	}else{
	    $nivell_abre = ModUtil::apiFunc('IWbooks', 'user', 'reble', array('nivell' => $nivell));    
	}
	
	if ($etapa == 'TOT'){
	    $mostra_pla = __('All stages', $dom);    
	}else{
	     $mostra_pla = ModUtil::apiFunc('IWbooks', 'user', 'descriplans', array('etapa' => $etapa));   
	}

	if ($materia == "TOT")
	$mostra_codis = 1;

	$items = ModUtil::apiFunc('IWbooks',
                          'user',
                          'getall',
	array('startnum' => $startnum,
                                'any'      => $any,
                                'etapa'    => $etapa,
                                'nivell'   => $nivell,
                                'text'     => $text,
                                'lectura'  => $lectura,
                                'materia'  => $materia,
                                'materials'=> $materials,
                                'observacions' => $observacions,
                                'flag'     => 'admin',
                                'numitems' => 1000));

	$pdf=new PDF();
	$pdf->AliasNbPages();
	$pdf->Open();
	$pdf->SetMargins(25,20);
	$pdf->AddPage();

	//$marge_esq = 40;
	//$marge_sup = 36;
	$alt       = 5;
	$fita      = 0;

	if (count($items) == 0){
		$pdf->Write($alt, utf8_decode(__('There aren\'t books for your selection', $dom)));
		$pdf->Output($file);
		System::redirect(ModUtil::func('IWbooks', 'user', 'getFile', array('fileName' => str_replace(ModUtil::getVar('IWmain', 'documentRoot')."/",'',$file))));
		return $file;
	}
	$pdf->SetFillColor(230,230,230);
	$pdf->SetFont('Arial','B', 14);
	$pdf->MultiCell(0,7,utf8_decode(__('List of books · Course', $dom).$cursacad." · ".$nommateria.', '.$nivell_abre.' - '.$mostra_pla),1,'C',1);

	$pdf->Ln(10);
	$pdf->SetFont('Arial','BU', 12);
	$pdf->Write($alt, utf8_decode(__('Textbooks', $dom)));
	$pdf->Ln(7);

	// $amaterials = array();

	foreach ($items as $item) {
		if( $item[lectura] == 1 and $fita_lect != 1){
			$fita_lect = 1;
			$pdf->SetFont('Arial','BU',12);
			$pdf->Ln(7);
			$pdf->Write($alt, utf8_decode(__('Reading Books', $dom)));
			$pdf->Ln(7);
		}

		if( $item[optativa] == 1 and $fita_opt != 1){
			$fita_lect = 0;
			$fita_opt  = 1;
			$pdf->SetFont('Arial','BU',12);
			$pdf->Ln(10);
//.........这里部分代码省略.........
开发者ID:projectesIF,项目名称:Sirius,代码行数:101,代码来源:pnfpdf.php

示例13: generaReporte

 protected function generaReporte($data, $titulo = '')
 {
     $this->load->library('Pdf');
     $pdf = new PDF('L', 'mm', 'A4');
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Arial', '', 10);
     //if ($titulo != '')
     //{
     //	$pdf->Cell(40, 10, $titulo, 1);
     //	$pdf->Ln();
     //	$pdf->Ln();
     //}
     $header = array('N°', 'Nombre', 'Ubicación', 'Presidente(a)', 'Celular');
     $w = array(10, 80, 80, 80, 25);
     $pdf->SetFont('Arial', 'B', 10);
     for ($i = 0; $i < count($header); $i++) {
         $pdf->Cell($w[$i], 8, utf8_decode($header[$i]), 1, 0, 'C');
     }
     $pdf->Ln();
     $pdf->SetFont('Arial', '', 12);
     foreach ($data as $row) {
         $pdf->Cell($w[0], 6, utf8_decode($row->orden), 1);
         $pdf->Cell($w[1], 6, utf8_decode($row->nombre), 1);
         $pdf->Cell($w[2], 6, utf8_decode($row->ubicacion), 1);
         $pdf->Cell($w[3], 6, utf8_decode($row->jefe), 1);
         $pdf->Cell($w[4], 6, utf8_decode($row->celular), 1);
         $pdf->Ln();
     }
     $pdf->Cell(array_sum($w), 0, '', 'T');
     $pdf->Output();
 }
开发者ID:royer21,项目名称:staff2,代码行数:32,代码来源:base.php

示例14: initBBCodes

forum_opt($last['opt'], $last['optvalue'], $last['id']);
$start = $_GET['page'] * $config['topiczahl'];
$start = $start - $config['topiczahl'];
// Some speed optimisation
$speeder = $info['posts'] + 1;
if ($speeder > $config['topiczahl']) {
    $searchsql = " LIMIT " . $start . "," . $config['topiczahl'];
} else {
    $searchsql = " LIMIT " . $speeder;
}
$bbcode = initBBCodes();
$memberdata = cache_memberdata();
$pdftitle = html_entity_decode($config['fname'] . ": " . $pre . $info['topic']);
$pdf = new PDF();
$pdf->SetCompression($config['pdfcompress']);
$pdf->AliasNbPages('[Pages]');
$pdf->SetCreator('Viscacha ' . $config['version']);
$pdf->SetAuthor($config['fname']);
$pdf->SetSubject($pre . $info['topic']);
$pdf->SetTitle($pre . $info['topic']);
$pdf->AddPage();
$inner['body'] = '';
// prepare for vote
if (!empty($info['vquestion']) && $_GET['page'] == 1) {
    $votes = 0;
    $inner['head'] = $lang->phrase('pdf_vote') . $info['vquestion'];
    $cachev = array();
    $aids = array();
    $vresult = $db->query("\n\tSELECT COUNT(r.id) as votes, v.id, v.answer\n\tFROM {$db->pre}vote AS v LEFT JOIN {$db->pre}votes AS r ON r.aid=v.id \n\tWHERE v.tid = '{$info['id']}' GROUP BY v.id ORDER BY v.id", __LINE__, __FILE__);
    while ($row = $db->fetch_assoc($vresult)) {
        $row['answer'] = $gpc->prepare($row['answer']);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:pdf.php

示例15: invoice

 /**
  * Main
  *
  * @param object $order Order
  * @param string $mode Download or display (optional)
  */
 public static function invoice($order, $mode = 'D', $multiple = false, &$pdf = NULL, $slip = false, $delivery = false)
 {
     global $cookie;
     if (!Validate::isLoadedObject($order) or !$cookie->id_employee and (!OrderState::invoiceAvailable($order->getCurrentState()) and !$order->invoice_number)) {
         die('Invalid order or invalid order state');
     }
     self::$order = $order;
     self::$orderSlip = $slip;
     self::$delivery = $delivery;
     self::$_iso = strtoupper(Language::getIsoById((int) self::$order->id_lang));
     if ((self::$_priceDisplayMethod = $order->getTaxCalculationMethod()) === false) {
         die(self::l('No price display method defined for the customer group'));
     }
     if (!$multiple) {
         $pdf = new PDF('P', 'mm', 'A4');
     }
     $pdf->SetAutoPageBreak(true, 35);
     $pdf->StartPageGroup();
     self::$currency = Currency::getCurrencyInstance((int) self::$order->id_currency);
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $width = 100;
     $pdf->SetX(10);
     $pdf->SetY(25);
     $pdf->SetFont(self::fontname(), '', 12);
     $pdf->Cell($width, 10, self::l('Billing Address'), 0, 'L');
     $pdf->Cell($width, 10, self::l('Delivery Address'), 0, 'L');
     $pdf->Ln(5);
     $pdf->SetFont(self::fontname(), '', 9);
     $addressType = array('invoice' => array(), 'delivery' => array());
     $patternRules = array('optional' => array('address2', 'company'), 'avoid' => array('State:iso_code'));
     $addressType = self::generateHeaderAddresses($pdf, $order, $addressType, $patternRules, $width);
     if (Configuration::get('VATNUMBER_MANAGEMENT') and !empty($addressType['invoice']['addressObject']->vat_number)) {
         $vat_delivery = '';
         if ($addressType['invoice']['addressObject']->id != $addressType['delivery']['addressObject']->id) {
             $vat_delivery = $addressType['delivery']['addressObject']->vat_number;
         }
         $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $vat_delivery), 0, 'L');
         $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $addressType['invoice']['addressObject']->vat_number), 0, 'L');
         $pdf->Ln(5);
     }
     if ($addressType['invoice']['addressObject']->dni != NULL) {
         $pdf->Cell($width, 10, self::l('Tax ID number:') . ' ' . Tools::iconv('utf-8', self::encoding(), $addressType['invoice']['addressObject']->dni), 0, 'L');
     }
     /*
      * display order information
      */
     $boxTop = $pdf->GetY();
     $pdf->Rect(10, $boxTop, 90, 45);
     $pdf->Rect(110, $boxTop, 90, 45);
     //$pdf->SetY(70);
     $pdf->SetFillColor(240, 240, 240);
     $pdf->SetTextColor(0, 0, 0);
     $pdf->Cell(90, 6, self::l('Order Details'), 1, 2, 'C', 1);
     $carrier = new Carrier(self::$order->id_carrier);
     if ($carrier->name == '0') {
         $carrier->name = Configuration::get('PS_SHOP_NAME');
     }
     $history = self::$order->getHistory(self::$order->id_lang);
     foreach ($history as $h) {
         if ($h['id_order_state'] == _PS_OS_SHIPPING_) {
             $shipping_date = $h['date_add'];
         }
     }
     //$pdf->Ln(12);
     //Initialize price calculations
     $priceBreakDown = array();
     $pdf->priceBreakDownCalculation($priceBreakDown);
     if (!self::$orderSlip or self::$orderSlip and self::$orderSlip->shipping_cost) {
         $priceBreakDown['totalWithoutTax'] += Tools::ps_round($priceBreakDown['shippingCostWithoutTax'], 2) + Tools::ps_round($priceBreakDown['wrappingCostWithoutTax'], 2);
         $priceBreakDown['totalWithTax'] += self::$order->total_shipping + self::$order->total_wrapping + self::$order->total_cod + $priceBreakDown['customizationCost'];
     }
     if (!self::$orderSlip) {
         $taxDiscount = self::$order->getTaxesAverageUsed();
         if ($taxDiscount != 0) {
             $priceBreakDown['totalWithoutTax'] -= Tools::ps_round(self::$order->total_discounts / (1 + self::$order->getTaxesAverageUsed() * 0.01), 2);
         } else {
             $priceBreakDown['totalWithoutTax'] -= self::$order->total_discounts;
         }
         $priceBreakDown['totalWithTax'] -= self::$order->total_discounts;
     }
     $pdf->SetFont(self::fontname(), '', 9);
     /*if (self::$orderSlip)
     			$pdf->Cell(0, 6, self::l('SLIP #').' '.sprintf('%06d', self::$orderSlip->id).' '.self::l('from') . ' ' .Tools::displayDate(self::$orderSlip->date_upd, self::$order->id_lang), 1, 2, 'L', 1);
     		elseif (self::$delivery)
     			$pdf->Cell(0, 6, self::l('DELIVERY SLIP #').Tools::iconv('utf-8', self::encoding(), Configuration::get('PS_DELIVERY_PREFIX', (int)($cookie->id_lang))).sprintf('%06d', self::$delivery).' '.self::l('from') . ' ' .Tools::displayDate(self::$order->delivery_date, self::$order->id_lang), 1, 2, 'L', 1);
     		else
     			$pdf->Cell(0, 6, self::l('Order Details'), 1, 2, 'L', 1);*/
     $pdf->SetFontSize(10);
     $pdf->Ln(3);
     $pdf->Cell(90, 6, self::l('Order No. :') . ' ' . sprintf('%06d', self::$order->id), 0, 2, 'C');
     $pdf->Cell(90, 6, self::l('Order Date:') . ' ' . Tools::displayDate($order->invoice_date, self::$order->id_lang), 0, 2, 'C');
     $pdf->Cell(90, 6, 'Invoice No.' . ' ' . Tools::iconv('utf-8', self::encoding(), Configuration::get('PS_INVOICE_PREFIX', (int) $cookie->id_lang)) . sprintf('%06d', self::$order->invoice_number), 0, 2, 'C');
     $pdf->SetY($boxTop);
//.........这里部分代码省略.........
开发者ID:priyankajsr19,项目名称:shalu,代码行数:101,代码来源:PDF.php


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