]> source.dussan.org Git - redmine.git/commitdiff
pdf: lib: prepare to use rfpdf plug-in rmagick feature (#3261)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 24 Nov 2011 11:11:36 +0000 (11:11 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 24 Nov 2011 11:11:36 +0000 (11:11 +0000)
Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7914 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/export/pdf.rb

index 2c870175d21d56fb8663901337985f1fdd0f97d0..661b4454a56828ec08fc0cd96bba5af452790313 100644 (file)
@@ -21,6 +21,7 @@ require 'iconv'
 require 'fpdf/chinese'
 require 'fpdf/japanese'
 require 'fpdf/korean'
+require 'core/rmagick'
 
 module Redmine
   module Export
@@ -34,6 +35,8 @@ module Redmine
         attr_accessor :footer_date
 
         def initialize(lang)
+          @@k_path_cache = Rails.root.join('tmp', 'pdf')
+          FileUtils.mkdir_p @@k_path_cache unless File::exist?(@@k_path_cache)
           set_language_if_valid lang
           pdf_encoding = l(:general_pdf_encoding).upcase
           super('P', 'mm', 'A4', (pdf_encoding == 'UTF-8'), pdf_encoding)