.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../Includes.txt
.. _standalonerendering:
Standalone Rendering
====================
It is possible to render a PDF document as standalone view. That is especially useful if you want to attach the document to an email or you want to generate multiple PDFs in one request.
.. _standalonerendering_php:
PHP
---
::
setFormat('html');
$standaloneView->setTemplatePathAndFilename($templatePath);
$standaloneView->assignMultiple(['someVariable' => 'someValue']);
$pdf = $standaloneView->render(); //return pdf as string, or simply save to file system
.. _standalonerendering_fluidreturnstring:
Fluid Template - return PDF as String
-------------------------------------
::
{namespace pdf=Bithost\Pdfviewhelpers\ViewHelpers}
Your content - {someVariable}
.. _standalonerendering_fluidreturnemail:
Fluid Template - return PDF as base64 mime multi-part email attachment (RFC 2045)
---------------------------------------------------------------------------------
::
{namespace pdf=Bithost\Pdfviewhelpers\ViewHelpers}
Your content - {someVariable}
.. _standalonerendering_fluidsavefile:
Fluid Template - save PDF to file
---------------------------------
::
{namespace pdf=Bithost\Pdfviewhelpers\ViewHelpers}
Your content - {someVariable}