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.

Fluid FPDF ViewHelpers

fpdf:addFont

Imports a TrueType, OpenType or Type1 font and makes it available. It is necessary to generate a font definition file first with the MakeFont utility. The definition file (and the font file itself when embedding) must be present in the font directory. If it is not found, the error "Could not include font definition file" is raised.

Parameter

NameTypeDefaultDescription
familystringFont family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font.
stylestringFont style. (N: regular, B: bold, I: italic)
filenamestringThe font definition file. By default, the name is built from the family and style, in lower case with no space.

Return

void

Usage:

<fpdf:setFont family="Arial" style="B" size="10.5" />

fpdf:pdf

Creates a new PDF.

Parameter

NameTypeDefaultDescription
filenamestringFluidFpdf.pdfThe name of the file
destinationstringIDestination where to send the document. It can take one of the following values: I, D, F, S
orientationstringPDefault page orientation.
unitstringmmUser unit.
sizestringA4The size used for pages.
titlestringFluid-FpdfDefines the title of the document.
subjectstringFluid-FpdfDefines the subject of the document.
authorstringFluid-FpdfFDefines the author of the document.
keywordsstringTYPO3 Fluid FPDF typo3(at)coding(dot)msAssociates keywords with the document, generally in the form 'keyword1 keyword2 ...'.
fontPathstringEXT:fluid_fpdf/Resources/Private/FontsDefines the font path for the included fonts (for example: EXT:fluid_fpdf/Resources/Private/Fonts) or some TYPO3 path like /fileadmin/fonts/
imagePathstringEXT:fluid_fpdf/Resources/Private/ImagesDefines the image path for the included images (for example: EXT:fluid_fpdf/Resources/Private/Images) or some TYPO3 path like /fileadmin/fonts/
characterMaparrayDefines a character map, for mapping characters. For Example, for mapping €-character with character at ASCII-No. 162, use {162: '€'}

Return

void

Usage:

<fpdf:pdf>
    <fpdf:addPage orientation="P" size="A4">
        // Your PDF content...
    </fpdf:addPage>
</fpdf:pdf>

fpdf:setFont

Sets the font used to print character strings.

Parameter

NameTypeDefaultDescription
familystringArialFamily font.
stylestringNFont style. (N: regular, B: bold, I: italic, U: underline)
sizestring12Font size in points.

Return

void

Usage:

<fpdf:setFont family="Arial" style="B" size="10.5" />

fpdf:setSourceFile

Set the source file for PDF page templates.

Parameter

NameTypeDefaultDescription
filestringEXT:fluid_fpdf/Resources/Private/Pdf/TYPO3_2012-logo_sRGB_color.pdfFilename with abs path of the source

Return

int - Number of pages found in source file

Usage:

<fpdf:setSourceFile file="EXT:fluid_fpdf/Resources/Private/Pdf/Normbriefbogen_DIN5008.pdf" />

fpdf:useTemplate

Prints a PDF-Template into a page

Parameter

NameTypeDefaultDescription
pageNointThe page number
xintThe x-position
yintThe y-position
wintThe new width of the template
hintThe new height of the template
adjustPageSizebooleanfalseIf set to true the current page will be resized to fit the dimensions of the template

Return

void

Usage:

<fpdf:useTemplate pageNo="1" x="0" y="0" w="0" h="0" adjustPageSize="0" />

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
4RG_________S________
P______M____4_8___7TO
6D7___BFB___KTD______
__5____B______3___2D2
XTK___________F______