diff options
author | Anka2310 <anka.heyse@web.de> | 2019-04-17 15:12:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 15:12:41 +0200 |
commit | 29741e337ab46231e17a6873fb1fe56df5994271 (patch) | |
tree | 09c9562581216b7e6ca680d2da97b88b7d2388ee | |
parent | adea43f9f1e4324cde55328c74e0e1a7af9aaf73 (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.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |