📜  twig to pdf - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:52.508000             🧑  作者: Mango

代码示例1
// composer require knplabs/knp-snappy-bundle
// @var Knp\Snappy\Pdf
$knpSnappyPdf->generateFromHtml(
    $this->renderView(
        'MyBundle:Foo:bar.html.twig',
        array(
            'some'  => $vars
        )
    ),
    '/path/to/the/file.pdf'
);