FrDeamon / EnseparHtml2pdfBundle

Html2pdf for Symfony 2 as a service.
MIT License
22 stars 22 forks source link

how it work! #10

Closed zorg-iris closed 10 years ago

zorg-iris commented 11 years ago

hi i just want to have more infos to see how it work? how do you inject the html?

thank

OwlyCode commented 10 years ago

Hi !

I'm not sure about what you're asking, but here's a sample of what you can do to use it :

$html2pdf = $this->get('html2pdf')->get();
$html2pdf->WriteHTML(" Some html here. ");
$html2pdf->Output('', true);

Is this what you're looking for ? The get() method of the service returns an Html2Pdf instance, working as said in their documentation (http://wiki.spipu.net/doku.php?id=html2pdf:en:v4:accueil) . ;)