PDF: switch FPDF ANSI or TCPDF UTF-8 with general_pdf_encoding value instead of language value such as 'ja' (#61).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5385 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-10 08:34:52 +00:00
parent 85b891ec9e
commit 3be326f0a4
2 changed files with 3 additions and 15 deletions

View File

@ -189,11 +189,7 @@ module Redmine
# Returns a PDF string of a list of issues
def issues_to_pdf(issues, project, query)
if ( current_language.to_s.downcase == 'ko' ||
current_language.to_s.downcase == 'ja' ||
current_language.to_s.downcase == 'zh' ||
current_language.to_s.downcase == 'zh-tw' ||
current_language.to_s.downcase == 'th' )
if l(:general_pdf_encoding).upcase != 'UTF-8'
pdf = IFPDF.new(current_language)
else
pdf = ITCPDF.new(current_language)
@ -269,11 +265,7 @@ module Redmine
# Returns a PDF string of a single issue
def issue_to_pdf(issue)
if ( current_language.to_s.downcase == 'ko' ||
current_language.to_s.downcase == 'ja' ||
current_language.to_s.downcase == 'zh' ||
current_language.to_s.downcase == 'zh-tw' ||
current_language.to_s.downcase == 'th' )
if l(:general_pdf_encoding).upcase != 'UTF-8'
pdf = IFPDF.new(current_language)
else
pdf = ITCPDF.new(current_language)

View File

@ -507,11 +507,7 @@ module Redmine
end if Object.const_defined?(:Magick)
def to_pdf
if ( current_language.to_s.downcase == 'ko' ||
current_language.to_s.downcase == 'ja' ||
current_language.to_s.downcase == 'zh' ||
current_language.to_s.downcase == 'zh-tw' ||
current_language.to_s.downcase == 'th' )
if l(:general_pdf_encoding).upcase != 'UTF-8'
pdf = ::Redmine::Export::PDF::IFPDF.new(current_language)
else
pdf = ::Redmine::Export::PDF::ITCPDF.new(current_language)