PDF文件格式的文档目录中的/Type确实必要吗? [英] Is /Type in Document Catalog of PDF file format really necessary?

查看:312
本文介绍了PDF文件格式的文档目录中的/Type确实必要吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些PDF文档目录中的/Type没有值. 他们有一个文档目录,例如

I have some PDFs for which there is no value for /Type in the document catalog. They have a document catalog like

<<
/Pages 3 0 R
/Metadata 4 0 R
>>

但是 https://www.safaribooksonline.com/library /view/pdf-explained/9781449321581/ch04.html 表示

/Type*(Required) Must be /Catalog.

但是,即使如上所述缺少此内容,Acrobat Reader也会打开PDF. 那么,为什么即使文档目录中缺少/Type,这种类型的PDF也没有标记为已损坏?还是可选的?

But even if this is missing as mentioned above, PDF is getting opened by Acrobat Reader. So why are such type of PDFs not marked as corrupted even if /Type is missing from Document Catalog? Or it is optional?

我的问题是我必须过滤掉损坏的PDF文件.我正在使用jPod库,并且如果/Type不等于/Catalog或缺少它,该库会将PDF标记为损坏. 我们可以删除这张支票吗?

My problem is that I have to filter out corrupted PDF files. I am using jPod library and that library mark a PDF as corrupted if /Type is not equal to /Catalog or if it is missing. Can we remove this check ?

推荐答案

如果您对PDF软件质量的普遍下降感到内contributing,那就该死!

根据表28(在页面上的第7.7.2章中)在Adobe发布的官方ISO 32000-1标准的第73条中),显然,必需是文档目录对象中的/Type条目.

Be damned if you are guilty contributing to the general decline of PDF software quality!

According to Table 28 (in chapter 7.7.2 on page 73 of the official ISO 32000-1 standard as published by Adobe), the /Type entry in the document catalog object clearly is required.

(也:不要依赖您链接到的书.毫无疑问,这本书是很好的资源-但是PDF-1.7文件格式的官方规范是ISO标准,而文件I链接到上面.请始终对照标准进行检查-仅使用您的书以更轻松地访问某些主题,但不要忽略官方标准!)

不幸的是,那里有许多实现并没有抱怨PDF文件损坏,并且在没有通知用户或开发人员任何遇到的问题的情况下打开了文件.他们默默地修复"了这些文件,但没有将此通知用户. Adobe Acrobat软件就是这种行为的罪魁祸首.

Unfortunately, there are a lot of implementations out there which do not complain about b0rken PDF files, and which open the file without notifying the user or developer about any problems encountered. They silently "repair" these files, but they do not inform the users about this. Adobe Acrobat software is amongst those guilty of this behaviour.

这很糟糕,甚至很严重! ,因为它鼓励其他开发人员和PDF文件格式的实施者同样草率行事.

This is bad, extremely bad even!, because it encourages other developers and implementors of the PDF file format to become equally sloppy.

最终结果是:所有PDF生成软件的质量都会下降.它将打开越来越多的弱点,以备将来被坏蛋"利用.

The end result is: all PDF producing software will degenerate in quality. It will open more and more weak spots that can be exploited by the "bad guys" in the future.

别那样-保持检查到位! 如果您不这样做,您将因PDF软件质量的普遍下降而感到内.

Don't be like that -- keep your check in place! If you don't, you're becoming guilty contributing to the general decline of PDF software quality.

如果你是该死的!

Be damned if you are!

这篇关于PDF文件格式的文档目录中的/Type确实必要吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