@@ -179,8 +179,16 module Redmine | |||||
179 |
|
179 | |||
180 | # Returns a PDF string of a list of issues |
|
180 | # Returns a PDF string of a list of issues | |
181 | def issues_to_pdf(issues, project, query) |
|
181 | def issues_to_pdf(issues, project, query) | |
|
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' ) | |||
182 | pdf = IFPDF.new(current_language) |
|
188 | pdf = IFPDF.new(current_language) | |
183 |
|
189 | else | ||
|
190 | pdf = ITCPDF.new(current_language) | |||
|
191 | end | |||
184 | title = query.new_record? ? l(:label_issue_plural) : query.name |
|
192 | title = query.new_record? ? l(:label_issue_plural) : query.name | |
185 | title = "#{project} - #{title}" if project |
|
193 | title = "#{project} - #{title}" if project | |
186 | pdf.SetTitle(title) |
|
194 | pdf.SetTitle(title) | |
@@ -251,7 +259,16 module Redmine | |||||
251 |
|
259 | |||
252 | # Returns a PDF string of a single issue |
|
260 | # Returns a PDF string of a single issue | |
253 | def issue_to_pdf(issue) |
|
261 | def issue_to_pdf(issue) | |
|
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' ) | |||
254 | pdf = IFPDF.new(current_language) |
|
268 | pdf = IFPDF.new(current_language) | |
|
269 | else | |||
|
270 | pdf = ITCPDF.new(current_language) | |||
|
271 | end | |||
255 | pdf.SetTitle("#{issue.project} - ##{issue.tracker} #{issue.id}") |
|
272 | pdf.SetTitle("#{issue.project} - ##{issue.tracker} #{issue.id}") | |
256 | pdf.alias_nb_pages |
|
273 | pdf.alias_nb_pages | |
257 | pdf.footer_date = format_date(Date.today) |
|
274 | pdf.footer_date = format_date(Date.today) |
@@ -507,7 +507,16 module Redmine | |||||
507 | end if Object.const_defined?(:Magick) |
|
507 | end if Object.const_defined?(:Magick) | |
508 |
|
508 | |||
509 | def to_pdf |
|
509 | def to_pdf | |
|
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' ) | |||
510 | pdf = ::Redmine::Export::PDF::IFPDF.new(current_language) |
|
516 | pdf = ::Redmine::Export::PDF::IFPDF.new(current_language) | |
|
517 | else | |||
|
518 | pdf = ::Redmine::Export::PDF::ITCPDF.new(current_language) | |||
|
519 | end | |||
511 | pdf.SetTitle("#{l(:label_gantt)} #{project}") |
|
520 | pdf.SetTitle("#{l(:label_gantt)} #{project}") | |
512 | pdf.alias_nb_pages |
|
521 | pdf.alias_nb_pages | |
513 | pdf.footer_date = format_date(Date.today) |
|
522 | pdf.footer_date = format_date(Date.today) |
General Comments 0
You need to be logged in to leave comments.
Login now