Download the PHP package massive/pdf-bundle without Composer
On this page you can find all versions of the php package massive/pdf-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package pdf-bundle
MassivePdfBundle
Built upon KnpSnappyBundle: https://github.com/KnpLabs/KnpSnappyBundle
Installation
Install the bundle with composer.
Add bundle to your symfony kernel.
Install wkhtmltopdf
Ubuntu
MacOSX
http://wkhtmltopdf.org/downloads.html
Configure Knp Snappy Bundle**
See KnpSnappyBundle for configuration.
Usage
Controller Trait
The controller trait is the easiest way to generate a pdf:
Register the route with default _format
as pdf
:
Now you can access the pdf with /your
or use /your.html
to get a html response (good for development).
Generate Pdf
Embedding local assets
The local_asset
avoids doing a http request by using file://
instead of https://
for performance improvement:
This will only work when $request->getRequestFormat()
will return pdf
and not html
.
If you want to force using file://
set the second parameter to true:
All versions of pdf-bundle with dependencies
knplabs/knp-snappy-bundle Version ^1.4
twig/twig Version ^1.0 || ^2.0 || ^3.0
symfony/http-kernel Version ^3.4 || ^4.0 || ^5.0 || ^6.0
symfony/http-foundation Version ^3.4 || ^4.0 || ^5.0 || ^6.0
symfony/config Version ^3.4 || ^4.0 || ^5.0 || ^6.0
symfony/dependency-injection Version ^3.4 || ^4.0 || ^5.0 || ^6.0
symfony/framework-bundle Version ^3.4 || ^4.0 || ^5.0 || ^6.0