Download the PHP package mfabdelaziz/weasyprint-bundle without Composer
On this page you can find all versions of the php package mfabdelaziz/weasyprint-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mfabdelaziz/weasyprint-bundle
More information about mfabdelaziz/weasyprint-bundle
Files in mfabdelaziz/weasyprint-bundle
Package weasyprint-bundle
Short Description Cmreate PDF in Symfony by converting Twig/HTML templates.
License MIT
Informations about the package weasyprint-bundle
WeasyPrintBundle
PhpWeasyPrint is a PHP (7.4+) wrapper for WeasyPrint PDF generator. It allows you to generate PDF files from HTML string or URL.
The WeasyPrintBundle provides a simple integration for your Symfony project.
This bundle is massively inspired by KnpLabs/KnpSnappyBundle, of which it aims to be a one-to-one substitute
Installation
With composer, require:
composer require pontedilana/weasyprint-bundle
Then enable it in your kernel (a flex recipe is coming soon):
Configuration
If you need to change the binaries, change the instance options or even disable one or both services, you can do it through the configuration.
If you want to change temporary folder which is by default, you can use
You can also configure the timeout used by the generators with process_timeout
:
Usage
The bundle registers two services:
- the
weasyprint.pdf
service allows you to generate pdf files. - the
weasyprint.image
service allows you to generate images (works only with WeasyPrint 52.5 or lower);
Generate a pdf document from a URL
Generate a pdf document from a twig view
Render a pdf document as response from a controller
Render a pdf document with a relative url inside like css files or images
Credits
WeasyPrintBundle and PhpWeasyPrint has been developed by Pontedilana.
SnappyBundle has been developed by KnpLabs.
All versions of weasyprint-bundle with dependencies
pontedilana/php-weasyprint Version ^0.10 || ^0.11 || ^1.0
symfony/framework-bundle Version ^4.4 || ^5.4 || ^6.0