本文整理汇总了PHP中PDF::Output方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::Output方法的具体用法?PHP PDF::Output怎么用?PHP PDF::Output使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF
的用法示例。
在下文中一共展示了PDF::Output方法的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();
}
示例2: run
function run()
{
$this->pdf->Body();
header('Expires:');
header('Pragma:');
header('Cache-control:');
$this->pdf->Output('webtrees-' . uniqid() . '.pdf', 'I');
}
示例3: 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();
}
示例4: 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();
}
示例5: 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();
}
示例6: 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");
}
示例7: 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);
}
示例8: 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>', '“' => '"', '”' => '"', '„' => '"', '…' => '...', '’' => '\'');
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;
}
示例9: 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;
}
}
}
示例10: 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();
*/
}
示例11: mostrar
public function mostrar()
{
if (!isset($_GET['lote'])) {
echo "Error";
} else {
$lote = $_GET['lote'];
$sql = "Select l.tipoLote, l.fechaEntrada, b.idBulto, b.idLote, p.descripcion, p.dimAncho, p.dimAlto, p.dimLargo\n\t\t\t\t\tfrom `tbl_sga_lote`as l, `tbl_sga_bulto`as b, `tbl_sga_producto` as p\n\t\t\t\t\twhere b.idLote = '{$lote}'\n\t\t\t\t\tand b.idProducto = p.idProducto\n\t\t\t\t\tand l.idLote=b.idLote";
$query = $this->db->query($sql);
$pdf = new PDF();
foreach ($query->result() as $row) {
$fecha = date_create($row->fechaEntrada);
$fecha = date_format($fecha, 'd-m-Y');
$pdf->AddPage();
$pdf->Fecha("{$fecha}", "{$row->idBulto}", "{$row->idLote}", "{$row->tipoLote}", "{$row->descripcion}", "{$row->dimAncho} x {$row->dimAlto} x {$row->dimLargo}");
}
// $pdf = new PDF();
// $pdf->AddPage();
// $pdf->Fecha('11/10/2007','002110','PRODUCTO TERMINADO','Madera molica','200x330x3004');
// $pdf->AddPage();
// $pdf->Fecha('11/10/2007','002110','PRODUCTO TERMINADO','Madera molica','200x330x3004');
$pdf->Output();
}
}
示例12: CorreosOrdinario
public function CorreosOrdinario()
{
include 'config/etiqueta.php';
$pdf = new PDF('L', 'mm', array(140, 100));
for ($x = 0; $x < count($this->pedidoExportar); $x++) {
$sql = "SELECT cus.firstname, cus.lastname, dir.address1, dir.postcode, dir.city, prov.name as provincia, paisLen.name as pais\n FROM ps_orders AS ord\n INNER JOIN ps_customer AS cus ON cus.id_customer = ord.id_customer\n INNER JOIN ps_address as dir ON dir.id_address = ord.id_address_delivery\n INNER JOIN ps_state as prov on prov.id_state = dir.id_state\n INNER JOIN ps_country as pais on pais.id_country = dir.id_country\n INNER JOIN ps_country_lang as paisLen on pais.id_country = paisLen.id_country\n WHERE ord.id_order = " . $this->pedidoExportar[$x] . " and paisLen.id_lang = 1";
$datosDireccion = DB::getInstance()->ExecuteS($sql);
$nomb = "";
$dir = "";
$cod = "";
$prov = "";
$pais = "";
foreach ($datosDireccion as $datPed) {
$nomb = $datPed['firstname'] . " " . $datPed['lastname'];
$dir = $datPed['address1'];
$cod = $datPed['postcode'] . " " . utf8_decode($datPed['city']);
$prov = utf8_decode($datPed['provincia']);
$pais = utf8_decode($datPed['pais']);
}
$pdf->AddPage();
$pdf->Body($nomb, $dir, $cod, $prov, $pais);
}
$pdf->Output("test.pdf");
}
示例13: 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();
}
示例14: date
// Movernos a la derecha
$pdf->SetY(140);
$pdf->Cell(80);
// Título
$pdf->Cell(60, 5, 'Angytours', 0, 2, 'C');
$pdf->Cell(60, 5, 'Calle 59J # 565 X 110 y 112 Col Bojorquez', 0, 2, 'C');
$pdf->Cell(60, 5, 'Tel: (999)9-12-28-95 | Cel: (044)99-92-44-54-14', 0, 2, 'C');
$pdf->Cell(60, 5, 'Correo: angeviajes@hotmail.com', 0, 2, 'C');
$pdf->Cell(60, 5, 'RFC: PELA620129L36', 0, 2, 'C');
$pdf->SetFont('Arial', '', 10);
$pdf->SetY(165);
$pdf->SetX(140);
$pdf->Cell(40, 8, utf8_decode("Fecha: ") . utf8_decode($dias[date('w')] . " " . date('d') . " de " . $meses[date('n') - 1] . " del " . date('Y')), 0, 1);
$pdf->SetY(175);
$pdf->SetX(20);
$pdf->Cell(130, 8, utf8_decode("Cliente : ") . utf8_decode($nombre), 1, 0);
$pdf->Cell(30, 8, utf8_decode("Folio : ") . $FolioGrupo, 1, 1);
$pdf->SetX(20);
$pdf->Cell(60, 8, utf8_decode("Cantidad : ") . $CostoTotal, 1, 0, 'L');
$pdf->MultiCell(100, 8, utf8_decode("Importe Letras : ") . $CantLetras, 1, 'L');
$pdf->SetX(20);
$pdf->MultiCell(160, 5, utf8_decode("Descripción : ") . utf8_decode($Descripcion), 1, 'L');
$pdf->SetX(20);
$pdf->Cell(100, 14, utf8_decode("Le atendio : ") . utf8_decode($nombreU), 1, 0);
$pdf->Cell(60, 14, utf8_decode("Firma : "), 1, 1);
$pdf->Output('Recibo' . $nombre . 'Folio' . $FolioGrupo . '.pdf', 'D');
cerrar($conexion);
?>
示例15: savePdf
function savePdf()
{
$meeting =& $this->meeting;
$submission =& $this->submission;
$summary = $submission->getSummaryFile() != null ? $submission->getSummaryFile() : $this->getData('summary');
$specificDiscussionText = $this->getData('discussionText');
$discussionType = $this->getData('discussionType');
$typeOther = $this->getData('typeOther');
$isUnanimous = $this->getData('unanimous') == "Yes" ? true : false;
$decision = $this->getData("decision");
$votes = $this->getData("votes");
$minorityReason = $this->getData("minorityReason");
$chairReview = $this->getData('chairReview');
$abstract = $submission->getLocalizedAbstract();
$pdf = new PDF();
$pdf->AddPage();
$pdf->ChapterTitle('CONTINUING REVIEW of ' . $submission->getProposalId());
$pdf->ChapterItemKeyVal('Protocol Title', $abstract->getScientificTitle(), "BU");
$pdf->ChapterItemKeyVal('Principal Investigator (PI)', $submission->getAuthorString(), "BU");
$pdf->ChapterItemKeyVal('Unique project identification # assigned', $submission->getProposalId(), "BU");
$pdf->ChapterItemKeyVal('Responsible Staff Member', $submission->getUser()->getFullName(), "BU");
if ($isUnanimous) {
switch ($decision) {
case SUBMISSION_SECTION_DECISION_APPROVED:
$decisionStr = "The proposal was accepted in principal unanimously by all the members of the ERC present in the meeting, and was approved with clarifications mentioned above.";
break;
case SUBMISSION_SECTION_DECISION_RESUBMIT:
$decisionStr = "The proposal was assigned for revision and resubmission in principal unanimously by all the members of the ERC present in the meeting provided with the considerations and conditions mentioned above.";
break;
case SUBMISSION_SECTION_DECISION_DECLINED:
$decisionStr = "The proposal was not accepted in principal unanimously by all the members of the ERC present in the meeting due to concerns stated above.";
break;
}
} else {
switch ($decision) {
case SUBMISSION_SECTION_DECISION_APPROVED:
$decisionStr = "The proposal was accepted in principal by the majority of the ERC members present in the meeting and was approved with clarifications mentioned above.";
break;
case SUBMISSION_SECTION_DECISION_RESUBMIT:
$decisionStr = "The proposal was assigned for revision and resubmission in principal by the majority of the ERC members present in the meeting provided with the considerations and conditions mentioned above.";
break;
case SUBMISSION_SECTION_DECISION_DECLINED:
$decisionStr = "The proposal was not accepted in principal unanimously by the majority of the ERC members present in the meeting due to concerns stated above.";
break;
}
$votesStr = "The distribution of votes are as follows. " . $this->getData('votesApprove') . " member(s) voted for, " . $this->getData('votesNotApprove') . " member(s) voted against, " . $this->getData('votesAbstain') . " member(s) abstained.";
$reasonsStr = "Reasons for minority opinions are as follows: {$minorityReason}";
}
$pdf->ChapterItemKey('IRB Decision and Votes', "BU");
$pdf->ChapterItemVal($decisionStr);
if (!$isUnanimous) {
$pdf->ChapterItemVal($votesStr);
$pdf->ChapterItemVal($reasonsStr);
if ($chairReview != null) {
$pdf->ChapterItemVal($chairReview);
}
}
$journal =& Request::getJournal();
$journalId = $journal->getId();
$filename = $abstract->getScientificTitle() . ".pdf";
$meetingFilesDir = Config::getVar('files', 'files_dir') . '/journals/' . $journalId . '/meetings/' . $meeting->getId() . "/continuingReviews/" . $filename;
import('classes.file.MinutesFileManager');
$minutesFileManager = new MinutesFileManager($meeting->getId(), "continuingReviews", $submission->getId());
if ($minutesFileManager->createDirectory()) {
$pdf->Output($meetingFilesDir, "F");
}
}