Skip to content

Commit

Permalink
Merge branch 'seletskiy-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jung-kurt committed Jun 18, 2019
2 parents 9d03221 + 3170e6e commit d4a9e3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fpdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -2802,7 +2802,15 @@ func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string)
width = pageWidth - (lMargin + rMargin)
}

lines := f.SplitLines([]byte(textStr), width)
var lines []string

if f.isCurrentUTF8 {
lines = f.SplitText(textStr, width)
} else {
for _, line := range f.SplitLines([]byte(textStr), width) {
lines = append(lines, string(line))
}
}

for _, lineBt := range lines {
lineStr := string(lineBt)
Expand Down

0 comments on commit d4a9e3b

Please sign in to comment.