I'm using the mpdf
library to try to display in pdf
a file created in php
but I'm having trouble doing the same thing, I think the way I'm trying is not the correct one.
The file php
contains php
and html
in its structure and it will not be possible to be different, but if this is a hindrance to the operation I would also like some guidance.
What I have is this:
define('MPDF_PATH', 'class/mpdf/'); // include(MPDF_PATH.'mpdf.php'); include('../_comp/externos/mpdf60/mpdf.php'); $mpdf = new mPDF(); $mpdf->WriteHTML('Hello World'); $mpdf->Output(); exit();
Where is the:
$mpdf->WriteHTML('Hello World');
I tried to include an include, but it did not work, then I tried an iframe, but nothing too.
I tried to use file_get_contents () as suggested, but the return is that.