padam87/rasterize-bundle

HTML 转 PDF Symfony 扩展包。支持 Puppeteer、PhantomJS 等。

安装量: 73,266

依赖者: 0

建议者: 0

安全: 0

星标: 14

关注者: 3

分支: 7

公开问题: 0

类型:symfony-bundle

v4.3.0 2022-03-31 21:25 UTC

README

CI status

License Latest Stable Version Total Downloads Monthly Downloads

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"'
    ]
);

安装

配置参考

提供者

如何...