PDF view helpers and tools used with Fluid templates in TYPO3 CMS.
-
Drop the files in typo3conf/ext/vmfds_pdf. Alternatively, do:
cd typo3conf/ext && git clone git@github.com:potofcoffee/vmfds_pdf.git
-
Create typo3conf/ext/vmfds_pdf.
-
Download mPDF and unpack the archive to typo3conf/ext/vmfds_pdf/lib/mpdf.
-
Install the extension using the extension manager.
This view helper creates a pdf file from its contents, using mPDF. Use this in your Fluid templates as follows:
{namespace vmpdf=TYPO3\VmfdsPdf\ViewHelpers}
<vmpdf:pdf [arguments]>
PDF content goes here.
</vmpdf:pdf>
Arguments for the pdf ViewHelper:
{namespace vmpdf=TYPO3\VmfdsPdf\ViewHelpers}
<vmpdf:pdf filename="" destination="" filemode="" layout="" defaultfontsize="" defaultfont="" leftmargin="" rightmargin="" topmargin="" bottommargin="" headermargin="" footermargin="" orientation="">
PDF content goes here.
</vmpdf:pdf>
The meaning of the arguments can be inferred from the mPDF documentation of mPDF() and Output().
This ViewHelper strips all http:// and trailing slashes from a url. Use this in your Fluid templates as follows:
{namespace vmpdf=TYPO3\VmfdsPdf\ViewHelpers}
<vmpdf:basicUrl url="http://my.long.url/">
This ViewHelper includes html from a remote location. Use this in your Fluid templates as follows:
{namespace vmpdf=TYPO3\VmfdsPdf\ViewHelpers}
<vmpdf:remoteContent url="http://my.external.url/">
For further information, feel free to contact christoph.fischer@volksmission.de