@@ -1803,7 +1803,7 class TCPDF | |||||
1803 | w = @w - @r_margin - @x; |
|
1803 | w = @w - @r_margin - @x; | |
1804 | end |
|
1804 | end | |
1805 |
|
1805 | |||
1806 |
wmax = (w - |
|
1806 | wmax = (w - 3 * @c_margin); | |
1807 |
|
1807 | |||
1808 | s = txt.gsub("\r", ''); # remove carriage returns |
|
1808 | s = txt.gsub("\r", ''); # remove carriage returns | |
1809 | nb = s.length; |
|
1809 | nb = s.length; | |
@@ -1862,7 +1862,7 class TCPDF | |||||
1862 | ns += 1; |
|
1862 | ns += 1; | |
1863 | end |
|
1863 | end | |
1864 |
|
1864 | |||
1865 |
l = GetStringWidth(s[from_j, to_index - from_j |
|
1865 | l = GetStringWidth(s[from_j, to_index - from_j]); | |
1866 |
|
1866 | |||
1867 | if (l > wmax) |
|
1867 | if (l > wmax) | |
1868 | #Automatic line break |
|
1868 | #Automatic line break | |
@@ -1945,7 +1945,7 class TCPDF | |||||
1945 |
|
1945 | |||
1946 | #Output text in flowing mode |
|
1946 | #Output text in flowing mode | |
1947 | w = @w - @r_margin - @x; |
|
1947 | w = @w - @r_margin - @x; | |
1948 |
wmax = (w - |
|
1948 | wmax = (w - 3 * @c_margin); | |
1949 |
|
1949 | |||
1950 | s = txt.gsub("\r", ''); |
|
1950 | s = txt.gsub("\r", ''); | |
1951 | nb = s.length; |
|
1951 | nb = s.length; | |
@@ -1974,7 +1974,7 class TCPDF | |||||
1974 | if (nl == 1) |
|
1974 | if (nl == 1) | |
1975 | @x = @l_margin; |
|
1975 | @x = @l_margin; | |
1976 | w = @w - @r_margin - @x; |
|
1976 | w = @w - @r_margin - @x; | |
1977 |
wmax = (w - |
|
1977 | wmax = (w - 3 * @c_margin); | |
1978 | end |
|
1978 | end | |
1979 | nl += 1; |
|
1979 | nl += 1; | |
1980 | next |
|
1980 | next | |
@@ -1982,7 +1982,7 class TCPDF | |||||
1982 | if (c == " "[0]) |
|
1982 | if (c == " "[0]) | |
1983 | sep= i; |
|
1983 | sep= i; | |
1984 | end |
|
1984 | end | |
1985 |
l = GetStringWidth(s[j, i - j |
|
1985 | l = GetStringWidth(s[j, i - j]); | |
1986 | if (l > wmax) |
|
1986 | if (l > wmax) | |
1987 | #Automatic line break (word wrapping) |
|
1987 | #Automatic line break (word wrapping) | |
1988 | if (sep == -1) |
|
1988 | if (sep == -1) | |
@@ -1991,7 +1991,7 class TCPDF | |||||
1991 | @x = @l_margin; |
|
1991 | @x = @l_margin; | |
1992 | @y += h; |
|
1992 | @y += h; | |
1993 | w=@w - @r_margin - @x; |
|
1993 | w=@w - @r_margin - @x; | |
1994 |
wmax=(w - |
|
1994 | wmax=(w - 3 * @c_margin); | |
1995 | i += 1 |
|
1995 | i += 1 | |
1996 | nl += 1 |
|
1996 | nl += 1 | |
1997 | next |
|
1997 | next | |
@@ -2010,7 +2010,7 class TCPDF | |||||
2010 | if (nl==1) |
|
2010 | if (nl==1) | |
2011 | @x = @l_margin; |
|
2011 | @x = @l_margin; | |
2012 | w = @w - @r_margin - @x; |
|
2012 | w = @w - @r_margin - @x; | |
2013 |
wmax = (w - |
|
2013 | wmax = (w - 3 * @c_margin); | |
2014 | end |
|
2014 | end | |
2015 | nl += 1; |
|
2015 | nl += 1; | |
2016 | else |
|
2016 | else |
General Comments 0
You need to be logged in to leave comments.
Login now