41 if (!isset(self::$supported_formats)) {
42 self::$supported_formats = explode(
",", self::SUPPORTED_FORMATS);
45 return 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)) {
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 isGhostscriptInstalled()
Determines whether Ghostscript is installed.
renderImages(\ilObject $obj)
Renders the specified object into images.
static escapeShellArg(string $a_arg)
static array $supported_formats
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static execQuoted(string $cmd, ?string $args=null)
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
prepareFileForExec(string $filepath)
Checks whether the specified file path can be used with exec() commands.
getSupportedFileFormats()
Gets an array containing the file formats that are supported by the renderer.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...