Loading...
Navigation überspringen
Bitte beachte, dass sich diese Dokumentation auf die neuste Version dieser Erweiterung bezieht. Wenn eine ältere Version eingesetzt wird, kann diese abweichen. Die jeweils passende Dokumentation befindet sich im Dokumentation-Verzeichnis der Erweiterung.

How to use your own fonts in PDF

For using your own fonts in Fluid-FPDF, you need to convert the fonts into a special format.

The FPDF-Website supports a small Converting-Tool: http://www.fpdf.org/makefont/

Fluid-FPDF Font-Converting Tool

Just choose your TTF-File and select the required encoding (for example ISO-8859-15). The result are two files - onephp-File and one z-File.

Fluid-FPDF Font-Converting Result

For example, you want to convert the Ubuntu-Font which is available on Google-Webfonts. You need the regular and boldfont. Downloaded you receive the following files:

  • Ubuntu-Regular.ttf
  • Ubuntu-Bold.ttf

Once converted, you have these files:

  • Ubuntu-Regular.php
  • Ubuntu-Regular.z
  • Ubuntu-Bold.php
  • Ubuntu-Bold.z

Follow the next steps, in order to use the font:

  1. Upload these two file into your TYPO3-Installation
  2. Define the new Fontpath in fpdf:pdf
  3. Add fonts with the fpdf:addFont
  4. Set the required font
  5. Write your text
<fpdf:pdf fontPath="EXT:theme_bootstrap4/Resources/Private/Fonts">
    <!-- Add required Fonts -->
    <fpdf:addFont family="Ubuntu" style="N" filename="Ubuntu-Regular.php" />
    <fpdf:addFont family="Ubuntu" style="B" filename="Ubuntu-Bold.php" />
    <fpdf:addPage orientation="P" size="A4">
        <!-- Set font -->
        <fpdf:setFont family="Ubuntu" style="N" size="12" />
        <!-- Write your text -->
        <fpdf:multiCell width="100" height="5" text="Hello world" />
        <f:comment>
            // Your PDF content...
        </f:comment>
    </fpdf:addPage>
</fpdf:pdf>

Notice:

You need some support by converting your font? Get in contact with us: typo3(at)coding(dot)ms

Dokumentation
TYPO3 Fluid-FPDF Erweiterung

TYPO3 Fluid-FPDF by coding.ms

Diese Extension bietet einen umfangreichen Satz an ViewHelpern zur Arbeit mit FPDF in Fluid. Nach Einbindung des fpdf-Namespaces kannst Du PDFs direkt in eigenen TYPO3-Extensions erzeugen. Zusätzlich steht ein integriertes Plugin zur Ausgabe vordefinierter PDFs bereit, das verfügbare PDF-Definitionen automatisch bereitstellt. Unterstützt werden außerdem Barcode-Generierung, Text-Rotation, PDF/A-3b sowie ZUGFeRD und Factur-X (E-Rechnung).

Menü

Kontaktanfrage

Du kannst uns jederzeit kontaktieren

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
FUP_________ZCJ______
H_T____L____1_G___4U3
DOA___DUZ___783______
Y_1____2______B___Y1O
YMN_________XQS______