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


PHP PDF::AddPage方法代码示例

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


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

示例1: relatorioCursoPorPolo

 function relatorioCursoPorPolo()
 {
     $pdf = new PDF("P", "pt", "A4");
     $relatorio = $this->read();
     $cabeçalhoTabela = array('Curso', 'Tipo');
     $polo = "";
     $array = array();
     foreach ($relatorio as $value) {
         if ($polo == "") {
             $polo = $value->getPolo()->getId();
             $pdf->setVendedor($value->getPolo()->getNome());
             $pdf->AddPage();
         }
         if ($polo != $value->getPolo()->getId()) {
             $pdf->BasicTable($cabeçalhoTabela, $array);
             $array = array();
             $polo = $value->getPolo()->getId();
             $pdf->setVendedor($value->getPolo()->getNome());
             $pdf->AddPage();
             array_push($array, array($value->getNome(), $value->getTipo()['descricao']));
         } else {
             array_push($array, array($value->getNome(), $value->getTipo()['descricao']));
         }
     }
     $pdf->BasicTable($cabeçalhoTabela, $array);
     $pdf->Output();
 }
开发者ID:RaelCappra,项目名称:SisTutor,代码行数:27,代码来源:CursoController.php

示例2: getPDF

 public function getPDF()
 {
     /*$pdf = new PDF();
       $docentes = Docente::all();
       $columnas = ['NRO','CODIGO','APELLIDOS Y NOMBRES'];
       $pdf->SetFont('Arial','B',13);
       $pdf->AddPage();
       $pdf->Cell(80);
       $pdf->Cell(30,5,'Lista de Docentes',0,1,'C');
       $pdf->SetFont('Arial','B',9);
       $pdf->Ln(2);
       $pdf->SetFont('Arial','B',10);
       $pdf->docentes($columnas,$docentes);
       $cabe=['Content-Type' => 'application/pdf'];
       return Response::make($pdf->_checkoutput(),200,$cabe);*/
     $fpdf = new PDF();
     $docentes = Docente::all();
     $columnas = ['NRO', 'CODIGO', 'APELLIDOS Y NOMBRES'];
     $fpdf->AddPage();
     $fpdf->Cell(80);
     $fpdf->Cell(30, 5, 'Lista de Docentes', 0, 1, 'C');
     $fpdf->SetFont('Arial', 'B', 9);
     $fpdf->Ln(2);
     $fpdf->SetFont('Arial', 'B', 16);
     $fpdf->docentes($columnas, $docentes);
     $fpdf->Output();
     exit;
 }
开发者ID:nosiliw,项目名称:SCDW,代码行数:28,代码来源:ExpectadoresController.php

示例3: Cetak

