diff options
author | Artem <kolomytsev1996@gmail.com> | 2019-09-29 01:23:08 +0300 |
---|---|---|
committer | Artem <kolomytsev1996@gmail.com> | 2019-09-29 01:23:08 +0300 |
commit | 25404723570af4f2038e916c75a5296ed694f486 (patch) | |
tree | 6ab44fb49bf3359e3803181dcd3ab9e1df6a65e4 | |
parent | 648efaf66fc0b2c166ecb8b51fe68bcb0395c840 (diff) |
fix utf16 in bookmarks
-rw-r--r-- | fpdf.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2183,6 +2183,9 @@ func (f *Fpdf) Bookmark(txtStr string, level int, y float64) { if y == -1 { y = f.y } + if f.isCurrentUTF8 { + txtStr = utf8toutf16(txtStr) + } f.outlines = append(f.outlines, outlineType{text: txtStr, level: level, y: y, p: f.PageNo(), prev: -1, last: -1, next: -1, first: -1}) } |