ISO 32000 is an ISO standard for the full function PDF; the following standards are for more specialized uses. PDF/X (ISO 15930) is now the industry standard for the intermediate representation of printed material in electronic prepress systems for conventional printing applications. PDF/A (ISO 19005) is now the industry standard for the archiving of digital documents
$css = "
div.abs {
position: absolute;
line-height: " . $font_size * 3 . "mm;
text-align: center;
}
div.main {
top: " . $prizer_box[1] . "mm;
left: " . $prizer_box[0] . "mm;
width: " . $prizer_box[2] . "mm;
}
div.year {
top: " . $year_box[1] . "mm;
left: " . $year_box[0] . "mm;
width: " . $year_box[2] . "mm;
}
p.main {
font-size: " . $font_size . "mm;
font-family: romul;
text-transform: uppercase;
}
p.user {
font-size: " . $font_size * 2 . "mm;
line-height: " . $font_size * 3 . "mm;
font-family: heinrichscript;
margin: 0 0 " . $font_size * 3 . "mm 0;
}
";
$html_text = "<div class='abs main'>";
$html_text .= "<p class='main'>Награждается</p>";
$html_text .= "<p class='user'>$name<br />$surname</p>";
$html_text .= "<p class='main'>$award_title<br />$event_title</p>";
$html_text .= "</div>";
$html_text .= "<div class='abs year'><p class='main'>$year</p></div>";
$image_path = $_SERVER['DOCUMENT_ROOT'] . '/images/diploma/';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/vendor/mpdf60/mpdf.php';
$mpdf = new mPDF();
$mpdf->img_dpi = 300;
$mpdf->SetImportUse();
$mpdf->SetSourceFile($image_path . 'Diplom_' . $diploma . '.pdf');
$tmpl = $mpdf->ImportPage();
$mpdf->UseTemplate($tmpl);
$mpdf->charset_in = 'cp1251';
$mpdf->WriteHTML($css, 1);
$mpdf->WriteHTML($html_text, 2);
$mpdf->facsimile = file_get_contents($image_path . 'facsimile_600.png');
$mpdf->Image('var: facsimile', $fac_x, $fac_y, '50%', '50%');
$mpdf->Output('diploma.pdf', 'I');
header("Content-Type: application/pdf");
header("Content-Disposition:inline;filename=\"имя_файла.pdf\"");
header("Content-Transfer-Encoding: binary");