的Adobe表示属性不正确的PDF版(PDF格式) [英] Adobe showing incorrect PDF Version (of PDF) in Properties

查看:565
本文介绍了的Adobe表示属性不正确的PDF版(PDF格式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的PDF包含%PDF-1.3的标题。这意味着PDF版本为1.3,但安装在我的系统中安装Adobe Reader(十一)显示的版本为1.5,如果看它文件>属性。

My PDF contains "%PDF-1.3" in header. It means PDF Version is 1.3 ,But Adobe reader( XI) installed on my system shows version as 1.5 if looking it in File > Properties.

什么是正确的?

1.3或1.5?

我可以通过读取PDF元数据在Java中获得的PDF版本1.3。我如何能够通过java程序获取PDF版本1.5?

I can get PDF version as 1.3 by reading PDF metadata in java. How can I get PDF version 1.5 through java program?

推荐答案

该版本在文件头可以在文件中后来被覆盖,比照的 PDF规范

The version in the file header can be overridden later in the file, cf the PDF specification:

开始使用PDF 1.4,将版本在文档的目录字典项(位于通过在文件的尾部进入,如在7.5.5中所述,文件预告),如果present,应使用,而不是在标题中指定的版本。

Beginning with PDF 1.4, the Version entry in the document’s catalog dictionary (located via the Root entry in the file’s trailer, as described in 7.5.5, "File Trailer"), if present, shall be used instead of the version specified in the Header.

(第7.5.2文件头)

因此​​,

什么是正确的?

取决于的PDF内容。如果你不能确定,请您分享您的PDF进行分析。

depends on the PDF contents. If you are not sure, please share your PDF for analysis.

关于从评论的问题...

(1)我不觉得像1.5事情上的PDF开口记事本还是它显示版本为1.5。版本会在EN codeD形式?

(1) I don’t find anything like 1.5 on pdf opening with notepad still it shows Version as 1.5. , Version would be in encoded form?

没有,但是这将是一个名称,而不是一个数字:

No, but it would be a name, not a number:

本项的值应该是一个名字对象,不是一个数字,因此应依据的时候写的PDF文件(例如,/1.4)斜线(2Fh的)字符(/)pceded $ P $。

The value of this entry shall be a name object, not a number, and therefore shall be preceded by a SOLIDUS (2Fh) character (/) when written in the PDF file (for example, /1.4).

(表28 - 目录中的词典条目)

所以搜索1.5应该找到它。除非,也就是,玉米pressed对象流(一个PDF 1.5功能)的使用和最新的目录已投入这样的对象流。

So a search for "1.5" should find it. Unless, that is, compressed object streams (a PDF 1.5 feature) are used and the newest catalog has been put into such an object stream.

(2)是否有任何PDF-API在java中可以读取这种版本的条目。

(2) Is there any pdf-api available in java to read such version entries.

您可以阅读使用任何图书馆允许访问的低级程序,如入口iText的,PDFBox的,PDFClown,...

You can read the entry using any library allowing access to its low level routines, e.g. iText, PDFBox, PDFClown, ...

(3)如果是,如何?

在iText的一个 PdfReader读

reader.getCatalog().getAsName(PdfName.VERSION)

在PDFClown为文档文件

In PDFClown for a Document document:

document.getVersion()

而原来的头版本是从文件文件使用检索:

file.getVersion()

(PDFClown提出斯特凡诺Chizzolini信息)

(PDFClown information proposed by Stefano Chizzolini)

(4)请你让我知道什么类型的内容我应该检查,以检测PDF格式的实际版本?

(4) Would you please let me know what type of content I should check to detect pdf’s actual version?

一般检查头和目录应该足够了。

Usually checking the header and the catalog should suffice.

大概,虽然,一些程序,点状出血采用了PDF功能仅present在以后的PDF规格时,返回最小的PDF规范的版本中,所有的功能都present。在这种情况下,你必须检查所有可达PDF内容。

Probably, though, some programs, when spotting the use of a PDF feature only present in later PDF specifications, return the smallest PDF specification version in which all used features are present. In that case you'd have to check all the reachable PDF content.

这要特别有意义的1.5引入交叉引用和对象流。

This would especially make sense for cross reference and object streams introduced in 1.5.

另外,如果我编辑页眉PDF头与1.6版本,它显示的版本为1.6,因此它意味着的Adobe dosent通过在文档的目录字典版入门覆盖显示属性,它需要更高版本的这两个。

Also If I edit header PDF header with version 1.6, It shows version as 1.6, so it means Adobe dosent display property overridden by Version entry in the document’s catalog dictionary, It takes later version from both of these.

这是正确的,它也将在版本目录条目的说明书中提到的:

That's correct, and it is also mentioned in the specification of the Version catalog entry:

PDF规范的版本哪个文件符合(如1.4),如果以后比在文件头中指定的版本(参见7.5.2,文件头)。如果头指定更高版本,或者如果该条目不存在,该文件应符合标题中指定的版本。

The version of the PDF specification to which the document conforms (for example, 1.4) if later than the version specified in the file’s header (see 7.5.2, "File Header"). If the header specifies a later version, or if this entry is absent, the document shall conform to the version specified in the header.

(表28 - 目录中的词典条目)

关于所提供的屏幕截图

在OP提供的截图:

我们可以清楚地看到,有问题的文件被线性化(左侧可以看到的线性参数字典和右侧,这是通过确认快速Web查看:是)。继线性参数的字典里是第一页的交叉引用,而这些交叉引用是作为一个的交叉引用流的,而不是一个交叉引用表。

One can clearly see that the file in question is linearized (on the left side one can see the linearization parameter dictionary and on the right side this is confirmed by "Fast Web View: Yes"). Following the linearization parameter dictionary there are the cross references for the first page, and these cross references are provided as a cross reference stream, not a cross reference table.

使用交叉引用表交叉引用流,而不是交叉引用流的PDF 1.5已经出台,和PDF文件甚至不能根据PDF 1.4和1.3的参考解析。

Cross reference streams have been introduced in PDF 1.5, and PDFs using cross reference streams instead of cross reference tables cannot even be parsed according to the PDF 1.4 and 1.3 references.

我认为Adobe Reader的要求,因为这unparsability按规范1.5以前的版本1.5。

I assume that Adobe Reader claims a version 1.5 because of this unparsability according to specifications before 1.5.

我想,我将无法获取1.5的版本,从PDF文件使用其他的API。是不是这样呢?

I think, I would not be able to fetch 1.5 as version from PDF with other API. Is it so?

我想是这样,至少马上;许多图书馆可以向用户隐藏这些细节(如交叉引用流或表是否使用)。如你没有提供的PDF格式的问题,但是,这仅仅是一种假设。

I assume so, at least immediately; many libraries may hide such details (like whether cross reference streams or tables are used) from the user. As you have not provided the PDF in question, though, this is a mere assumption.

什么解决方案,我应该向我的客户?我一直在出版领域段。工作中的Java开发的应用程序,我们所拥有的验证检查:系统不能让PDF版本1.3及以前

What solution I should provide to my customer? I have been working in Publishing domain segment. Working in an application developed in java, we do have the validation check : System must not allow PDF version 1.3 and before.

这要求已经没有很好的定义。什么 PDF版本1.3及之前的?

That requirement already is not well defined. What is a PDF version 1.3 and before?

  • 它是一个PDF文件,该文件的确声称自己是 1.3或之前

  • Is it a PDF file which does claim to be 1.3 or before?

作为一个特殊的情况下,何谈PDF文件声称不同的版本?例如。在标题和目录,或者在不同的增量更新不同的条目不同的条目。就是这样一个PDF的 1.3或之前的,如果不同项目中的一个是1.3或之前?或者,只有当所有都是1.3或之前?抑或是最新的目录版本项需要1.3或之前?

As a special case, what about PDFs claiming different versions? E.g. different entries in header and catalog, or different entries in different incremental updates. Is such a PDF 1.3 or before if one of the differing entries is 1.3 or before? Or only if all are 1.3 or before? Or does the newest catalog version entry need to be 1.3 or before?

它是一个PDF文件,其中一个选择的指标方案(如Adobe Reader的一个固定的版本)的识别为 1.3或之前

Is it a PDF file which a chosen indicator program (e.g. Adobe Reader in a fixed version) recognizes as 1.3 or before?

它是一个PDF根据PDF参考是有效的 1.3或之前

Is it a PDF which is valid according to a PDF reference 1.3 or before?

或者它是一个PDF根据任何PDF参考这是无效的 1.4,在

Or is it a PDF which is not valid according to any PDF reference 1.4 and after?

唯一容易实现的第一个变种(已经决定在特殊情况下),但是客户从出版方面最有可能的意思是沿着过去的变种线的东西。

The only thing easy to implement is the first variant (having decided on the special cases), but what customers from the publishing context most likely mean is something along the lines of the last variant.

我们检查使用PDF工具盒-java的罐子PDF版本。这给PDF版本为1.3,所以得到验证失败。客户端质疑其权利的PDF显示屏幕截图,打开PDF,文件>属性。现在,应该是什么下一步?

We check pdf version using PDF Tool Box-java jar. Which gives pdf version as 1.3 ,So validation gets failed. Client is questioning that its right pdf showing a screen shot from opening PDF, File > Properties. Now, what should be the next step?

下一步?与客户扎堆到一个共同的理解什么的 PDF版本1.3及之前的意思。然后考虑如果你仍然想实现这一点。它可能是一些人年的问题。

The next step? Get together with the customer and get to a common understanding what a PDF version 1.3 and before means. And then reconsider if you still want to implement that. It might be a matter of some person years.

这篇关于的Adobe表示属性不正确的PDF版(PDF格式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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