An open API service indexing awesome lists of open source software.

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

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/