Merged r10948 into 2.2-stable (#3447).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.2-stable@10952 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -403,6 +403,9 @@ class TCPDF
|
||||
Error("Incorrect orientation: #{orientation}")
|
||||
end
|
||||
|
||||
@fw = @w_pt/@k
|
||||
@fh = @h_pt/@k
|
||||
|
||||
@cur_orientation = @def_orientation
|
||||
@w = @w_pt/@k
|
||||
@h = @h_pt/@k
|
||||
@@ -3615,9 +3618,9 @@ class TCPDF
|
||||
restspace = GetPageHeight() - GetY() - GetBreakMargin();
|
||||
|
||||
writeHTML(html, true, fill); # write html text
|
||||
SetX(x)
|
||||
|
||||
currentY = GetY();
|
||||
|
||||
@auto_page_break = false;
|
||||
# check if a new page has been created
|
||||
if (@page > pagenum)
|
||||
@@ -3625,11 +3628,13 @@ class TCPDF
|
||||
currentpage = @page;
|
||||
@page = pagenum;
|
||||
SetY(GetPageHeight() - restspace - GetBreakMargin());
|
||||
SetX(x)
|
||||
Cell(w, restspace - 1, "", b, 0, 'L', 0);
|
||||
b = b2;
|
||||
@page += 1;
|
||||
while @page < currentpage
|
||||
SetY(@t_margin); # put cursor at the beginning of text
|
||||
SetX(x)
|
||||
Cell(w, @page_break_trigger - @t_margin, "", b, 0, 'L', 0);
|
||||
@page += 1;
|
||||
end
|
||||
@@ -3638,10 +3643,12 @@ class TCPDF
|
||||
end
|
||||
# design a cell around the text on last page
|
||||
SetY(@t_margin); # put cursor at the beginning of text
|
||||
SetX(x)
|
||||
Cell(w, currentY - @t_margin, "", b, 0, 'L', 0);
|
||||
else
|
||||
SetY(y); # put cursor at the beginning of text
|
||||
# design a cell around the text
|
||||
SetX(x)
|
||||
Cell(w, [h, (currentY - y)].max, "", border, 0, 'L', 0);
|
||||
end
|
||||
@auto_page_break = true;
|
||||
|
||||
Reference in New Issue
Block a user