function Cetak()
{
    // *** Init PDF
    $pdf = new PDF();
    $pdf->SetTitle("Rekap Pembayaran Mahasiswa Per Bulan");
    $pdf->AddPage('L', 'Legal');
    $lbr = 190;
    BuatIsinya($_SESSION['TahunID'], $_SESSION['ProdiID'], $pdf);
    $pdf->Output();
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:10,代码来源:lapkeu.bayarbulan.php

示例4: Cetak

function Cetak()
{
    // *** Init PDF
    $pdf = new PDF();
    $pdf->SetTitle("Pembayaran Mahasiswa Per Periode");
    $pdf->AddPage();
    $lbr = 190;
    BuatIsinya($_SESSION['TahunID'], $_SESSION['ProdiID'], $pdf);
    $pdf->Output();
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:10,代码来源:lapkeu.mhswbayar.php

示例5: 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

示例6: Cetak

function Cetak()
{
    // *** Init PDF
    $pdf = new PDF();
    $pdf->SetTitle("Penjualan Formulir");
    $pdf->AddPage();
    $lbr = 190;
    BuatJudulLaporan($_SESSION['_PMBPeriodID'], $pdf);
    BuatIsinya($_SESSION['_PMBPeriodID'], $pdf);
    $pdf->Output();
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:11,代码来源:pmblap.jualformulir.php

示例7: 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

示例8: relatorioDisciplinasPorCurso

 function relatorioDisciplinasPorCurso($id)
 {
     $pdf = new PDF("P", "pt", "A4");
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 16);
     $polo = new Polo();
     $polo->setId($id);
     $polo = $polo->getById();
     $pdf->Cell(40, 10, $polo->getNome());
     $cabeçalhoTabela = array('Disciplina', 'Nome Tutor', 'Sobrenome Tutor');
     $curso = new Curso();
     $cursos = $curso->read();
     foreach ($cursos as $curso) {
         if ($curso->getPolo()->getId() != $id) {
             continue;
         }
         $pdf->setVendedor($curso->getNome() . " - " . $curso->getTipo()['descricao']);
         $pdf->AddPage();
         $disciplinaDao = new DisciplinaDao();
         $array = $disciplinaDao->listDisciplinasTutoresByCurso($curso);
         $pdf->BasicTable($cabeçalhoTabela, $array);
     }
     $pdf->Output();
 }
开发者ID:RaelCappra,项目名称:SisTutor,代码行数:24,代码来源:DisciplinaController.php

示例9: PDF

 function __construct($datos)
 {
     $pdf = new PDF();
     // [ Establesco Todos los datos que conendra la Factura ]
     $pdf->set_data($datos);
     $pdf->FPDF('P', 'mm', 'Letter');
     // Esta funcion la uso cuando voy a imprimir  al final el numero de la paguina $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Arial', '', 12);
     //$pdf->SetTextColor(20,20,250); COLOR AZUL
     $pdf->SetTextColor(0, 0, 0);
     $pdf->menbrete();
     $pdf->detalle($datos['productos']);
     $pdf->Output();
 }
开发者ID:julio899,项目名称:factura_ktux,代码行数:15,代码来源:class_factura.php

示例10: formarPdf

 public function formarPdf($nombreArchivo, $seleccionar)
 {
     require 'PDF.php';
     $archivo = $nombreArchivo;
     $pdf = new PDF();
     //  $pdf->SetTitle($title);
     $pdf->AddPage();
     foreach ($seleccionar as $valor) {
         $fueNombre = utf8_decode($valor['fueNombre']);
         $notTitulo = utf8_decode($valor['notTitulo']);
         $notContenido = utf8_decode($valor['notContenido']);
         $notAutor = utf8_decode($valor['notAutor']);
         $notEnlace = utf8_decode($valor['notEnlace']);
         $fuenteIgual = strcmp($fueNombre, $fueNombreAnterior);
         if ($fuenteIgual == 0) {
             $mostrarFuente = "";
         } else {
             $mostrarFuente = $fueNombre;
         }
         $fueNombreAnterior = $fueNombre;
         $Fecha = '2016-06-01';
         /* $body=$body.'<br>';
            $body=$body.'<div>';
            $body=$body.'<h2 style="text-align: center; color:#1565c0;"> <u>'.$mostrarFuente.'</u></h2>';
            $body=$body.'<h4 style="text-align: left; color:#1565c0;">'.$notTitulo.'</h4>';
            $body=$body.'<p style="text-align: justify;" >'.$notContenido.'</p>';
            $body=$body.'<br><p style="text-align: justify;" ><small>'.$notAutor.'</small></p>';
            $body=$body.'<p style="text-align: justify;" ><small> <a href="'.$notEnlace.'">'.$notEnlace.'</a></small></p>';
            $body=$body.'</div>';*/
         $pdf->PrintChapter($mostrarFuente, $Fecha, $notTitulo, $notContenido);
     }
     /*$fuente=utf8_decode('Fuente de información');
       $Fecha='2016-06-01';
       $titulo=utf8_decode('Titulo de notica');
       $contenido=utf8_decode('Contenido de noticia');*/
     //$pdf->SetAuthor('Julio Verne');
     /*  $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,'ultimo');*/
     $pdf->Output();
     //  $pdf->Output($archivo,"f");
 }
开发者ID:vvvhh,项目名称:not,代码行数:47,代码来源:CrearPdf.php

示例11: generateCodes

 public function generateCodes(array $data)
 {
     $count = (int) $data['count'];
     $teacherId = $data['teacher_id'];
     $message = $data['message'];
     if (is_null($count) || is_null($teacherId)) {
         return false;
     } else {
         try {
             \DB::beginTransaction();
             $teacher = Authenticator::user($teacherId);
             \PDF::setPrintHeader(false);
             \PDF::setPrintFooter(false);
             \PDF::AddPage();
             for ($i = 0; $i < $count; $i++) {
                 $code = $this->codeRepo->generateCode();
                 $data = array();
                 $data = array_add($data, 'student_code', $code);
                 $data = array_add($data, 'teacher_id', $teacherId);
                 $code = $this->codeRepo->create($data);
                 $code->message = $message;
                 $this->codeRepo->clearModel();
                 $html = View::make('pages.code')->with('code', $code)->render();
                 if ($i % 5 === 0 && $i !== 0) {
                     \PDF::AddPage();
                     \PDF::writeHTML($html, false, false, false, false, 'L');
                 } else {
                     \PDF::writeHTML($html, false, false, false, false, 'L');
                 }
             }
             \PDF::SetCreator('');
             \PDF::SetAuthor('');
             $format = '%s/%s.pdf';
             $subpath = sprintf($format, 'pdfs', $teacherId);
             $format = '/%s/%s';
             $fullpath = sprintf($format, public_path(), $subpath);
             \PDF::Output($fullpath, 'F');
             \DB::commit();
             return $subpath;
         } catch (\Exception $ex) {
             \Log::error($ex);
             \DB::rollback();
             return false;
         }
     }
 }
开发者ID:hg2355,项目名称:ACELink,代码行数:46,代码来源:TeacherService.php

示例12: 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

示例13: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Material Stock Overview List';
     $pdf->AddPage('L');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $header = array('No', 'ID', 'Material Name', 'Sloc', 'Qty', 'UOM', 'Prod Trans Type', 'Ref Source');
     $model = new Productstock('search');
     $dataprovider = $model->search();
     $dataprovider->pagination = false;
     $data = $dataprovider->getData();
     $cols = $dataprovider->getKeys();
     $dataku = array(count($data));
     //var_dump($dataku);
     $w = array(10, 15, 70, 30, 30, 30, 40, 30);
     $pdf->SetTableHeader();
     //Header
     for ($i = 0; $i < count($header); $i++) {
         $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);
     }
     $pdf->Ln();
     $pdf->SetTableData();
     //Data
     $fill = false;
     $i = 0;
     foreach ($data as $datas) {
         $i = $i + 1;
         $pdf->Cell($w[0], 6, $i, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[1], 6, $datas['productstockid'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[2], 6, Product::model()->findbypk($datas['productid'])->productname, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[3], 6, Sloc::model()->findbypk($datas['slocid'])->sloccode, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[4], 6, $datas['qty'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[5], 6, Unitofmeasure::model()->findbypk($datas['unitofmeasureid'])->uomcode, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[6], 6, Prodtranstype::model()->findbypk($datas['prodtranstypeid'])->description, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[7], 6, $datas['refsource'], 'LR', 0, 'L', $fill);
         $pdf->Ln();
         $fill = !$fill;
     }
     $pdf->Cell(array_sum($w), 0, '', 'T');
     // me-render ke browser
     $pdf->Output('productstock.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:46,代码来源:ProductstockController.php

示例14: run

 function run()
 {
     // change some win codes, and xhtml into html
     $str = array('<br />' => '<br>', '<hr />' => '<hr>', '[r]' => '<red>', '[/r]' => '</red>', '[l]' => '<blue>', '[/l]' => '</blue>', '&#8220;' => '"', '&#8221;' => '"', '&#8222;' => '"', '&#8230;' => '...', '&#8217;' => '\'');
     foreach ($str as $_from => $_to) {
         $this->html = str_replace($_from, $_to, $this->html);
     }
     $pdf = new PDF('P', 'mm', 'A4');
     $pdf->SetDisplayMode('real');
     $pdf->AddPage();
     // html
     $pdf->WriteHTML($this->_convert(stripslashes($this->html)), $this->bi);
     // output
     $pdf->Output();
     // stop processing
     exit;
 }
开发者ID:JozefAB,项目名称:neoacu,代码行数:17,代码来源:fpdf.php

示例15: testpdf

 function testpdf()
 {
     $this->load->library('fpdf');
     $this->fpdf->FPDF('P', 'cm', 'A4');
     $this->fpdf->AddPage();
     //$this->fpdf->SetFont('Arial','',10);
     $this->fpdf->setFont('Arial', 'B', 9);
     $teks = "Ini hasil Laporan PDF menggunakan Library FPDF di CodeIgniter";
     $this->fpdf->Cell(3, 0.5, $teks, 1, '0', 'L', true);
     //	$this->fpdf->setFont('Arial','B',7);
     $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     $this->fpdf->Line(15.6, 2.1, 5, 2.1);
     $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     //$this->fpdf->Ln();
     $this->fpdf->Output();
     $this->load->library('pdf');
     $pdf = new PDF();
     $pdf->SetMargins(1, 1);
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 14);
     $pdf->Cell(0, 0.5, 'Hellol Ci', 0, 1, 'C');
     $pdf->Output();
     /*
     	$this->load->library('fpdf');
     	$this->fpdf->FPDF('P','cm','A4');
     	$this->fpdf->Ln();
     	$this->fpdf->setFont('Arial','B',9);
     	$this->fpdf->Text(7.5,1,"DAFTAR PENJUALAN BULAN ");
     	$this->fpdf->setFont('Arial','B',9);
     	$this->fpdf->Text(8.3,1.5,'KOMUNITAS MUSISI INDONESIA');
     	$this->fpdf->setFont('Arial','B',7);
     	$this->fpdf->Text(8,1.9,'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     	 
     	$this->fpdf->Line(15.6,2.1,5,2.1);             
     	$this->fpdf->ln(1.6);
     	$this->fpdf->ln(0.3);
     	$this->fpdf->Output(); 
     */
 }
开发者ID:rasyid46,项目名称:ci_crud,代码行数:39,代码来源:chart.php


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