38 lines
813 B
PHP
38 lines
813 B
PHP
<?php
|
|
|
|
$html = str_replace($varList,$valueList,$html);
|
|
|
|
include("../mpdf60/mpdf.php");
|
|
$mpdf=new mPDF();
|
|
$mpdf->SetProtection(array("print"));
|
|
$mpdf->defaultfooterline = 0;
|
|
$mpdf->setFooter("Page {PAGENO} of {nb}");
|
|
$mpdf->WriteHTML($html);
|
|
/*
|
|
if(isset($deletionArray) && !empty($deletionArray)){
|
|
foreach($deletionArray as $key=>$value){
|
|
@unlink($value);
|
|
}
|
|
}
|
|
|
|
*/
|
|
|
|
$mpdf->Output($file_name);
|
|
|
|
|
|
|
|
$fullPath = $file_name;
|
|
|
|
header("Cache-Control: public");
|
|
header("Content-Description: File Transfer");
|
|
header('Content-disposition: attachment;filename='.basename($fullPath));
|
|
header("Content-Type: application/pdf");
|
|
header("Content-Transfer-Encoding: Binary");
|
|
header('Content-Length: '. filesize($fullPath));
|
|
ob_implicit_flush(true);
|
|
ob_clean();
|
|
flush();
|
|
readfile($fullPath);
|
|
@unlink($fullPath);
|
|
exit;
|
|
?>
|