Download the PHP package schoenef/html-to-pdf-bundle without Composer
On this page you can find all versions of the php package schoenef/html-to-pdf-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download schoenef/html-to-pdf-bundle
More information about schoenef/html-to-pdf-bundle
Files in schoenef/html-to-pdf-bundle
Package html-to-pdf-bundle
Short Description A simple bundle to add html 2 pdf service provider in a simple way to your symfony project.
License MIT
Informations about the package html-to-pdf-bundle
SchoenefHtmlToPdfBundle
A simple bundle to add html 2 pdf service provider in a simple way to your symfony project. Currently, it supports:
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, if not happening automatically, enable the bundle by adding it to the list of registered bundles
in the cofig/bundles.php file of your project:
Step 3: Configure the Bundle
Add the following configuration to your :
And to your :
Available configuration options
- provider: default: pdfrocket - no other value available at the moment
- timeout: default: 20 - the timeout in seconds of a single http call
- apikey: The api key you got from your provider to turn html pages into pdf
- default_options: mapping of pdf options
- shrinking | (boolean) - if set to false, smart-shrinking is dissabled
- dpi | (integer) - allows to set the dpi
- image_quality | (integer) - allows to define the image quality
- page_size | (enum) - allows to define the pdf page size -
- zoom | (float) - a float number, to zoom the page
- js_delay | (integer) - render delay in milliseconds - good to allow the load of external fonts are ajax requests to finish
Usage
Inject the Service then in the __construct of cour controller or service.
All versions of html-to-pdf-bundle with dependencies
symfony/framework-bundle Version ^6.2
guzzlehttp/guzzle Version ^6.0 | ^7.0