41 if (!isset(self::$supported_formats)) {
42 self::$supported_formats = explode(
",", self::SUPPORTED_FORMATS);
53 return (defined(
'PATH_TO_GHOSTSCRIPT') && PATH_TO_GHOSTSCRIPT !==
"");
68 $filepath = $obj->getFile();
75 $outputFile = $output .
"_#02d.png";
81 "-dBATCH -dNOPAUSE -dSAFER -dFirstPage=1 -dLastPage=%d -sDEVICE=pngalpha -dEPSCrop -r72 -o %s %s",
90 if ($filepath !== $inputFile) {
96 $outputFile = str_replace(
"#",
"%", $outputFile);
98 for (
$i = 1;
$i <= $numOfPreviews;
$i++) {
99 $imagePath = sprintf($outputFile,
$i);
100 if (!file_exists($imagePath)) {
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareFileForExec(string $filepath)
Checks whether the specified file path can be used with exec() commands.
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getSupportedFileFormats()
Gets an array containing the file formats that are supported by the renderer.
static array $supported_formats
static isGhostscriptInstalled()
Determines whether Ghostscript is installed.
renderImages(\ilObject $obj)
Renders the specified object into images.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getMaximumNumberOfPreviews()
Gets the maximum number of preview pictures per object.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static escapeShellArg(string $a_arg)
static execQuoted(string $cmd, ?string $args=null)