2017 © Pedro Peláez
 

symfony-bundle portabledocument-bundle

This bundle to generate PDFs optionally with css styling.

image

prg/portabledocument-bundle

This bundle to generate PDFs optionally with css styling.

  • Friday, July 25, 2014
  • by pguso
  • Repository
  • 1 Watchers
  • 0 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

PortableDocumentBundle

PortableDocumentBundle is a PHP (5.3+) wrapper for the mPDF Library. It allows you to generate pdfs from html., (*1)

Installation

With composer, add:, (*2)

{
    "require": {
        "prg/portabledocument-bundle": "dev-master"
    }
}

Then enable it in your kernel:, (*3)

// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        //...
        new PRG\PortableDocumentBundle\PRGPortableDocumentBundle(),
        //...

Render a pdf document as response from a controller

$pdfGenerator = $this->get('pguso.mpdf');

$html = $this->renderView('YourBundle:Folder:file.html.twig', array(
            'args' => $args
        ));

return new Response(
          $pdfGenerator->generateFromView($html, array(
                'stylesheet' => '/pdf/style.css' //optional
            ))
        );

The Versions

25/07 2014

dev-master

9999999-dev http://github.com/pguso/PortableDocumentBundle

This bundle to generate PDFs optionally with css styling.

  Sources   Download

MIT

The Requires

 

bundle symfony pdf

23/07 2014

v1.0

1.0.0.0 http://github.com/pguso/PortableDocumentBundle

This bundle to generate PDFs optionally with css styling.

  Sources   Download

MIT

The Requires

 

bundle symfony pdf