88 |
88 |
def initialize(lang)
|
89 |
89 |
super()
|
90 |
90 |
set_language_if_valid lang
|
91 |
|
case current_language.to_s.downcase
|
92 |
|
when 'ko'
|
|
91 |
case l(:general_pdf_encoding).upcase
|
|
92 |
when 'CP949'
|
93 |
93 |
extend(PDF_Korean)
|
94 |
94 |
AddUHCFont()
|
95 |
95 |
@font_for_content = 'UHC'
|
96 |
96 |
@font_for_footer = 'UHC'
|
97 |
|
when 'ja'
|
|
97 |
when 'CP932'
|
98 |
98 |
extend(PDF_Japanese)
|
99 |
99 |
AddSJISFont()
|
100 |
100 |
@font_for_content = 'SJIS'
|
101 |
101 |
@font_for_footer = 'SJIS'
|
102 |
|
when 'zh'
|
|
102 |
when 'GB18030'
|
103 |
103 |
extend(PDF_Chinese)
|
104 |
104 |
AddGBFont()
|
105 |
105 |
@font_for_content = 'GB'
|
106 |
106 |
@font_for_footer = 'GB'
|
107 |
|
when 'zh-tw'
|
|
107 |
when 'BIG5'
|
108 |
108 |
extend(PDF_Chinese)
|
109 |
109 |
AddBig5Font()
|
110 |
110 |
@font_for_content = 'Big5'
|
... | ... | |
189 |
189 |
|
190 |
190 |
# Returns a PDF string of a list of issues
|
191 |
191 |
def issues_to_pdf(issues, project, query)
|
192 |
|
if ( current_language.to_s.downcase == 'ko' ||
|
193 |
|
current_language.to_s.downcase == 'ja' ||
|
194 |
|
current_language.to_s.downcase == 'zh' ||
|
195 |
|
current_language.to_s.downcase == 'zh-tw' ||
|
196 |
|
current_language.to_s.downcase == 'th' )
|
|
192 |
if l(:general_pdf_encoding).upcase != 'UTF-8'
|
197 |
193 |
pdf = IFPDF.new(current_language)
|
198 |
194 |
else
|
199 |
195 |
pdf = ITCPDF.new(current_language)
|
... | ... | |
269 |
265 |
|
270 |
266 |
# Returns a PDF string of a single issue
|
271 |
267 |
def issue_to_pdf(issue)
|
272 |
|
if ( current_language.to_s.downcase == 'ko' ||
|
273 |
|
current_language.to_s.downcase == 'ja' ||
|
274 |
|
current_language.to_s.downcase == 'zh' ||
|
275 |
|
current_language.to_s.downcase == 'zh-tw' ||
|
276 |
|
current_language.to_s.downcase == 'th' )
|
|
268 |
if l(:general_pdf_encoding).upcase != 'UTF-8'
|
277 |
269 |
pdf = IFPDF.new(current_language)
|
278 |
270 |
else
|
279 |
271 |
pdf = ITCPDF.new(current_language)
|