Html2pdf for Symfony 2 as a service.
Just add this to your composer.json file:
"require": {
...
"ensepar/html2pdf-bundle" : "dev-master"
}
In your action:
$html2pdf = $this->get('html2pdf')->get();
Override these parameters in your configuration.
html2pdf.orientation # The orientation of the document. P for portrait, L for landscape
html2pdf.format # The format of the document. A4, A5 ....
html2pdf.lang # The language of the document