Revision fb2c3df2
Von Jan Büren vor mehr als 3 Jahren hinzugefügt
SL/Controller/File.pm | ||
---|---|---|
|
||
my $size = $params{size} // 64;
|
||
my $sfile = SL::SessionFile::Random->new();
|
||
my $command = 'pdftoppm -singlefile -scale-to ' . $size . ' -png' . ' ' . $filename . ' ' . $sfile->file_name;
|
||
unless (-f $filename) {
|
||
$::lxdebug->message(LXDebug::WARN(), "_convert_pdf_to_png failed, no file found: $filename");
|
||
return;
|
||
}
|
||
# quotemeta for storno case "storno\ zu\ 1020" *nix only
|
||
my $command = 'pdftoppm -singlefile -scale-to ' . $size . ' -png' . ' ' . quotemeta($filename) . ' ' . $sfile->file_name;
|
||
|
||
if (system($command) == -1) {
|
||
$::lxdebug->message(LXDebug::WARN(), "SL::File::_convert_pdf_to_png: system call failed: " . $ERRNO);
|
||
... | ... | |
}
|
||
if ($CHILD_ERROR) {
|
||
$::lxdebug->message(LXDebug::WARN(), "SL::File::_convert_pdf_to_png: pdftoppm failed with error code: " . ($CHILD_ERROR >> 8));
|
||
$::lxdebug->message(LXDebug::WARN(), "SL::File::_convert_pdf_to_png: File: $filename");
|
||
return;
|
||
}
|
||
|
Auch abrufbar als: Unified diff
_convert_pdf_to_png: Mehr Warnungen - quotemeta für Dateinamen mit whitespace