2017 © Pedro Peláez
 

library fpdf-symfony2

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

image

royopa/fpdf-symfony2

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

  • Thursday, March 1, 2018
  • by royopa
  • Repository
  • 4 Watchers
  • 20 Stars
  • 57,369 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 18 Forks
  • 0 Open issues
  • 4 Versions
  • 10 % Grown

The README.md

FPDF for use with Symfony

Uses FPDF 1.8 and FPDI 2.3, tested in Symfony 2+ and 3+, (*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 royopa/fpdf-symfony2

Usage

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

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

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

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

My Controller:, (*7)

<?php

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;


class DefaultController extends Controller
{
    /**
     * @Route("/", name="homepage")
     */
    public function indexAction(Request $request)
    {
        $pdf = new \FPDF();

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

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

The Versions

01/03 2018

dev-master

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

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

  Sources   Download

MIT BSD-3

The Requires

 

The Development Requires

01/03 2018

3.0

3.0.0.0 http://github.com/royopa

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

  Sources   Download

MIT

The Requires

 

The Development Requires

17/08 2016

2.0

2.0.0.0 http://github.com/royopa

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

  Sources   Download

BSD-3

The Requires

 

The Development Requires

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