我有以下代码:
PdfReader reader = new PdfReader("test.pdf");
byte[] info = reader.Metadata;
string xml = new UTF8Encoding().GetString(info);
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
StringWriter sw = new StringWriter();
XmlTextWriter tx = new XmlTextWriter(sw);
doc.WriteTo(tx);
string str = sw.ToString();
byte[] bytedata = Encoding.UTF8.GetBytes(str);
为什么bytedata与info不同?
对于我的测试数据,info是byte [4093],bytedata是byte [1498]。