##// END OF EJS Templates
PDF: switch TCPDF UTF-8 or FPDF ANSI (#61)....
Toshi MARUYAMA -
r5139:325af8d48cca
parent child
Show More
@@ -37,7 +37,7 module Redmine
37 37 super()
38 38 set_language_if_valid lang
39 39 @font_for_content = 'FreeSans'
40 @font_for_footer = 'FreeSans'
40 @font_for_footer = 'FreeSans'
41 41 SetCreator(Redmine::Info.app_name)
42 42 SetFont(@font_for_content)
43 43 end
@@ -93,7 +93,7 module Redmine
93 93 extend(PDF_Korean)
94 94 AddUHCFont()
95 95 @font_for_content = 'UHC'
96 @font_for_footer = 'UHC'
96 @font_for_footer = 'UHC'
97 97 when 'ja'
98 98 extend(PDF_Japanese)
99 99 AddSJISFont()
@@ -111,7 +111,7 module Redmine
111 111 @font_for_footer = 'Big5'
112 112 else
113 113 @font_for_content = 'Arial'
114 @font_for_footer = 'Helvetica'
114 @font_for_footer = 'Helvetica'
115 115 end
116 116 SetCreator(Redmine::Info.app_name)
117 117 SetFont(@font_for_content)
@@ -179,8 +179,16 module Redmine
179 179
180 180 # Returns a PDF string of a list of issues
181 181 def issues_to_pdf(issues, project, query)
182 pdf = IFPDF.new(current_language)
183
182 if Redmine::Platform.mswin? ||
183 ( current_language.to_s.downcase == 'ko' ||
184 current_language.to_s.downcase == 'ja' ||
185 current_language.to_s.downcase == 'zh' ||
186 current_language.to_s.downcase == 'zh-tw' ||
187 current_language.to_s.downcase == 'th' )
188 pdf = IFPDF.new(current_language)
189 else
190 pdf = ITCPDF.new(current_language)
191 end
184 192 title = query.new_record? ? l(:label_issue_plural) : query.name
185 193 title = "#{project} - #{title}" if project
186 194 pdf.SetTitle(title)
@@ -251,7 +259,16 module Redmine
251 259
252 260 # Returns a PDF string of a single issue
253 261 def issue_to_pdf(issue)
254 pdf = IFPDF.new(current_language)
262 if Redmine::Platform.mswin? ||
263 ( current_language.to_s.downcase == 'ko' ||
264 current_language.to_s.downcase == 'ja' ||
265 current_language.to_s.downcase == 'zh' ||
266 current_language.to_s.downcase == 'zh-tw' ||
267 current_language.to_s.downcase == 'th' )
268 pdf = IFPDF.new(current_language)
269 else
270 pdf = ITCPDF.new(current_language)
271 end
255 272 pdf.SetTitle("#{issue.project} - ##{issue.tracker} #{issue.id}")
256 273 pdf.alias_nb_pages
257 274 pdf.footer_date = format_date(Date.today)
@@ -507,7 +507,16 module Redmine
507 507 end if Object.const_defined?(:Magick)
508 508
509 509 def to_pdf
510 pdf = ::Redmine::Export::PDF::IFPDF.new(current_language)
510 if Redmine::Platform.mswin? ||
511 ( current_language.to_s.downcase == 'ko' ||
512 current_language.to_s.downcase == 'ja' ||
513 current_language.to_s.downcase == 'zh' ||
514 current_language.to_s.downcase == 'zh-tw' ||
515 current_language.to_s.downcase == 'th' )
516 pdf = ::Redmine::Export::PDF::IFPDF.new(current_language)
517 else
518 pdf = ::Redmine::Export::PDF::ITCPDF.new(current_language)
519 end
511 520 pdf.SetTitle("#{l(:label_gantt)} #{project}")
512 521 pdf.alias_nb_pages
513 522 pdf.footer_date = format_date(Date.today)
General Comments 0
You need to be logged in to leave comments. Login now