diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index f6d6f8cb1..f44612c6f 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -98,7 +98,7 @@ module Redmine def textstring(s) # Format a text string - if s.chars.first == '<' # This means the string is hex-dumped. + if s =~ /^ utf16, :l => level, :p => PageNo(), :y => (@h - y)*@k} + @outlines << {:t => txt, :l => level, :p => PageNo(), :y => (@h - y)*@k} + end + + def bookmark_title(txt) + txt = begin + utf16txt = Iconv.conv('UTF-16BE', 'UTF-8', txt) + hextxt = "" + rescue + txt + end || '' end def putbookmarks @@ -184,7 +194,7 @@ module Redmine n=self.n+1 @outlines.each_with_index do |o, i| newobj() - out('<