2017 © Pedro Peláez
 

library fpdf-symfony2

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

image

ftwex/fpdf-symfony2

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

  • Wednesday, February 3, 2016
  • by ftwex
  • Repository
  • 1 Watchers
  • 0 Stars
  • 60 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 18 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

FPDF for use with Symfony2

Uses FPDF 1.7, tested in Symfony 2.5+, (*1)

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality, (*2)

Instalation and Usage

Package available on Composer., (*3)

If you're using Composer to manage dependencies, you can use, (*4)

composer require ftwex/fpdf-symfony2

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 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., (*5)

  • http://www.fpdf.org/

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

Example

See My Controller:, (*7)

<?php

namespace Acme\DemoBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

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

        //my code...

        return new Response($pdf->Output( 'MyPDF.pdf', 'I'), 200, array('Content-Type' => 'application/pdf'));
    }
}

The Versions

03/02 2016

dev-master

9999999-dev http://github.com/FTwex

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

  Sources   Download

BSD-3

The Requires

  • php >=5.3.3

 

The Development Requires

by Florian Toueix

symfony fpdf

17/07 2015

1.0

1.0.0.0 http://github.com/royopa

fpdf vendor for use with symfony2, based on toooni/fpdf

  Sources   Download

BSD-3

The Requires

  • php >=5.3.3

 

The Development Requires