padam87/rasterize-bundle

A bundle to rasterize web pages with PhantomJS for Symfony2

v1.2.0 2016-02-04 14:52 UTC

README

Build Status Scrutinizer Code Quality Coverage Status SensioLabsInsight

License Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads

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

How to...