Hi all,
I am trying to add a PDF file as
string to XML file as below;
Charset utf8 = Charset.forName("UTF-8");
byte[] pdfBytes = outStream.toByteArray();
String pdfString = new String(pdfBytes,utf8);
I have written a method,"filterXmlString" which would filter the pdfstring for special character such as
character == 0x9 /* == '\t' == 9 */
character == 0xA /* == '\n' == 10 */
character == 0xD /* == '\r' == 13 */
(character >= 0x20 && character <= 0xD7FF)
(character >= 0xE000 && character <= 0xFFFD)
(character >= 0x10000 && character <= 0x10FFFF)
String purePDF = filterXmlString(pdfString);
once I get the purePDF I am setting this as a text in one of the tags of XML
When I see the output it is some encrypted message not I want to read and print this string back to PDF
Can someone please help me with this?
Thanks a lot in advance!
Suhem