24 include_once
"./Services/PDF/classes/class.ilHTMLToPDFTransformer.php";
42 $this->wkhtmltopdf = $this->setting->get(
"path_to_wkhtml");
48 $singleargs = array();
49 foreach ($this->setting->getAll() as
$arg => $value)
51 if (strpos($arg,
'args_') === 0)
55 if (strpos($value,
'--') === 0)
57 array_push($singleargs, $value);
61 $args[
'--'.preg_replace(
'/_/',
'-', substr($arg, 5))] = $value;
67 foreach ($args as $key => $value)
69 $args_string .= $key .
' ' .
'"' . $value .
'"' .
' ';
71 if (count($singleargs)) $args_string .= join($singleargs,
' ');
79 include_once
"./Services/Utilities/classes/class.ilUtil.php";
83 $fp = fopen($html_file,
"w"); fwrite($fp, $a_string); fclose($fp);
92 $args = $this->
getArgs() .
" $html_file $pdf_file";
100 include_once
"./Services/Utilities/classes/class.ilUtil.php";
104 $fp = fopen($html_file,
"w"); fwrite($fp, $a_string); fclose($fp);
113 $args = $this->
getArgs() .
" $html_file $pdf_file";
116 if (!rename($pdf_file, $a_target))
118 $ilLog->write(
"Could not rename $pdf_file to $a_target\n");
125 include_once
"./Services/Utilities/classes/class.ilUtil.php";
127 $args = $this->
getArgs() .
" $html_file $pdf_file";
136 include_once
"./Services/Utilities/classes/class.ilUtil.php";
138 $args = $this->
getArgs() .
" $a_source $temp_file";
140 if (!rename($temp_file, $a_target))
142 $ilLog->write(
"Could not rename $temp_file to $a_target\n");