bithost-gmbh / pdfviewhelpers

TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents.
GNU General Public License v3.0
44 stars 19 forks source link
fluid fluid-viewhelpers fpdi hacktoberfest pdf pdf-generation tcpdf typo3 typo3-cms-extension viewhelper viewhelpers

TYPO3 TYPO3 Build Status Packagist Downloads Donate

TYPO3 CMS Extension pdfviewhelpers

Introduction

This is a TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents. Using the ViewHelpers from this extension you can make any Fluid template into a PDF document. The extension pdfviewhelpers is using TCPDF and FPDI for the PDF generation.

Key features

Support Development

With the extension pdfviewhelpers we try to take the pain out of creating PDF documents. We aim at providing the best service possible by constantly improving the extension and responding fast to bug reports. We do this fully free of cost, mostly because we love to code and share. However we are still human and have human needs like food, shelter and beer. So if you feel like this extension was useful to you and saved you and your business some precious time, please consider making a donation to support its maintenance and further development.

PayPal

Links

Topic Link
Bug Tracker https://github.com/bithost-gmbh/pdfviewhelpers/issues
Git Repository https://github.com/bithost-gmbh/pdfviewhelpers
TER https://typo3.org/extensions/repository/view/pdfviewhelpers
Packagist https://packagist.org/packages/bithost-gmbh/pdfviewhelpers
Full Documentation https://docs.typo3.org/p/bithost-gmbh/pdfviewhelpers/master/en-us/
Changelog https://github.com/bithost-gmbh/pdfviewhelpers/blob/master/CHANGELOG.md
Sponsoring PayPal
Contact @maechler, @macjohnny, https://www.bithost.ch/kontakt/

Example

Fluid Template

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
      xmlns:pdf="http://typo3.org/ns/Bithost/Pdfviewhelpers/ViewHelpers"
      xsi:schemaLocation="http://typo3.org/ns/Bithost/Pdfviewhelpers/ViewHelpers https://pdfviewhelpers.bithost.ch/schema/3.0.xsd"
      data-namespace-typo3-fluid="true">

<pdf:document outputDestination="inline" title="Bithost Example">
    <pdf:header>
        <pdf:image src="https://github.com/bithost-gmbh/pdfviewhelpers/raw/main/EXT:pdfviewhelpers/Resources/Public/Examples/BasicUsage/logo.png" width="40" />
        <pdf:text alignment="right" color="#8C8C8C" paragraphSpacing="0" posY="15">
            Bithost GmbH
            Milchbuckstrasse 83
            CH-8057 Zürich

            hallo@bithost.ch
            044 585 28 20

            www.bithost.ch
        </pdf:text>
    </pdf:header>
    <pdf:footer>
        <pdf:graphics.line style="{color: '#8C8C8C'}" />
        <pdf:text color="#8C8C8C">Page {pdf:getPageNumberAlias()}</pdf:text>
        <pdf:text alignment="right" color="#8C8C8C" posY="-13.5">EXT:pdfviewhelpers - Basic usage example</pdf:text>
    </pdf:footer>

    <pdf:page>
        <pdf:text posY="50" padding="{bottom: 4}" color="#8C8C8C">
            Zurich, <f:format.date format="d.m.Y" >now</f:format.date>
        </pdf:text>
        <pdf:headline>Welcome to the extension pdfviewhelpers</pdf:headline>
        <pdf:text>Lorem ipsum [..] diam voluptua:</pdf:text>
        <pdf:headline>Some more information</pdf:headline>

        <pdf:multiColumn>
            <pdf:column width="55%">
                <pdf:text>
                    Lorem ipsum [..] voluptua:
                </pdf:text>
                <pdf:list listElements="{0: 'Full Stack Application Development', 1: 'Modernizing, Refactoring [..]'}" />
                <pdf:text>
                    Lorem ipsum [..] sit amet.
                </pdf:text>
            </pdf:column>
            <pdf:column width="45%" padding="{left: 2}">
                <pdf:image src="https://github.com/bithost-gmbh/pdfviewhelpers/raw/main/EXT:pdfviewhelpers/Resources/Public/Examples/BasicUsage/Bithost.jpg" link="https://bithost.ch/" />
                <pdf:text padding="{top: 1}" color="#8C8C8C">Esteban Gehring, Markus Mächler</pdf:text>
            </pdf:column>
        </pdf:multiColumn>

        <pdf:text>Lorem ipsum [..] sit amet.</pdf:text>
        <pdf:text>Lorem ipsum [..] sit amet.</pdf:text>
    </pdf:page>
</pdf:document>

</html>

PDF Output

Example PDF output