dol / mpdf-bundle
This bundle integrates mPDF library into your Symfony project.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- mpdf/mpdf: ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.14
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-10-29 05:28:37 UTC
README
This bundle integrates the mPDF library in your Symfony project.
Versions and compatibilities:
Installation
Applications that use Symfony Flex
One step ! Download the Bundle
Open a command console, enter your project directory and execute:
composer require dol/mpdf-bundle
Applications that don't use Symfony Flex
1. Download the Bundle
Open a command console, enter your project directory and execute:
composer require dol/mpdf-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
2. Enable the Bundle
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = [ // ... new DoL\MpdfBundle\DoLMpdfBundle(), ]; // ... } // ... }
Usage
Get a Mpdf instance
<?php // Simple instance $mpdf = $this->get('dol_mpdf.mpdf_service')->getMpdf(); // With configuration $mpdf = $this->get('dol_mpdf.mpdf_service')->getMpdf([ 'mode' => 'utf-8', 'format' => 'A4', ]);
Reporting an issue or a feature request
Issues and feature requests are tracked in the GitHub issue tracker.
When reporting a bug, it may be a good idea to reproduce it in a basic project built using the Symfony Standard Edition to allow developers of the bundle to reproduce the issue by simply cloning it and following some steps.