@@ -37,7 +37,7 module Redmine | |||||
37 | super() |
|
37 | super() | |
38 | set_language_if_valid lang |
|
38 | set_language_if_valid lang | |
39 | @font_for_content = 'FreeSans' |
|
39 | @font_for_content = 'FreeSans' | |
40 |
@font_for_footer = 'FreeSans' |
|
40 | @font_for_footer = 'FreeSans' | |
41 | SetCreator(Redmine::Info.app_name) |
|
41 | SetCreator(Redmine::Info.app_name) | |
42 | SetFont(@font_for_content) |
|
42 | SetFont(@font_for_content) | |
43 | end |
|
43 | end | |
@@ -93,7 +93,7 module Redmine | |||||
93 | extend(PDF_Korean) |
|
93 | extend(PDF_Korean) | |
94 | AddUHCFont() |
|
94 | AddUHCFont() | |
95 | @font_for_content = 'UHC' |
|
95 | @font_for_content = 'UHC' | |
96 | @font_for_footer = 'UHC' |
|
96 | @font_for_footer = 'UHC' | |
97 | when 'ja' |
|
97 | when 'ja' | |
98 | extend(PDF_Japanese) |
|
98 | extend(PDF_Japanese) | |
99 | AddSJISFont() |
|
99 | AddSJISFont() | |
@@ -111,7 +111,7 module Redmine | |||||
111 | @font_for_footer = 'Big5' |
|
111 | @font_for_footer = 'Big5' | |
112 | else |
|
112 | else | |
113 | @font_for_content = 'Arial' |
|
113 | @font_for_content = 'Arial' | |
114 |
@font_for_footer = 'Helvetica' |
|
114 | @font_for_footer = 'Helvetica' | |
115 | end |
|
115 | end | |
116 | SetCreator(Redmine::Info.app_name) |
|
116 | SetCreator(Redmine::Info.app_name) | |
117 | SetFont(@font_for_content) |
|
117 | SetFont(@font_for_content) | |
@@ -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 | pdf = IFPDF.new(current_language) |
|
182 | if Redmine::Platform.mswin? || | |
183 |
|
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 | 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) | |
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 | 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 | 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 | 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