Pdf generation for various usages

Installs: 122

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 1


11.5.3 2023-07-28 08:32 UTC

This package is auto-updated.

Last update: 2024-06-28 10:26:48 UTC


TYPO3 Extension pb_pdf

1 Description

Pdf generation for various usages

2 Installation

Installation using Composer

The recommended way to install the extension is using composer.

Run the following command within your Composer based TYPO3 project:

composer require peterbenke/pb-pdf

Installation as extension from TYPO3 Extension Repository (TER)

Download and install the extension with the extension manager module.

3 Usage

Php file

namespace [YourVendor]\[YourExtension]\[...];

use PeterBenke\Pdf\Service\PdfService;
use TYPO3\CMS\Core\Utility\GeneralUtility;

class YourClass

  public function yourFunction()
    $absoluteJobPdfPath = '/var/www/html/fileadmin/user_upload/your-pdf-file.pdf';
    $assign = [];
    // Create instance
    /** @var PdfService $pdfService */
    $pdfService = GeneralUtility::makeInstance(
        'your_extension_key', // extension key
        '/Resources/Private/Templates/Pdf/your-template.html', // template path
        $absoluteJobPdfPath,  // absolute! pdf path to pdf file
        null,                 // tmp directory, if empty => '/tmp' will be set
        $assign               // optional assign array (fluid)
    // Create pdf file
    }catch(Exception $e){
        echo $e->getMessage();



	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="[absolute_path_to_css_file]" />