padam87 / rasterize-bundle
HTML 转 PDF Symfony 扩展包。支持 Puppeteer、PhantomJS 等。
v4.3.0
2022-03-31 21:25 UTC
Requires
- php: ^8.0
- symfony/config: ^5.4|^6.0
- symfony/dependency-injection: ^5.4|^6.0
- symfony/http-kernel: ^5.4|^6.0
- symfony/process: ^5.4|^6.0
- symfony/stopwatch: ^5.4|^6.0
Requires (Dev)
- mockery/mockery: ~1.4
- phpunit/phpunit: ~9.0
README
Rasterize Bundle
一个用于使用 Puppeteer(或其他)将网页转换为位图的 Symfony2 扩展包
$response = new Response( $this->get(Rasterizer::class)->rasterize( $this->renderView('Bundle:Folder:template.pdf.twig') ), 200, [ 'Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="my.pdf"' ] );
提供者
如何...