Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Impl #259 : if windows OS , alternative unoconv call.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Sep 25, 2013
1 parent 097f1d1 commit 057fa15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/plugins/editor.imagick/class.IMagickPreviewer.php
Expand Up @@ -243,8 +243,11 @@ public function generateJpegsCallback($masterFile, $targetFile)
if ($unoconv !== false && in_array(strtolower($extension), $officeExt)) {
$unoDoc = str_replace(".jpg", "_unoconv.pdf", $tmpFileThumb);
if (!is_file($tmpFileThumb)) {
// Create PDF Version now
$unoconv = "HOME=/tmp ".$unoconv." --stdout -f pdf ".escapeshellarg($masterFile)." > ".escapeshellarg(basename($unoDoc));
if (stripos(PHP_OS, "win") === 0) {
$unoconv = $this->pluginConf["UNOCONV"]." -o ".escapeshellarg(basename($unoDoc))." -f pdf ".escapeshellarg($masterFile);
} else {
$unoconv = "HOME=/tmp ".$unoconv." --stdout -f pdf ".escapeshellarg($masterFile)." > ".escapeshellarg(basename($unoDoc));
}
exec($unoconv, $out, $return);
}
if (is_file($unoDoc)) {
Expand Down

0 comments on commit 057fa15

Please sign in to comment.