https://github.com/borsaco/tcpdfbundle
A bundle to facilitate using TCPDF for PDF generation in Symfony applications
https://github.com/borsaco/tcpdfbundle
Last synced: about 2 months ago
JSON representation
A bundle to facilitate using TCPDF for PDF generation in Symfony applications
- Host: GitHub
- URL: https://github.com/borsaco/tcpdfbundle
- Owner: borsaco
- License: bsd-3-clause
- Created: 2019-07-08T16:15:49.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-15T07:37:43.000Z (almost 7 years ago)
- Last Synced: 2025-03-24T02:48:21.578Z (over 1 year ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
TCPDFBundle
=======================
This bundle facilitates easy use of the TCPDF PDF generation library in
Symfony applications.
Installation
------------
### Step 1: Setup Bundle and dependencies
```
composer require borsaco/tcpdf-bundle
```
### Step 2: Enable the bundle in the kernel
Add the bundle to the `registerBundles()` method in your kernel:
``` php
// app/AppKernel.php
container->get("tcpdf")->create();
```
From hereon in, you are using a TCPDF object to work with as normal.
Using a custom class
--------------------
If you want to use your own custom TCPDF-based class, you can use
the `class` parameter in your configuration eg in `config.yml`:
``` yaml
tcpdf:
class: 'Acme\MyBundle\MyTCPDFClass'
```
The class must extend from the `TCPDF` class; an exception will be
thrown if this is not the case.
Examples
--------
This bundle also supports Persian and Arabic languages.
see example on: https://tcpdf.org/examples/