pdf头 格式

%PDF-1.7

 

pdf文件是从文件最后开始读的,我们以某一pdf为例:

示例pdf文档的地址在https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/AnimationGuide/AnimationGuide.pdf

这个pdf文件的最末端是:

 startxref

 174134

 %%EOF

 

在pdf文件中存在一个交叉引用表(cross reference table),这个表在pdf文件中非常重要,它的具体作用在后文介绍。

 startxref下一行的数字174134是什么含义呢?这是一个十进制数字,它表示交叉引用表开始的位置,于是定位到文件中的174134字节

>
startxref
254632
%%EOF

如何定位到254632字节

表示交叉引用表开始的位置:

xref
0 17
0000000000 65535 f
0000000015 00000 n
0000000100 00000 n
0000000281 00000 n
0000000991 00000 n
0000001058 00000 n
0000001183 00000 n
0000003208 00000 n
0000003347 00000 n
0000003570 00000 n
0000003948 00000 n
0000008906 00000 n
0000248134 00000 n
0000248261 00000 n
0000251100 00000 n
0000251227 00000 n
0000254485 00000 n

posted on 2020-01-17 16:03  lydstory  阅读(902)  评论(0)    收藏  举报

导航