Skip to content

Commit

Permalink
Merge pull request #726 from UN-OCHA/RW-878
Browse files Browse the repository at this point in the history
[RW-878] Mutool options
  • Loading branch information
orakili authored Feb 19, 2024
2 parents c0be992 + 849c14c commit 26a94c3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ protected function extractPreview($source_uri, $destination_uri, $page, $rotatio

$mutool = \Drupal::state()->get('mutool', '/usr/bin/mutool');
if (is_executable($mutool)) {
// @todo add max dimensions.
$command = "{$mutool} draw -R {$rotation} -o {$destination} {$source} {$page}";
$options = \Drupal::state()->get('mutool_options', '');
$command = "{$mutool} draw {$options} -R {$rotation} -o {$destination} {$source} {$page}";
exec($command, $output, $return_val);
// @todo log error?
return empty($return_val) && @file_exists($destination_uri);
Expand Down

0 comments on commit 26a94c3

Please sign in to comment.