This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 727ad35  pdf90 etc are no longer provided with pdfjam 3.02
727ad35 is described below

commit 727ad3573001ae6f2e0e3b73f3aeb140d92359b3
Author: Sebb <[email protected]>
AuthorDate: Mon Jul 6 00:01:50 2020 +0100

    pdf90 etc are no longer provided with pdfjam 3.02
    
    Provide options as per:
    https://github.com/DavidFirth/pdfjam-extras
---
 .../workbench/views/actions/rotate-attachment.json.rb          | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/secretary/workbench/views/actions/rotate-attachment.json.rb 
b/www/secretary/workbench/views/actions/rotate-attachment.json.rb
index d91fc70..45008c5 100644
--- a/www/secretary/workbench/views/actions/rotate-attachment.json.rb
+++ b/www/secretary/workbench/views/actions/rotate-attachment.json.rb
@@ -7,13 +7,13 @@ message = Mailbox.find(@message)
 begin
   selected = message.find(@selected).as_pdf
 
-  tool = 'pdf270' if @direction.include? 'right'
-  tool = 'pdf90' if @direction.include? 'left'
-  tool = 'pdf180' if @direction.include? 'flip'
+  options = %w(--angle 270 --rotateoversize true) if @direction.include? 
'right'
+  options = %w(--angle 90 --rotateoversize true) if @direction.include? 'left'
+  options = %w(--angle 180) if @direction.include? 'flip'
 
-  raise "Invalid direction #{@direction}" unless tool
+  raise "Invalid direction #{@direction}" unless options
 
-  Kernel.system tool, '--quiet', '--suffix', 'rotated', selected.path, {chdir: 
File.dirname(selected.path)}
+  Kernel.system 'pdfjam', *options, '--quiet', '--suffix', 'rotated', 
'--fitpaper', 'true', selected.path, {chdir: File.dirname(selected.path)}
 
   output = selected.path.sub(/\.pdf$/, '-rotated.pdf')
 

Reply via email to