Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

twig to pdf

// composer require knplabs/knp-snappy-bundle
// @var KnpSnappyPdf
$knpSnappyPdf->generateFromHtml(
    $this->renderView(
        'MyBundle:Foo:bar.html.twig',
        array(
            'some'  => $vars
        )
    ),
    '/path/to/the/file.pdf'
);
Source by github.com #
 
PREVIOUS NEXT
Tagged: #twig #pdf
ADD COMMENT
Topic
Name
7+4 =