baldeweg / pdf-bundle
Offers tools for creating pdf files.
Installs: 101
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- doctrine/orm: ^2.9
- erusev/parsedown: ^1.7
- symfony/config: ^5.4|^6.0
- symfony/console: ^5.4|^6.0
- symfony/dependency-injection: ^5.4|^6.0
- symfony/form: ^5.4|^6.0
- symfony/framework-bundle: ^5.4|^6.0
- symfony/http-foundation: ^5.4|^6.0
- symfony/http-kernel: ^5.4|^6.0
- symfony/options-resolver: ^5.4|^6.0
- symfony/security-bundle: ^5.4|^6.0
- symfony/twig-bundle: ^5.4|^6.0
- symfony/yaml: ^5.4|^6.0
- tecnickcom/tcpdf: ^6.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.1
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^9.5
- rector/rector: ^0.13
- symfony/browser-kit: ^5.4|^6.0
- symfony/maker-bundle: ^1.34
- symfony/var-dumper: ^5.4|^6.0
README
Offers tools for creating pdf files.
Getting Started
composer req baldeweg/pdf-bundle
Activate the bundle in your config/bundles.php
, if not done automatically.
Baldeweg\Bundle\PdfBundle\BaldewegPdfBundle::class => ['all' => true],
Usage
use Baldeweg\Bundle\PdfBundle\Pdf; $pdf = new Pdf(); $pdf->create($path, $filename, $content, $meta);
Template
With the default template the meta
field should look like the following. You are free to overwrite this template (with @BaldewegPdf
prefix) as documented at https://symfony.com/doc/current/bundles/override.html#override-templates. When using a base64 encoded image remove data:image/png;base64,
, instead the string must start with an @
.
sender: - name - street - zip - city receiver: - name - street - zip, city details: - name: date value: 01.01.2021 subject: - subject 1 - subject 2 salutation: Dear Jane, valediction: Greetings signee: - John logo: url