diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-10 01:03:28 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-10 01:03:28 +0000 |
commit | 0418774f501a3efe7583dbc7ba8dcae19928629d (patch) | |
tree | b360d6e5c3a9872421d61d86fd35e226e9151b00 /lib | |
parent | f3a069281ec9387d3729804af3d1674bda11016f (diff) | |
download | redmine-0418774f501a3efe7583dbc7ba8dcae19928629d.tar.gz redmine-0418774f501a3efe7583dbc7ba8dcae19928629d.zip |
PDF: more strict Redmine TCPDF class initialize() (#8312).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5723 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/export/pdf.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index 7c2bf6636..98f045679 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -34,12 +34,12 @@ module Redmine attr_accessor :footer_date def initialize(lang) + set_language_if_valid lang + pdf_encoding = l(:general_pdf_encoding).upcase if RUBY_VERSION < '1.9' - @ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8') + @ic = Iconv.new(pdf_encoding, 'UTF-8') end - pdf_encoding = l(:general_pdf_encoding).upcase super('P', 'mm', 'A4', (pdf_encoding == 'UTF-8'), pdf_encoding) - set_language_if_valid lang case pdf_encoding when 'UTF-8' @font_for_content = 'FreeSans' |