summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnka2310 <anka.heyse@web.de>2019-04-17 15:12:41 +0200
committerGitHub <noreply@github.com>2019-04-17 15:12:41 +0200
commit29741e337ab46231e17a6873fb1fe56df5994271 (patch)
tree09c9562581216b7e6ca680d2da97b88b7d2388ee
parentadea43f9f1e4324cde55328c74e0e1a7af9aaf73 (diff)
Fix right alignment
width has already been reduced by left and right margin, so right margin doesn't need to be subtracted twice
-rw-r--r--fpdf.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdf.go b/fpdf.go
index 7294df7..4881ba4 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -2441,7 +2441,7 @@ func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string)
f.Write(lineHeight, lineStr)
f.SetLeftMargin(lMargin)
case "R":
- f.SetLeftMargin(lMargin + (width - lineWidth) - rMargin)
+ f.SetLeftMargin(lMargin + (width - lineWidth))
f.Write(lineHeight, lineStr)
f.SetLeftMargin(lMargin)
default: