pontedilana/php-weasyprint
PhpWeasyPrint is a PHP wrapper for WeasyPrint that generates PDFs from URLs or HTML. Inspired by Snappy and built as a drop-in replacement, it offers a strictly typed GeneratorInterface and requires PHP 8.3+ plus WeasyPrint 60 or greater.
--output-intent optionhttp, https by default, configurable via the new $allowedSchemes constructor argument)removeTemporaryFiles() now only deletes files located inside the temporary folderphar:// checkbuildCommand() now verifies the binary is executable on the unescaped path and shell-escapes it before usesymfony/process minimal version to mitigate CVE-2026-24739--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?