From 5d17b4b7e41a62d2c7f1dabae8ad7376211e921a Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 11:55:45 +0100 Subject: thumbnails fixed --- app/models/fax_document.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/fax_document.rb') 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" -- cgit v1.2.3