Loading...
Skip navigation
Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.

How to pass some variables into the Footer-Template?

First you have to define the Footer-Template and pass the variables by the footerArguments Attribute.

<fpdf:pdf footerTemplate="{template.settings.footer.template}"
          footerArguments="{template.settings}">

    <fpdf:addPage />

</fpdf:pdf>

Afterwards you're able to use it in Footer-Template.

<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
      xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
      xmlns:fpdf="http://typo3.org/ns/CodingMs/FluidFpdf/ViewHelpers"
      data-namespace-typo3-fluid="true">

    <!-- Page numbers -->
    <fpdf:setFont family="Helvetica" style="{settings.footer.fontStyle}" size="{settings.footer.fontSize}" />

    <fpdf:setXY x="20" y="280" />
    <fpdf:cell width="170" text="{settings.footer.text}" align="L" border="T" height="{settings.footer.lineHeight}" />

    <fpdf:variable.set name="pages" value="Seite {fpdf:pageNo()} von |nb|" />
    <fpdf:cell text="{pages}" align="R" width="43" height="{settings.footer.lineHeight}" />

    <fpdf:setSourceFile file="{settings.backgroundPdf}" />
    <fpdf:useTemplate pageNo="1" x="0" y="0" />

</html>

In our example we have some TypoScript-Configuration, which we pass to the Fluid.

settings {
    backgroundPdf = EXT:fluid_fpdf/Resources/Private/Pdf/Normbriefbogen_DIN5008.pdf
    footer {
        template = EXT:crm/Resources/Private/Templates/Pdf/Footer.html
        text = PDF-Description
        pageNumberPrefix = Seite
        pageNumberDivider = von
        fontSize = 9
        fontStyle = N
        lineHeight = 6
    }
}
Documentation
TYPO3 Fluid-FPDF Extension

TYPO3 Fluid-FPDF

This extension provides you a complete set of ViewHelpers for dealing with FPDF by using Fluid. You can use the ViewHelpers easily in own Extensions just by defining the fpdf-Namespace. Additionally you're able to use the build in plugin, for displaying predefined PDF. This plugin offers you automatically all available PDFs.

Menu

Contact request

You can contact us at any time

Stop! Playing in the meantime?
Stop! Playing in the meantime?
Stop! Playing in the meantime?

Stop! Playing in the meantime?

Break the highscore

Press Start
Contact request
Screenreader label
Security question
976_________ME9______
__P____P____Q_4___ORA
E7O___9M6___8N4______
Y______W______B___AXT
IEH_________NLN______