Skip to content

phihuyn/Html2pdfBundle

Repository files navigation

Html2pdfBundle

SensioLabsInsight Build Status

Html2pdf for Symfony 4 or 5 as a service.

How to install ?

Just add this to your composer.json file:

"require": {
  ...
  "phihuynh/html2pdfbundle": "dev-master",
}

How to use ?

In your action:

use Ensepar\Html2pdfBundle\Factory\Html2pdfFactory;

public function yourAction(Request $request, Html2pdfFactory $html2pdfFactory){
  ...
  $html2pdf = $html2pdfFactory->create();
}

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

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

How to run the tests ?

composer install
phpunit

About

Html2pdf for Symfony as a service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages