2017 © Pedro Peláez
 

symfony-bundle pdf-bundle

Symfony PdfBundle

image

kitpages/pdf-bundle

Symfony PdfBundle

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

KitpagesPDFBundle

Pdf: FPDF and FPDI simple wrapper for Symfony, (*1)

Installation

use composer update, (*2)

add the new Bundle in app/appKernel.php, (*3)

Use example

use Kitpages\PDFBundle\lib\PDF;, (*4)

$pdf = new PDF(); $pagecount = $pdf->setSourceFile('oldPdf.pdf);, (*5)

for($i = 1; $i <= $pagecount; $i++){ $tplIdx = $pdf->importPage($i); $s = $pdf->getTemplatesize($tplIdx); $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L', array($s['w'], $s['h']), true); // This gets it the right dimensions $pdf->useTemplate($tplIdx, 0, 0, 0, 0, true); $pdf->SetFont('Arial','',8); $pdf->SetTextColor(168,168,168); $pdf->SetY(20); $pdf->SetX(80); $pdf->Write(0, 'modify my pdf'); } $pdf->Output('newPdf.pdf, 'D');, (*6)

The Versions

15/05 2013

dev-master

9999999-dev https://github.com/kitpages/KitpagesPDFBundle

Symfony PdfBundle

  Sources   Download

BSD

The Requires

 

by Sebastien Lefebvre

pdf fpdf fpdi