PDF: fix automatic line break problem with TCPDF (#8310).
Contributed by Jun NAITOH. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5664 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
479d9380a7
commit
e6e0578d29
4
vendor/plugins/rfpdf/lib/tcpdf.rb
vendored
4
vendor/plugins/rfpdf/lib/tcpdf.rb
vendored
@ -1827,7 +1827,7 @@ class TCPDF
|
|||||||
ns += 1;
|
ns += 1;
|
||||||
end
|
end
|
||||||
|
|
||||||
l = GetStringWidth(s[from_j, to_index-from_j]);
|
l = GetStringWidth(s[from_j, to_index - from_j + 1]);
|
||||||
|
|
||||||
if (l > wmax)
|
if (l > wmax)
|
||||||
#Automatic line break
|
#Automatic line break
|
||||||
@ -1946,7 +1946,7 @@ class TCPDF
|
|||||||
if (c == " "[0])
|
if (c == " "[0])
|
||||||
sep= i;
|
sep= i;
|
||||||
end
|
end
|
||||||
l = GetStringWidth(s[j, i-j]);
|
l = GetStringWidth(s[j, i - j + 1]);
|
||||||
if (l > wmax)
|
if (l > wmax)
|
||||||
#Automatic line break (word wrapping)
|
#Automatic line break (word wrapping)
|
||||||
if (sep == -1)
|
if (sep == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user