2017 © Pedro Peláez
 

symfony-bundle pdf-bundle

PDF library for Symfony2

image

kwizer15/pdf-bundle

PDF library for Symfony2

  • Sunday, April 13, 2014
  • by kwizer15
  • Repository
  • 2 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

pdf-bundle

Build Status, (*1)

Installation

  1. Install KwizerPdfBundle
  2. Enable the bundle

Install KwizerPdfBundle

Add the following dependency to your composer.json file: ``` json { "require": { "kwizer15/pdf-bundle": "1.0.*" } }, (*2)


Update vendors ``` bash $ php composer.phar update

Enable the bundle

``` php <?php // app/AppKernel.php, (*3)

public function registerBundles() { $bundles = array( // ... new Kwizer\PdfBundle\KwizerPdfBundle(), ); }, (*4)


## Using the bundle ### Hello World #### The document ``` php <?php // src/Acme/DemoBundle/PdfDocument/MyPdf.php namespace Acme\DemoBundle\PdfDocument; class MyDocument extends \Kwizer\PdfBundle\Core\AbstractPdfDocument { public function buildContent() { $this->builder->cell('Hello World !!!'); } }

Controller

``` php <?php // src/Acme/DemoBundle/Controller/MyController.php, (*5)

... use Symfony\Component\HttpFoundation\Response; use Acme\DemoBundle\PdfDocument\MyDocument;, (*6)

class MyController extends Controller { public function myAction() { $response = new Response(); $response->headers->set('Content-Type', 'application/pdf'); $response->headers->set('Content-Disposition', 'inline; filename=my.pdf'); $pdf = $this->get('kwizer.pdf.factory')->createPdf(new MyDocument()); $response->setContent($pdf);, (*7)

    return $response;
}

} ```, (*8)

The Versions

13/04 2014

dev-master

9999999-dev

PDF library for Symfony2

  Sources   Download

GPLv2

The Requires

 

by Emmanuel Bernaszuk

pdf

13/04 2014

1.0.2

1.0.2.0

PDF library for Symfony2

  Sources   Download

GPLv2

The Requires

 

by Emmanuel Bernaszuk

pdf

13/04 2014

1.0.1

1.0.1.0

PDF library for Symfony2

  Sources   Download

GPLv2

The Requires

 

by Emmanuel Bernaszuk

pdf