|
|
|
@ -251,8 +251,7 @@ class PDF |
|
|
|
|
//this is a chapter, print title & skip the rest |
|
|
|
|
if ($print_title) { |
|
|
|
|
$this->pdf->WriteHTML( |
|
|
|
|
'<html><body><h3>'.$html_title.'</h3></body></html>'.$page_break, |
|
|
|
|
2 |
|
|
|
|
'<html><body><h3>'.$html_title.'</h3></body></html>'.$page_break |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
continue; |
|
|
|
@ -273,8 +272,7 @@ class PDF |
|
|
|
|
//it's not a chapter but the file exists, print its title |
|
|
|
|
if ($print_title) { |
|
|
|
|
$this->pdf->WriteHTML( |
|
|
|
|
'<html><body><h3>' . $html_title . '</h3></body></html>', |
|
|
|
|
2 |
|
|
|
|
'<html><body><h3>' . $html_title . '</h3></body></html>' |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -376,12 +374,12 @@ class PDF |
|
|
|
|
$title = $filename; // Here file name is expected to contain ASCII symbols only. |
|
|
|
|
} |
|
|
|
|
if (!empty($document_html)) { |
|
|
|
|
$this->pdf->WriteHTML($document_html.$page_break, 2); |
|
|
|
|
$this->pdf->WriteHTML($document_html.$page_break); |
|
|
|
|
} |
|
|
|
|
} elseif (in_array($extension, array('jpg','jpeg','png','gif'))) { |
|
|
|
|
//Images |
|
|
|
|
$image = Display::img($file); |
|
|
|
|
$this->pdf->WriteHTML('<html><body>'.$image.'</body></html>'.$page_break, 2); |
|
|
|
|
$this->pdf->WriteHTML('<html><body>'.$image.'</body></html>'.$page_break); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -495,7 +493,7 @@ class PDF |
|
|
|
|
if (!empty($css)) { |
|
|
|
|
$this->pdf->WriteHTML($css, 1); |
|
|
|
|
} |
|
|
|
|
$this->pdf->WriteHTML($document_html, 2); |
|
|
|
|
$this->pdf->WriteHTML($document_html); |
|
|
|
|
|
|
|
|
|
if (empty($pdf_name)) { |
|
|
|
|
$output_file = 'pdf_'.date('Y-m-d-his').'.pdf'; |
|
|
|
|