From 4c5c3288c806b7d607796adfe13d676714796954 Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 18 Jul 2019 08:45:23 -0400 Subject: Revert "Merge branch 'seletskiy-master'" This reverts commit a542cf333bc2e3e4e138bb4848f02997aba71ce9, reversing changes made to 3aaf0b1a66c0ab02d925917376898a5856061d59. --- fpdf.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fpdf.go b/fpdf.go index b3d0b0e..35496c2 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) } @@ -2819,7 +2819,6 @@ 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)) @@ -2832,7 +2831,6 @@ func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string) default: f.Write(lineHeight, lineStr) } - f.SetRightMargin(rMargin) } } -- cgit v1.2.1-24-ge1ad