Loading...
Skip navigation
Black Week: 25% off all TYPO3 extensions from November 23 to 30 – services and SaaS offers are excluded.
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.

Fluid FPDF Tutorial Custom Index

<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">
<fpdf:pdf>
    <fpdf:setFont family="Arial" style="" size="15" />
    <fpdf:addPage />
    <!-- Add an empty page -->
    <fpdf:addPage />
    <fpdf:bookmark title="Section 1" isUTF8="false" />
    <fpdf:cell width="0" height="6" text="Section 1" />
    <fpdf:ln height="10" />
    <fpdf:bookmark title="Subsection 1" isUTF8="false" level="1" y="-1" />
    <fpdf:cell width="0" height="6" text="Subsection 1" />
    <fpdf:ln height="50" />
    <fpdf:bookmark title="Subsection 2" isUTF8="false" level="1" y="-1" />
    <fpdf:cell width="0" height="6" text="Subsection 2" />
    <fpdf:addPage />
    <fpdf:bookmark title="Section 2" isUTF8="false" />
    <fpdf:cell width="0" height="6" text="Section 2" />
    <fpdf:ln height="10" />
    <fpdf:bookmark title="Subsection 3" isUTF8="false" level="1" y="-1" />
    <fpdf:cell width="0" height="6" text="Subsection 3" />
    <fpdf:goToPage number="1" />
    <fpdf:setXY x="10" y="20" />
    <fpdf:cell width="0" height="6" text="Index" />
    <fpdf:ln height="10" />
    <fpdf:variable.set name="indexEntries" value="{fpdf:getIndex()}" />
    <fpdf:variable.set name="indexStartX" value="30" />
    <fpdf:variable.set name="indexIndentX" value="10" />
    <f:if condition="{f:count(subject: indexEntries)}">
        <f:for each="{indexEntries}" as="indexEntry">
            <!-- Calculate x position -->
            <fpdf:variable.set name="indexEntryX" value="{fpdf:math.product(a: indexIndentX, b: indexEntry.l)}" />
            <fpdf:variable.set name="indexEntryX" value="{fpdf:math.sum(a: indexEntryX, b: indexStartX)}" />
            <!-- Calculate y position -->
            <fpdf:variable.set name="indexStartY" value="{fpdf:getY()}" />
            <fpdf:variable.set name="indexEntryY" value="{fpdf:math.sum(a: indexStartY, b: 10)}" />
            <!-- Print entry -->
            <fpdf:setXY x="{indexEntryX}" y="{indexEntryY}" />
            <fpdf:cell text="{indexEntry.t} (Seite {indexEntry.p})" align="L" width="120" />
        </f:for>
    </f:if>
    <!-- ATTENTION: Don't forget to go back to last page!!! -->
    <fpdf:goToPage />
</fpdf:pdf>
</html>
Last change: 2026-11-02
Documentation
TYPO3 Fluid-FPDF Extension

TYPO3 Fluid-FPDF - PDF by coding.ms

This extension provides a comprehensive set of PDF-ViewHelpers for working with FPDF in Fluid. By defining the fpdf namespace, you can generate PDFs directly in your own TYPO3 extensions. It also includes a built-in plugin for rendering predefined PDFs, automatically exposing all available PDF definitions. Additional features include barcode generation, text rotation, PDF/A-3b support, as well as ZUGFeRD and Factur-X compatibility (e-invoice).

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
MTJ_________KRM______
__1____Z______W___KBI
__Y___B4U___O97______
__2____M____K_____6YQ
__E_________MHG______
Dein Online-
Adventskalender
Entdecken →