3 require_once __DIR__ .
'/../class.ilAbstractHtmlToPdfTransformer.php';
4 require_once
'./Services/PDFGeneration/classes/class.ilPDFGenerationJob.php';
56 public function deliverPDFFromHTMLString($src,
$output, $delivery_type,
$service, $purpose)
58 $map = ilPDFGeneratorUtils::getRendererMapForPurpose(
$service, $purpose);
59 $renderer = ilPDFGeneratorUtils::getRendererInstance($map[
'selected']);
60 $config = ilPDFGeneratorUtils::getRendererConfig(
$service, $purpose, $map[
'selected']);
69 $job->setOutputMode($delivery_type);
84 if (file_exists(
$file)) {
85 if (strtoupper($delivery_type) === self::PDF_OUTPUT_DOWNLOAD) {
87 } elseif (strtoupper($delivery_type) === self::PDF_OUTPUT_INLINE) {
89 } elseif (strtoupper($delivery_type) === self::PDF_OUTPUT_FILE) {
102 $tmp_file = dirname(reset($src)) .
'/complete_pages_overview.html';
105 if (file_exists($filename)) {
106 $html_content .= file_get_contents($filename);
109 file_put_contents($tmp_file, $html_content);
static makeDirParents($a_dir)
Create a new directory and all parent directories.
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
Create styles array
The data for the language used.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
Class ilPDFGenerationJob.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.