4 include_once(
"./Services/Preview/classes/class.ilFilePreviewRenderer.php");
30 if (self::$supported_formats == null) {
31 self::$supported_formats = explode(
",", self::SUPPORTED_FORMATS);
34 return self::$supported_formats;
42 return (PATH_TO_GHOSTSCRIPT !=
"");
57 $filepath = $obj->getFile();
70 "-dBATCH -dNOPAUSE -dSAFER -dFirstPage=1 -dLastPage=%d -sDEVICE=pngalpha -dEPSCrop -r72 -o %s %s",
79 if ($filepath != $inputFile) {
87 for (
$i = 1;
$i <= $numOfPreviews;
$i++) {
89 if (!file_exists($imagePath)) {
prepareFileForExec($filepath)
Checks whether the specified file path can be used with exec() commands.
getMaximumNumberOfPreviews()
Gets the maximum number of preview pictures per object.
Abstract parent class for all file preview renderer classes.
static isGhostscriptInstalled()
Determines whether Ghostscript is installed.
renderImages($obj)
Renders the specified object into images.
Represents an image that was created from a preview renderer and that can be further processed to cre...
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.
getSupportedFileFormats()
Gets an array containing the file formats that are supported by the renderer.
static escapeShellArg($a_arg)
static $supported_formats
Preview renderer class that is able to create previews from PDF, PS and EPS by using GhostScript...