padam87/rasterize-bundle

HTML to PDF Symfony bundle. Works with Puppeteer, PhantomJS, and more.

Installs: 72 257

Dependents: 0

Suggesters: 0

Security: 0

Stars: 13

Watchers: 3

Forks: 7

Open Issues: 1

Type:symfony-bundle

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

README

CI status

License Latest Stable Version Total Downloads Monthly Downloads

Rasterize Bundle

A bundle to rasterize web pages with Puppeteer (or other) for 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"'
    ]
);

Installation

Configuration reference

Providers

How to...