summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdf.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdf.go b/fpdf.go
index f46680b..a676331 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)
}