@@ -132,7 +132,7 module Redmine | |||||
132 | end || '' |
|
132 | end || '' | |
133 | super(txt) |
|
133 | super(txt) | |
134 | end |
|
134 | end | |
135 |
|
135 | |||
136 | def textstring(s) |
|
136 | def textstring(s) | |
137 | # Format a text string |
|
137 | # Format a text string | |
138 | if s =~ /^</ # This means the string is hex-dumped. |
|
138 | if s =~ /^</ # This means the string is hex-dumped. | |
@@ -141,7 +141,7 module Redmine | |||||
141 | return '('+escape(s)+')' |
|
141 | return '('+escape(s)+')' | |
142 | end |
|
142 | end | |
143 | end |
|
143 | end | |
144 |
|
144 | |||
145 | def fix_text_encoding(txt) |
|
145 | def fix_text_encoding(txt) | |
146 | @ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8') |
|
146 | @ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8') | |
147 | # these quotation marks are not correctly rendered in the pdf |
|
147 | # these quotation marks are not correctly rendered in the pdf | |
@@ -154,17 +154,17 module Redmine | |||||
154 | rescue |
|
154 | rescue | |
155 | txt |
|
155 | txt | |
156 | end || '' |
|
156 | end || '' | |
157 |
|
|
157 | return txt | |
158 | end |
|
158 | end | |
159 |
|
159 | |||
160 | def RDMCell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='') |
|
160 | def RDMCell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='') | |
161 | Cell(w,h,fix_text_encoding(txt),border,ln,align,fill,link) |
|
161 | Cell(w,h,fix_text_encoding(txt),border,ln,align,fill,link) | |
162 | end |
|
162 | end | |
163 |
|
163 | |||
164 | def RDMMultiCell(w,h=0,txt='',border=0,align='',fill=0) |
|
164 | def RDMMultiCell(w,h=0,txt='',border=0,align='',fill=0) | |
165 | MultiCell(w,h,fix_text_encoding(txt),border,align,fill) |
|
165 | MultiCell(w,h,fix_text_encoding(txt),border,align,fill) | |
166 | end |
|
166 | end | |
167 |
|
167 | |||
168 | def Footer |
|
168 | def Footer | |
169 | SetFont(@font_for_footer, 'I', 8) |
|
169 | SetFont(@font_for_footer, 'I', 8) | |
170 | SetY(-15) |
|
170 | SetY(-15) |
General Comments 0
You need to be logged in to leave comments.
Login now