Patch #1204 » ifpdf_helper.rb.diff
| app/helpers/ifpdf_helper.rb (working copy) | ||
|---|---|---|
|
SetFont(@font_for_content, style, size)
|
||
|
end
|
||
|
|
||
|
def SetTitle(txt)
|
||
|
case current_language.to_s
|
||
|
when 'ja', 'zh', 'zh-tw'
|
||
|
txt = begin
|
||
|
utf16txt = Iconv.conv('UTF-16BE', 'UTF-8', txt)
|
||
|
hextxt = "<FEFF" # FEFF is BOM
|
||
|
hextxt << utf16txt.unpack("C*").map {|x| sprintf("%02X",x) }.join
|
||
|
hextxt << ">"
|
||
|
rescue
|
||
|
txt
|
||
|
end || ''
|
||
|
end
|
||
|
super(txt)
|
||
|
end
|
||
|
def textstring(s)
|
||
|
# Format a text string
|
||
|
if s =~ /^</ # This means the string is hex-dumped.
|
||
|
return s
|
||
|
else
|
||
|
return '('+escape(s)+')'
|
||
|
end
|
||
|
end
|
||
|
def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
|
||
|
@ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
|
||
|
# these quotation marks are not correctly rendered in the pdf
|
||
- « Previous
- 1
- 2
- 3
- Next »