40 $gui->addConfigForm($form);
53 $gui->populateForm($form, $this->config);
65 return $gui->validateForm();
77 return $gui->getConfigFromForm($form);
100 file_put_contents($html_file, implode(
'', $job->getPages()));
128 if (is_array($a_path_to_file)) {
129 $files_list_as_string =
' ';
130 foreach ($a_path_to_file as $file) {
131 if (file_exists($file)) {
132 $files_list_as_string .=
' ' . $files_list_as_string;
137 if (file_exists($a_path_to_file)) {
151 $log = $DIC[
'ilLog'];
154 $args =
$config->getCommandLineConfig() .
' ' . $a_path_to_file .
' ' . $temp_file . $this->
redirectLog();
157 $log->debug(
'ilWebkitHtmlToPdfTransformer command line config: ' . $args);
158 foreach ($return_value as $key => $value) {
159 $log->debug(
'ilWebkitHtmlToPdfTransformer return value line ' . $key .
' : ' . $value);
161 if (file_exists($temp_file)) {
162 $log->debug(
'ilWebkitHtmlToPdfTransformer file exists: ' . $temp_file .
' file size is :' . filesize($temp_file) .
' bytes, will be renamed to ' . $a_target);
163 rename($temp_file, $a_target);
165 $log->info(
'ilWebkitHtmlToPdfTransformer error: ' . print_r($return_value,
true));
167 unlink($a_path_to_file);
183 return $redirect_log =
' 2>&1 ';
192 $backupStyle =
$config->getOverwriteDefaultFont(
true);
193 $originalFile = file_get_contents($a_path_to_file) . $backupStyle;
194 file_put_contents($a_path_to_file, $originalFile);
runCommandLine($a_path_to_file, $a_target, $config)
getDefaultConfig($service, $purpose)
generatePDF($service, $purpose, $config, $job)
getConfigFromForm(ilPropertyFormGUI $form, $service, $purpose)
populateConfigElementsInForm(ilPropertyFormGUI $form, $service, $purpose, $config)
getTempFileName($file_type)
addConfigElementsToForm(ilPropertyFormGUI $form, $service, $purpose)
static execQuoted($cmd, $args=null)
exec command and fix spaces on windows
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
static getInstance()
Singleton: get instance.
__construct($phpunit=false)
ilWkhtmlToPdfRenderer constructor.
createPDFFileFromHTMLFile($a_path_to_file, $config, $job)
prepareGenerationRequest($service, $purpose)
appendDefaultFontStyle($a_path_to_file, $config)
validateConfigInForm(ilPropertyFormGUI $form, $service, $purpose)
const RENDER_SVG_AS_XML_EMBED