summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2019-07-18 08:45:23 -0400
committerKurt <kurt.w.jung@gmail.com>2019-07-18 08:45:23 -0400
commit4c5c3288c806b7d607796adfe13d676714796954 (patch)
tree0c3f3ae322e9faee2b93629f6403c5a43ca354ff
parenta542cf333bc2e3e4e138bb4848f02997aba71ce9 (diff)
Revert "Merge branch 'seletskiy-master'"
This reverts commit a542cf333bc2e3e4e138bb4848f02997aba71ce9, reversing changes made to 3aaf0b1a66c0ab02d925917376898a5856061d59.
-rw-r--r--fpdf.go4
1 files changed, 1 insertions, 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)
}
}