2017 © Pedro Peláez
 

symfony-bundle tcpdfbundle

Provides TCPDF integration for Symfony

image

meilon/tcpdfbundle

Provides TCPDF integration for Symfony

  • Tuesday, February 9, 2016
  • by meilon
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 18 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

How to Install

Add IoTcpdfBundle in your composer.json:, (*1)

{
    "require": {
        "meilon/tcpdfbundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:, (*2)

``` bash $ php composer.phar update, (*3)


Composer will install the bundle to your project's `vendor/meilon` directory. ### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Io\TcpdfBundle\IoTcpdfBundle(), ); }

HOW TO USE:

Controller: mybundle/controllers/myController.php ``` php class MyController extends Controller { /** * @Route("/mypage.pdf") */ public function mypageAction() { //creating html source $html = $this->renderView('MyBundle:MyController:mypage.pdf.twig', array());, (*4)

            //loading io_tcpdf library
            $pdf = $this->get('io_tcpdf');
            //do your stuff here

            //display pdf (it returns a Response Object)
            return $pdf->quick_pdf($html);
        }
    }

View: mybundle/Resources/views/myController/mypage.pdf.twig ``` html <div><h1>header</h1></div> <hr /> <div>content</div>

TODO

  • smart method for easier PDF generation and customization
  • cache pdf generation
  • @PDF('template.twig') annotation system

The Versions

09/02 2016

dev-master

9999999-dev

Provides TCPDF integration for Symfony

  Sources   Download

MIT

The Requires

 

by Alessio

pdf tcpdf

05/11 2012

2.0.x-dev

2.0.9999999.9999999-dev

Provides TCPDF integration for Symfony

  Sources   Download

LGPL

The Requires

 

by Alessio

pdf tcpdf