日期:2014-05-17 浏览次数:20977 次
private static String ReadPdf(String fileName) { Stream stream =new FileStream(fileName, FileMode.Open, FileAccess.Read); Byte[] buffer = new Byte[stream.Length]; stream.Read(buffer,0,Convert.ToInt32(stream.Length)); StringBuilder sb = new StringBuilder(); CSequence sequence = ContentReader.ReadContent(buffer); sb.Append(Encoding.Unicode.GetString(sequence.ToContent())); return sb.ToString(); }