如何验证 PDF 或 Excel 文件未损坏

发布于 2024-09-16 08:33:32 字数 431 浏览 2 评论 0原文

我有点进退两难,我们即将雇用一名实习生,他的第一份工作将是检查大约 200 个 PDF、40 个 Adob​​e Photoshop 文件、大约 300 个 Word 文档和 120 个 Excel 文件,以验证它们是否未损坏以及是否已损坏。对它们有任何保护(密码)。

我不想让这个孩子感到无聊,所以我正在考虑将其自动化。我想知道如何验证 PDF 文件是否有效以及它们是否有密码,而无需在 Acrobat 中打开它们。

是否有我可以查找的 BOM,或者 PDF 是否足够可解析以使用 iTextSharp 之类的东西?至于Office文件,我希望Office Interop可以查看该文件并通过对象模型告诉我?我不确定 Photoshop 是否可行,所以他必须手动完成。

这将用 C# 或 Delphi.NET(我们的语言)编写为一个小型 WinForms 应用程序。

有什么想法吗?

I have a slight dilema, we're about to hire an intern and his first job will be to go through roughly 200 PDFs, 40 Adobe Photoshop files, around 300 word documents and 120 excel files to verify that they are not corrupted and whether they have any protection on them (password).

I don't want to bore the kid, so I was thinking of automating it. I'm wondering what I can do to verify whether the PDF files are valid and whether they have any password without having to open them in Acrobat.

Is there a BOM I can look for or is PDF parsable enough to use something like iTextSharp? As for the Office files, I'm hoping Office Interop can look at the file and tell me via the object model? Photoshop I'm not sure is even possible, so he'll have to do that manually.

This will be written as a small WinForms application in C# or Delphi.NET (our language here).

Any thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

画离情绘悲伤 2024-09-23 08:33:32

您可以自动将它们打印出来或转换为图像,然后查看哪些不起作用

You could automate printing them out or converting to image and see which ones do not work

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文