PDF: transplant r287 (#61).
Fix for #9. Export feature(to csv/pdf) doesn't work in Japanese csv and pdf encoding are know defined for each language (general_csv_encoding and general_pdf_encoding keys in lang files) added SJIS font for japanese pdf exports. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5249 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ad5dcaf179
commit
aff157f0a0
|
@ -146,13 +146,13 @@ module PDF_Japanese
|
||||||
b2='LR'
|
b2='LR'
|
||||||
else
|
else
|
||||||
b2=''
|
b2=''
|
||||||
if(border.index('L').nil?)
|
if(border.to_s.index('L'))
|
||||||
b2+='L'
|
b2+='L'
|
||||||
end
|
end
|
||||||
if(border.index('R').nil?)
|
if(border.to_s.index('R'))
|
||||||
b2+='R'
|
b2+='R'
|
||||||
end
|
end
|
||||||
b=border.index('T').nil? ? b2+'T' : b2
|
b=border.to_s.index('T') ? b2+'T' : b2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
sep=-1
|
sep=-1
|
||||||
|
@ -163,7 +163,7 @@ module PDF_Japanese
|
||||||
while(i<nb)
|
while(i<nb)
|
||||||
#Get next character
|
#Get next character
|
||||||
c=s[i]
|
c=s[i]
|
||||||
o=ord(c)
|
o=c #o=ord(c)
|
||||||
if(o==10)
|
if(o==10)
|
||||||
#Explicit line break
|
#Explicit line break
|
||||||
Cell(w,h,s[j,i-j],b,2,align,fill)
|
Cell(w,h,s[j,i-j],b,2,align,fill)
|
||||||
|
@ -221,7 +221,7 @@ module PDF_Japanese
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#Last chunk
|
#Last chunk
|
||||||
if(border and not border.index('B').nil?)
|
if(border and not border.to_s.index('B').nil?)
|
||||||
b+='B'
|
b+='B'
|
||||||
end
|
end
|
||||||
Cell(w,h,s[j,i-j],b,2,align,fill)
|
Cell(w,h,s[j,i-j],b,2,align,fill)
|
||||||
|
|
Loading…
Reference in New Issue