diff options
author | Kurt <kurt.w.jung@gmail.com> | 2019-07-18 08:24:43 -0400 |
---|---|---|
committer | Kurt <kurt.w.jung@gmail.com> | 2019-07-18 08:24:43 -0400 |
commit | a542cf333bc2e3e4e138bb4848f02997aba71ce9 (patch) | |
tree | 94c4be8cad7170c138cea8ad284eb73fde89380a | |
parent | 3aaf0b1a66c0ab02d925917376898a5856061d59 (diff) | |
parent | 09261e84da53502557bf24a24fdc36e7cc215ddf (diff) |
Merge branch 'seletskiy-master'
-rw-r--r-- | fpdf.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) } @@ -2819,6 +2819,7 @@ func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string) lineStr := string(lineBt) lineWidth := f.GetStringWidth(lineStr) + f.SetLeftMargin(lMargin + (width - lineWidth) - 2.01*f.cMargin) switch alignStr { case "C": f.SetLeftMargin(lMargin + ((width - lineWidth) / 2)) @@ -2831,6 +2832,7 @@ func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string) default: f.Write(lineHeight, lineStr) } + f.SetRightMargin(rMargin) } } |