PHPackages                             ftwex/fpdf-symfony2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. ftwex/fpdf-symfony2

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

ftwex/fpdf-symfony2
===================

fpdf vendor for use with symfony2, based on royopa/fpdf-symfony2

1.0(10y ago)086BSD-3PHPPHP &gt;=5.3.3

Since Jul 17Pushed 10y ago1 watchersCompare

[ Source](https://github.com/FTwex/fpdf-symfony2)[ Packagist](https://packagist.org/packages/ftwex/fpdf-symfony2)[ Docs](http://github.com/royopa)[ RSS](/packages/ftwex-fpdf-symfony2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

FPDF for use with Symfony2
==========================

[](#fpdf-for-use-with-symfony2)

Uses FPDF 1.7, tested in Symfony 2.5+

[![Build Status](https://camo.githubusercontent.com/4481f301d40e0131be70644db77490ccd4a6fce4d7dc521b1b78bd8a28276b3e/68747470733a2f2f7472617669732d63692e6f72672f46547765782f667064662d73796d666f6e79322e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/FTwex/fpdf-symfony2)[![Latest Stable Version](https://camo.githubusercontent.com/7a0cba93345bf814d5f2ac434c3dc0238514c0eeaab9955497c1ce32c45d7553/68747470733a2f2f706f7365722e707567782e6f72672f66747765782f667064662d73796d666f6e79322f762f737461626c652e737667)](https://packagist.org/packages/ftwex/fpdf-symfony2) [![Total Downloads](https://camo.githubusercontent.com/e78b87dd3e8d9013f53daec7a0154cc98ac7817cdfe68e5ea2c5d53373b4c7e0/68747470733a2f2f706f7365722e707567782e6f72672f66747765782f667064662d73796d666f6e79322f646f776e6c6f6164732e737667)](https://packagist.org/packages/ftwex/fpdf-symfony2) [![Latest Unstable Version](https://camo.githubusercontent.com/a3dabccd12d8dd57ab6e545bcdcb8876c5394e66722366dbccc8693a563f289a/68747470733a2f2f706f7365722e707567782e6f72672f66747765782f667064662d73796d666f6e79322f762f756e737461626c652e737667)](https://packagist.org/packages/ftwex/fpdf-symfony2) [![License](https://camo.githubusercontent.com/9e582542766f1ab5e8df34f8c1e469c791a5ca022c5da95f58a796c9ad4a68c5/68747470733a2f2f706f7365722e707567782e6f72672f66747765782f667064662d73796d666f6e79322f6c6963656e73652e737667)](https://packagist.org/packages/ftwex/fpdf-symfony2)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/255d5190484ec939a34d5dfb99225865fdd038f9b68a45122c689d4a06f0aa6e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66747765782f667064662d73796d666f6e79322f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ftwex/fpdf-symfony2/?branch=master)

Instalation and Usage
---------------------

[](#instalation-and-usage)

Package available on [Composer](https://packagist.org/packages/ftwex/fpdf-symfony2).

If you're using Composer to manage dependencies, you can use

```
composer require ftwex/fpdf-symfony2
```

Usage
-----

[](#usage)

```
class WelcomeController extends Controller
{
    public function indexAction()
    {
        $pdf  = new \FPDF_FPDF();
        $pdi  = new \FPDF_FPDI();

        $pdf->AddPage();
        $pdf->SetFont('Arial','B',16);
        $pdf->Cell(40,10,'Hello World!');
        $pdf->Output();
    }
}
```

FPDF
----

[](#fpdf)

FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. FPDF is a open source project: you may use it for any kind of usage and modify it to suit your needs.

-

On the fpdf homepage you will find links to the documentation, forums and so on.

Example
-------

[](#example)

See My Controller:

```
