Skip to content

Latest commit

 

History

History
20 lines (18 loc) · 488 Bytes

how_to_customize_the_process.md

File metadata and controls

20 lines (18 loc) · 488 Bytes

How to fully customize the process?

The rasterize methods accepts a callback as the 4th parameter.

$response = new Response(
    $this->get(Rasterizer::class)->rasterize(
        $this->renderView('Bundle:Folder:template.pdf.twig'),
        [],
        [],
        function (Process $process) {
            // HERE
        }
    ),
    200, [
        'Content-Type'          => 'application/pdf',
        'Content-Disposition'   => 'attachment; filename="my.pdf"'
    ]
);