Generating PDF with MPDF from BLOB

0

Well I need to generate a PDF from a BLOB field saved in the database, my idea is to be able to upload PDF to BLOB so it does not take up disk space and make it easier to transport it.

I'm doing the following:

include("../pdf/mpdf60/mpdf.php");

$mpdf=new mPDF(); 

$mpdf->WriteHTML($registros->BLO_PDFXX_ARQUI);


$mpdf->Output();
exit;

where $registros->BLO_PDFXX_ARQUI is the code I'm trying to do. But here comes the question, with MPDF do I have to do this?

My other doubt is there is any managed one that would facilitate me in this case of BLOB content?

    
asked by anonymous 01.07.2016 / 13:27

1 answer

1

To generate PDF from an HTML code I recommend Wkhtmltopdf

link

or even simpler HTML2PDF

link

Both are practical to use and already have some examples in your package.

Any questions, I'm willing to help.

    
01.07.2016 / 15:28