I'm creating an rtf document and need to insert a symbol that is represented
by the rtf code \u9472\'2d
I've tried several approaches.
One
In my app, I create a String variable to represent the code:
private String fancyDash = "\\u9472\\'2d";
I use \\ to literally output "\\"
I output this string, but when I examine the rtf file, I get exactly what
the variable is defined: \\u9472\\'2d
Two
I next tried private String fancyDash = "\u9472\\2d";
But the rtf file contains:
\u-27534?'2d
Three
private char backSlashChar = 92;
private Character backSlash = new Character(backSlashChar);
private char sinqleQuoteChar = 96;
private Character sinqleQuote = new Character(sinqleQuoteChar);
private String fancyDash =
backSlash.toString().concat("u9472").concat(backSlash.toString()).concat(sinqleQuote.toString()).concat("2d");
But the output is identical to One.
Is it possible to achieve what I want to do?
Thanks,
Steve
--
View this message in context:
http://www.nabble.com/How-to-Output-an-rtf-Code-tf4267754.html#a12145888
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/