我试图读取PDF而不使用任何第三方dll。
我在谷歌搜索,但没有找到一个好的链接继续进行。
在一些链接中,我发现:我们不能阅读PDF的内容,因为它是二进制格式的。
是否有任何方式读取PDF没有第三方dll或我们必须使用第三方dll读取PDF?
发布于 2013-07-25 07:40:21
你必须使用第三方解决方案
我推荐PDFSharp
发布于 2013-07-25 07:42:53
试试吧,
byte[] yourByteData = .. assign your pdf data here ....
Response.ClearHeaders();
Response.Clear();
Response.AddHeader("Content-Type","application/pdf");
Response.AddHeader("Content-Length",yourByteData.Length.ToString());
Response.AddHeader("Content-Disposition","inline; filename=sample.pdf");
Response.BinaryWrite(yourByteData);
Response.Flush();
Response.End();https://stackoverflow.com/questions/17851570
复制相似问题