简体   繁体   English

pdfbox或itextsharp或pdfsharp可以读取损坏的pdf文件吗

[英]Can a pdfbox or itextsharp or pdfsharp reads corrupted pdf file

I recently downloaded pdf libraries ( pdfbox, pdfsharp, itextsharp), and I am trying to figure out can i parse corrupted pdf files with in Asp.Net. 我最近下载了pdf库(pdfbox,pdfsharp,itextsharp),并且我试图找出我可以在Asp.Net中解析损坏的pdf文件。 which lib is best for reading corrupted pdf file. 哪个库最适合读取损坏的pdf文件。

If the file is corrupt, there is no guaranteed way to read it. 如果文件已损坏,则无法保证读取该文件。 You cannot know which part or parts are corrupt. 您不知道哪一部分损坏。 You could use a hex editor utility and manually inspect which parts might be corrupted, but there is no way to use any of the libraries you mentioned to open a corrupted file. 您可以使用十六进制编辑器实用程序并手动检查哪些部分可能已损坏,但是无法使用您提到的任何库来打开损坏的文件。 They all work off the PDF specification, which assumes a valid PDF file. 它们都基于假定有效的PDF文件的PDF规范。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM