diff options
author | spag <spag@golwen.net> | 2013-01-28 11:55:45 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-28 11:55:45 +0100 |
commit | 5d17b4b7e41a62d2c7f1dabae8ad7376211e921a (patch) | |
tree | 36a95b31ea5cb2e75a46131dfed23e2a6e9815ae /app/models | |
parent | 553115fd50ef3c35d961fa98abfd593386da5c94 (diff) |
thumbnails fixed
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/fax_document.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/fax_document.rb b/app/models/fax_document.rb index 080bdaa..be689e2 100644 --- a/app/models/fax_document.rb +++ b/app/models/fax_document.rb @@ -52,7 +52,6 @@ class FaxDocument < ActiveRecord::Base name end - private def render_thumbnails directory = "/tmp/GS-#{GsParameter.get('GEMEINSCHAFT_VERSION')}/fax_thumbnails/#{self.id}" system('mkdir -p ' + directory) @@ -66,7 +65,8 @@ class FaxDocument < ActiveRecord::Base system("rm -rf #{directory}") self.update_attributes(:document_total_pages => number_of_thumbnails) if self.document_total_pages.nil? end - + + private def convert_pdf_to_tiff page_size_a4 = '595 842' page_size_command = "<< /Policies << /PageSize 3 >> /InputAttributes currentpagedevice /InputAttributes get dup { pop 1 index exch undef } forall dup 0 << /PageSize [ #{page_size_a4} ] >> put >> setpagedevice" |