From 4a5d3e03531f37a46c80a976d5a38189db70a8ff Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 4 Jan 2009 14:54:19 +0000 Subject: [PATCH] Scramble PDF title (#1204). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2233 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/export/pdf.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index 68e34b65..5d75494e 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -55,6 +55,27 @@ module Redmine def SetFontStyle(style, size) SetFont(@font_for_content, style, size) end + + def SetTitle(txt) + txt = begin + utf16txt = Iconv.conv('UTF-16BE', 'UTF-8', txt) + hextxt = "" + rescue + txt + end || '' + super(txt) + end + + def textstring(s) + # Format a text string + if s =~ /^