padam87/rasterize-bundle

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

v3.0.0 2017-12-13 20:36 UTC

README

Build Status Scrutinizer Code Quality Coverage Status SensioLabsInsight

License Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads

Rasterize Bundle

A bundle to rasterize web pages with PhantomJS for Symfony2

$response = new Response(
    $this->get('padam87_rasterize.rasterizer')->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...