Recommend this page to a friend!
  Classes of Rafael Espinosa  >  mPDF Wrapper  >  >  Download  
Role: Documentation
Content type: text/markdown
Description: Auxiliary data
Class: mPDF Wrapper
Compose and generate PDF documents using mPDF
Author: By
Last change:
Date: 5 years ago
Size: 1,104 bytes



Class file image Download


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();

For more information send a message to info at phpclasses dot org.