pontedilana/php-weasyprint
Laravel-friendly PHP wrapper for WeasyPrint to render HTML/CSS into high-quality PDFs (and images) via a simple API. Ideal for invoices, reports, and templated documents, with options for assets, headers/footers, and configuration.
--info, --quiet, --verbose, --debug, --version, --no-http-redirects, --fail-on-http-errors)--attachment-relationship and --xmp-metadata options--allowed-protocols option--pdf-tags option--timeout option to the WeasyPrint command-line call by default. This improves consistency with the internal process timeout already applied by Symfony Process. If you're running WeasyPrint inside a worker, queue, or other timeout-managed environment, you can disable it using $pdf->disableTimeout() or $pdf->setTimeout(null). (#15)disableTimeout() method to easily disable the new CLI timeout behaviorsymfony/process minimal version to mitigate CVE-2024-51736srgb optionThis is a security release: php-weasyprint is based on knplabs/knp-snappy, CVE-2023-28115 has been issued for it on 2023-03-17
Full Changelog: https://github.com/pontedilana/php-weasyprint/compare/0.11.0...0.12.0
Full Changelog: https://github.com/pontedilana/php-weasyprint/compare/0.10.1...0.11.0
onlyMethods()Removed --format option default value, this option was deprecated in WeasyPrint 53 and removed in WeasiPrint 54.
If you still use WeasyPrint 52 or lower you can set this option back with ->setOption():
$weasyprint = new \Pontedilana\PhpWeasyPrint\Pdf('/usr/local/bin/weasyprint');
$weasyprint->setOption('format', 'pdf');
--format option in Pdf class which is deprecated in WeasyPrint 53 and removed in WeasyPrint 54First public release
How can I help you explore Laravel packages today?