2017 © Pedro Peláez
 

symfony-bundle html2pdf-bundle

Use HTML2PDF as a Symfony2 Service

image

ensepar/html2pdf-bundle

Use HTML2PDF as a Symfony2 Service

  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 19 Forks
  • 1 Open issues
  • 10 Versions
  • 8 % Grown

The README.md

EnseparHtml2pdfBundle

Build Status, (*1)

Html2pdf for Symfony as a service., (*2)

How to install?

Just add this to your composer.json file:, (*3)

"require": {
  ...
  "ensepar/html2pdf-bundle" : "^5.0"
}

or via composer:, (*4)

$ composer require ensepar/html2pdf-bundle

Enable it in bundles if not already, (*5)

Ensepar\Html2pdfBundle\EnseparHtml2pdfBundle::class => ['all' => true],

How to use?

Via dependency injection:, (*6)

class Html2Pdf
{
    /**
     * @Route("/create")
     */
    public function create(Html2pdfFactory $html2pdfFactory)
    {

        $html2pdf = $html2pdfFactory->create();
    }
}

Via the container:, (*7)

$html2pdf = $this->get('html2pdf_factory')->create();

You can pass every option you would pass to html2pdf, for instance :, (*8)

$html2pdf = $this->get('html2pdf_factory')->create('P', 'A4', 'en', true, 'UTF-8', [10, 15, 10, 15]);

If the previous arguments are not provided, the factory uses its own default values.
You can change those default values by adding the bundle configuration to your config file:, (*9)

ensepar_html2pdf:
    orientation: 'P'
    format: 'A4'
    lang: 'en'
    unicode: true
    encoding: 'UTF-8'
    margin: [10, 15, 10, 15]

Read more on the library Html2pdf here., (*10)

How to run the tests?

$ composer install
$ php vendor/bin/phpunit

The Versions

06/04 2016

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

MIT

The Requires

 

The Development Requires

pdf tcpdf html2pdf

02/01 2016

dev-master

9999999-dev https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

MIT

The Requires

 

The Development Requires

pdf tcpdf html2pdf

02/01 2016

v3.0.0

3.0.0.0 https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

MIT

The Requires

 

The Development Requires

pdf tcpdf html2pdf

02/01 2016

3.0.x-dev

3.0.9999999.9999999-dev https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

MIT

The Requires

 

The Development Requires

pdf tcpdf html2pdf

02/01 2016

v3.0.0-beta

3.0.0.0-beta https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

MIT

The Requires

 

The Development Requires

pdf tcpdf html2pdf

25/10 2014

v2.0.0

2.0.0.0 https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

MIT

The Requires

 

The Development Requires

pdf tcpdf html2pdf

21/11 2013

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

MIT

The Requires

 

pdf tcpdf html2pdf

21/11 2013

1.0.2

1.0.2.0 https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

MIT

The Requires

 

pdf tcpdf html2pdf

12/09 2013

1.0.1

1.0.1.0 https://github.com/OwlyCode/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

The Requires

 

pdf tcpdf html2pdf

13/06 2013

1.0.0

1.0.0.0 https://github.com/tmaindron/EnseparHtml2pdfBundle

Use HTML2PDF as a Symfony2 Service

  Sources   Download

The Requires

 

pdf tcpdf html2pdf