Developed with love by KnpLabs Hire us for your project!
39

EnseparHtml2pdfBundle

by OwlyCode

Html2pdf for Symfony 2 as a service.

EnseparHtml2pdfBundle

SensioLabsInsight
Build Status

Html2pdf for Symfony 2 as a service.

How to install ?

Just add this to your composer.json file:

"require": {
  ...
  "ensepar/html2pdf-bundle" : "~2.0"
}

Enable it in the Kernel

new Ensepar\Html2pdfBundle\EnseparHtml2pdfBundle(),

How to use ?

In your action:

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

You can pass every option you would pass to html2pdf, for instance :

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

If the previous arguments are not provided, the factory uses its own default values. You can
change this default values by adding the bundle configuration to your app/config/config.yml :

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

How to run the tests ?

composer install
phpunit
ensepar_html2pdf:
orientation: P
format: A4
lang: en
unicode: true
encoding: UTF-8
margin:

# Defaults:
- 10
- 15
- 10
- 15
  • Fixed broken test due to bad conflict solving :(
    By OwlyCode, 1 year ago
  • Added back older php versions
    By OwlyCode, 1 year ago
  • Improved test coverage along Symfony 4 support by olix21 (reworded commit by OwlyCode)
    By OwlyCode, 1 year ago
  • Add compatibility layer for Symfony 4.2
    By OwlyCode, 1 year ago
  • Merge pull request #31 from OwlyCode/fix-broken-html2pdf
    By web-flow, 2 years ago
  • Fixed broken lib after upgrading to html2pdf 5.2
    By OwlyCode, 2 years ago
  • Merge pull request #30 from LeJeanbono/patch-1
    By web-flow, 2 years ago
  • php 7.2 compatibility
    By web-flow, 2 years ago
  • Merge pull request #22 from OwlyCode/3.0
    By OwlyCode, 5 years ago
  • Updated html2pdf to official version
    By OwlyCode, 5 years ago
  • Upgraded html2pdf
    By OwlyCode, 5 years ago
  • Merge pull request #16 from 94noni/master
    By OwlyCode, 5 years ago
  • [Factory] change wording to be more precise
    By 94noni, 5 years ago
  • Merge pull request #15 from OwlyCode/travis-setup
    By OwlyCode, 5 years ago
  • Update README.md
    By OwlyCode, 5 years ago
  • Create .travis.yml
    By OwlyCode, 5 years ago
  • Merge pull request #13 from Sevrahk/master
    By OwlyCode, 6 years ago
  • Fix the service name in documentation
    By Sevrahk, 6 years ago
  • Fixes for insight
    By OwlyCode, 6 years ago
  • Version 2.0
    By OwlyCode, 6 years ago
  • Update README.md
    By OwlyCode, 6 years ago
  • Update composer.json to match the selected license and to fix the html2pdf version.
    By OwlyCode, 7 years ago
  • Added documentation for new configuration parameters. Fixes #11.
    By OwlyCode, 7 years ago
  • Adding licence to the project
    By OwlyCode, 7 years ago
  • Update composer.json
    By OwlyCode, 7 years ago
  • Merge pull request #5 from matthieuauger/specificparameters
    By OwlyCode, 7 years ago
  • missing parameter
    By Matthieu Auger, 7 years ago
  • Don't break compatibility
    By Matthieu Auger, 7 years ago
  • Allow to set specific parameters per instance
    By Matthieu Auger, 7 years ago
  • Merge pull request #4 from caravane/master
    By OwlyCode, 7 years ago