DEV Community

Ahmed Nawaz Butt
Ahmed Nawaz Butt

Posted on

mpdf output document to html

mpdf output document to html

2

Can I output the mpdf document as HTML string or file instead of a pdf? It will be helpful for debugging.

Example:

$mpdf->WriteHTML($page_config_css, 1);
$mpdf->SetHTMLHeader($header_first_page);
$mpdf->WriteHTML($output_first_page);
$mpdf->SetHTMLHeader($header);
$mpdf->SetHTMLFooter($footer);
$mpdf->WriteHTML($main_content);

// Can I output it at this stage as html for inspection? 

$mpdf->Output();

Top comments (1)

Collapse
 
tselawi profile image
tariq selawi

hello,
I hope you're doing well! i have a problem for display the png image by using Mpdf library.
if you could help me

thank you
Tariq