summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2019-09-28 19:55:52 -0400
committerKurt <kurt.w.jung@gmail.com>2019-09-28 19:55:52 -0400
commit291a9758a2b6dad177c43ee435a68dcd46959496 (patch)
tree6ab44fb49bf3359e3803181dcd3ab9e1df6a65e4
parent648efaf66fc0b2c166ecb8b51fe68bcb0395c840 (diff)
parent25404723570af4f2038e916c75a5296ed694f486 (diff)
Merge branch 'SuddenGunter-bookmarks-utf16'
-rw-r--r--fpdf.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdf.go b/fpdf.go
index b6861b6..f5062cc 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -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})
}