summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins')
-rwxr-xr-xlib/plugins/rfpdf/lib/tcpdf.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/plugins/rfpdf/lib/tcpdf.rb b/lib/plugins/rfpdf/lib/tcpdf.rb
index 5c15b1aa7..62d07cd03 100755
--- a/lib/plugins/rfpdf/lib/tcpdf.rb
+++ b/lib/plugins/rfpdf/lib/tcpdf.rb
@@ -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;