[英]Can't Open my Downloaded PDF
I have a Code Below in which it Successfully downloading a .pdf file but when i open the file it always shows an error message. 我在下面的代码中成功下载了一个.pdf文件,但是当我打开该文件时,它始终显示错误消息。 This is my Code: include("MPDF57/mpdf.php");
这是我的代码:include(“ MPDF57 / mpdf.php”);
$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
$mpdf->SetDisplayMode('fullpage');
$mpdf->showImageErrors = true;
$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
$html='<html><head></head><body>Test</body></html>'; //Assign HTML HERE
$mpdf->WriteHTML($html);
$mpdf->Output('Certificate.pdf','D');
Please do help guys, Thanks in Advance. 请帮忙,在此先感谢。
使用header(“ Content-type:application / pdf”);
试试这个..将帮助您..
http://stackoverflow.com/questions/9248510/working-with-pdf-in-php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.