Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.14 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.14 KB

FPDF for use with Symfony2

Uses FPDF 1.7, tested in Symfony 2.5+

Instalation and Usage

Package available on Composer.

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

$ composer require "royopa/fpdf-symfony2": "dev-master"

Or

You can include the following in your composer.json file:

{
    "require": {
        "royopa/fpdf-symfony2": "dev-master"
    }
}

Setup

And those to app/autoload.php:

$classMap = array(
    'Fpdf_' => __DIR__.'/../vendor/royopa/fpdf-symfony2/lib/FPDF/FPDF.php',
    'Fpdi_' => __DIR__.'/../vendor/royopa/fpdf-symfony2/lib/FPDF/FPDI.php'
);
$loader->addClassMap($classMap);    

Usage

  $pdf  = new \FPDF_FPDF();
  $pdi  = new \FPDF_FPDI();	

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.