| Extension: | OW Fpdf Bundle v1.0 |
|---|---|
| Requires: | Symfony 2 |
| Author: | Open Wide http://www.openwide.fr |
[FPDF] http://fpdf.org/
This bundle provides a complete system to create and display PDF.
Other features include user's choice of unit of measure, page format and margins; header and footer management; automatic page and line breaks and text justification; JPEG and PNG image support; and TrueType, Type1 and encoding support.
Add
FpdfBundlein your projectVia composer (TODO packagist)
Add the bundle in your
composer.json{ "require": { "open-wide/fpdf-bundle": "dev-master" } }Via a submodule
mkdir -p src/OpenWide git submodule add https://github.com/Open-Wide/OwFpdfBundle.git src/OpenWide/FpdfBundle
Enable the Bundle in your
EzPublishKernel.phpfile:<?php // ezpublish/EzPublishKernel.php public function registerBundles() { $bundles = array( // ... new OpenWide\FpdfBundle\OpenWideFpdfBundle(), ); }
$pdf = $this->container->get('ow_fpdf.fpdf');
$pdf = $this->container->get('ow_fpdf.fpdf');
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World !');
$pdf->Output();
FPDF documentation: http://fpdf.org/
