PHP Classes

mPDF Wrapper: Compose and generate PDF documents using mPDF

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 521 All time: 5,667 This week: 268Up
Version License PHP version Categories
mpdf-wrapper 0.1MIT/X Consortium ...5.4HTML, PHP 5, Files and Folders
Description Author

This package can compose and generate PDF documents using mPDF.

It can create an instance of the mPDF class and set or get several document parameters using setter and getter functions, like for the document format, margins, orientation and default font.

The provider class can also set some document parameters defined as HTML like a CSS stylesheet, or get the mPDF instance object so you can add content as HTML blocks directly to the document.

Picture of Rafael Espinosa
  Performance   Level  
Name: Rafael Espinosa <contact>
Classes: 6 packages by
Country: Cuba Cuba
Age: 34
All time rank: 19876 in Cuba Cuba
Week rank: 523 Up4 in Cuba Cuba Up
Innovation award
Innovation award
Nominee: 1x



mPDF wrapper. Check mPDF website for further details

Using in Symfony2

Add the bridge classes to container config.

mPDF container config

    <parameter key="fluency_office.mpdf.factory.class">Fluency\Bridge\MPdf\MPdfFactory</parameter>
    <parameter key="fluency_office.mpdf.provider.class">Fluency\Bridge\MPdf\MPdfProvider</parameter>

    <service id="fluency_office.mpdf.factory" class="%fluency_office.mpdf.factory.class%"/>
    <service id="fluency_office.mpdf.provider" class="%fluency_office.mpdf.provider.class%">
        <argument type="service" id="fluency_reports.mpdf.factory" />
    <service id="mpdf.factory" alias="fluency_office.mpdf.factory"/>
    <service id="mpdf.provider" alias="fluency_office.mpdf.provider"/>

Generate PDF files from controllers.

$mpdf = $this->get('mpdf.provider');
    'Some HTML Text or $this->render(your_twig_view)->getContent()'
return $mpdf->getMPdfResponse();
  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. Auxiliary data
Accessible without login Plain text file Doc. Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageMPdf (2 files)

  Files folder image Files  /  src  /  MPdf  
File Role Description
  Plain text file MPdfFactory.php Class Class source
  Plain text file MPdfProvider.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,667
This week:268Up
For more information send a message to info at phpclasses dot org.