Questions tagged [mpdf]

mPDF stands out as a PHP library specialized in converting HTML into PDF format, showcasing exceptional Unicode/UTF-8 and CJK support. This advanced tool is made available under the GNU General Public License, granting users permission to utilize it freely. Notably, mPDF surpasses its predecessor (the fpdf library) by enabling the inclusion of Unicode characters, a feature lacking in fpdf.

Transform a JSON dataset into a visually appealing PDF document using mPDF

My current project involves converting a JSON file to a PDF using mPDF. However, I'm encountering an issue where the JSON table is not being displayed in the HTML after running the PHP code. Instead, only one empty PDF page is generated. UPDATE: I have ma ...

Send the output of MPDF back to the browser by utilizing JSON in combination with ExtJS

I am currently using mpdf to generate a PDF report in my PHP code. I have successfully been able to save the PDF file and view it by using Output($pdfFilePath), but now I need to send it back to the browser using JSON without saving it on the server. To ac ...

Having trouble creating multiple PDFs with mPDF without having to store them on the server

I am creating several PDF files in a loop using the mPDF library. Here is a snippet of my code: for($i=0;$i<=3;$i++) { $mpdf = new mPDF(); $stylesheet = file_get_contents('style.css'); $mpdf->WriteHTML($stylesheet,1); $mpdf->Writ ...

Why is TinyMCE removing my custom MPDF HTML elements?

I have a Vue application with a Symfony backend. I am using TinyMCE to edit documents that are generated by mpdf. In the mpdf twig content, I need to add a page footer on certain pages and exclude it on others. To achieve this, I have created custom HTML t ...

Mpdf does not support inline CSS rendering

I recently implemented Mpdf into my Symfony project using Composer. The installation process involved running the following command: composer require mpdf/mpdf Next, I included the Mpdf.php file in autoload.php. Here is an example of how to use Mpdf in ...

Do not show empty pages in Mpdf display

I utilized Mpdf to generate a three-page PDF document. The first and third pages consistently contain data, but the presence of data on the second page varies. I prefer not to display the second page if it is empty. Here's the code structure: html = 'som ...