【问题标题】:Understand pdf structure with flatedecode用 flatedecode 理解 pdf 结构
【发布时间】:2019-02-05 15:43:07
【问题描述】:

美好的一天!

我阅读了关于 pdf 的文档,但我遇到了一些全球性问题。

https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf

我需要带有交叉引用流的 pdf 文件中的外部参照表。

这是pdf文件 https://ufile.io/q77el

部分pdf文件: 起始外部参照 22827515 %%EOF

这是这部分:

6628 0 obj
<<
/W [1 4 1]
/Info 1 0 R
/Root 2 0 R
/Size 6629
/Type /XRef
/Filter /FlateDecode
/Length 3996
/DecodeParms <<
/Columns 6
/Predictor 12
>>
>>
stream
  xÚí]{|ŽåŸç=ïÝf6­LNIŒ³ŒeHŽ;ÙæÜÁ!D¥ƒèWé...
endstream

我找到了这个文本,使用函数 gzucompress 并拥有这个

$a = gzuncompress(substr($match[2][0],1,-1));

0200 0000 0000 ff02 0200 0000 0301 02ff
0000 000c 0002 0000 000f 7e00 0201 0000
f176 0102 ff00 0000 c2ff 0201 0000 003e
0202 0000 0000 0001 0200 0000 0000 0102
0000 0000 0001 0200 0000 0000 0102 0000
0000 0001 0200 0000 0000 0102 ff00 000d
3bf8 0201 0000 f3c5 0902 0000 0000 0001
0200 0000 0000 0102 0000 0000 0001 0200
0000 0000 0102 0000 0000 0001 0200 0000
0000 0102 0000 0000 0001 0200 0000 0000

txt file

但这意味着什么? 我看到 /W [1 4 1] 意味着我需要将字符串分成 3 部分:1 字节 4 字节 1 字节

02 00000000 00 ff 02020000 00 03 0102ff00 00 00 0c000200 00

但这不起作用。 请告诉我我的下一步是什么。谢谢!

【问题讨论】:

  • 您考虑过 W 但您忽略了 DecodeParms 中的 ColumnsPredictor 值.查看 ISO 32000-1 中的第 7.4.4.4 节“LZW 和 Flate 预测函数”。
  • 您使用预测器信息成功解码数据了吗?

标签: pdf


【解决方案1】:

Answer - 预测器信息。 /第 6 列 - 表示 n+1 上的 splin /Predictor 12 - 表示这是 png 算法

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-27
    • 2012-07-28
    • 2023-04-01
    • 1970-01-01
    相关资源
    最近更新 更多