4 include_once(
"./Services/Preview/classes/class.ilFilePreviewRenderer.php");
30 if (self::$supported_formats == null)
31 self::$supported_formats = explode(
",", self::SUPPORTED_FORMATS);
33 return self::$supported_formats;
41 return (PATH_TO_GHOSTSCRIPT !=
"");
56 $filepath = $obj->getFile();
63 $outputFile =
$output .
"_#02d.png";
69 "-dBATCH -dNOPAUSE -dSAFER -dFirstPage=1 -dLastPage=%d -sDEVICE=pngalpha -dEPSCrop -r72 -o %s %s",
77 if ($filepath != $inputFile)
82 $outputFile = str_replace(
"#",
"%", $outputFile);
84 for ($i = 1; $i <= $numOfPreviews; $i++)
86 $imagePath = sprintf($outputFile, $i);
87 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.
static execQuoted($cmd, $args=NULL)
exec command and fix spaces on windows
renderImages($obj)
Renders the specified object into images.
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
Represents an image that was created from a preview renderer and that can be further processed to cre...
Create styles array
The data for the language used.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable 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...