summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2019-07-20 09:42:15 -0400
committerKurt <kurt.w.jung@gmail.com>2019-07-20 09:42:15 -0400
commit1ad94066897276b1a2a34d099c42a7205c421903 (patch)
treeac5447113b722949ea8cb32a05ad8835d29babed
parent4c5c3288c806b7d607796adfe13d676714796954 (diff)
parent20e5ed95b595d65457b8b33d68afdbdd99aa31f9 (diff)
Merge branch 'seletskiy-master'
-rw-r--r--fpdf.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdf.go b/fpdf.go
index 35496c2..f46680b 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -2800,8 +2800,8 @@ func (f *Fpdf) WriteLinkID(h float64, displayStr string, linkID int) {
func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string) {
lMargin, _, rMargin, _ := f.GetMargins()
+ pageWidth, _ := f.GetPageSize()
if width == 0 {
- pageWidth, _ := f.GetPageSize()
width = pageWidth - (lMargin + rMargin)
}
@@ -2829,7 +2829,9 @@ func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string)
f.Write(lineHeight, lineStr)
f.SetLeftMargin(lMargin)
default:
+ f.SetRightMargin(pageWidth - lMargin - width)
f.Write(lineHeight, lineStr)
+ f.SetRightMargin(rMargin)
}
}
}