15 require_once
'libs/composer/vendor/autoload.php';
18 $pdf =
new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT,
true,
'UTF-8',
false);
21 $pdf->SetCreator($job->getCreator());
22 $pdf->SetAuthor($job->getAuthor());
23 $pdf->SetTitle($job->getTitle());
24 $pdf->SetSubject($job->getSubject());
25 $pdf->SetKeywords($job->getKeywords());
28 $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN,
'', PDF_FONT_SIZE_MAIN));
29 $pdf->setFooterFont(array(PDF_FONT_NAME_DATA,
'', PDF_FONT_SIZE_DATA));
30 $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
31 $pdf->SetMargins($job->getMarginLeft(), $job->getMarginTop(), $job->getMarginRight());
32 $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
33 $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
34 $pdf->SetAutoPageBreak($job->getAutoPageBreak(), $job->getMarginBottom());
35 $pdf->setImageScale($job->getImageScale());
36 $pdf->SetFont(
'dejavusans',
'', 10);
38 $pdf->setSpacesRE(
'/[^\S\xa0]/');
49 foreach ($job->
getPages() as $page) {
52 $pdf->writeHTML($page,
true,
false,
true,
false,
'');
Class ilPDFGenerationJob.
static generatePDF(ilPDFGenerationJob $job)