pdf中的jbig2数据不是有效的jbig2数据.错误的魔术 [英] jbig2 data in pdf is not valid jbig2 data. Wrong magic
问题描述
我想从pdf文件中提取一些jbig2数据,并使用libjbig2dec( http://sourceforge .net/projects/jbig2dec )
I would like to take some jbig2 data out of a pdf file and load it using libjbig2dec (http://sourceforge.net/projects/jbig2dec)
出于某种原因,pdf文件中的jbig2数据以此开头:
For some reason the jbig2 data in the pdf file starts with this:
00000000 00 00 00 00 30 01 01 00 00 00 13 00 00 0a 5e 00
00000010 00 0f c3 00 00 2e 23 00 00 2e 23 00 00 00 00 00
00000020 00 01 26 01 01 ff ff ff ff 00 00 0a 5e 00 00 0f
00000030 c3 00 00 00 00 00 00 00 00 00 00 03 ff fd ff 02
00000040 fe fe fe ab f3 d0 fe 9e 92 d8 9f 63 ae 67 79 b8
00000050 81 ff 57 33 90 a4 ee c2 af c8 80 dc 0d 60 1e 86
但是有效的jbig2文件应该以这种魔法开头:
But a valid jbig2 file should start with this magic:
0x97, 0x4a, 0x42, 0x32, 0x0d, 0x0a, 0x1a, 0x0a
这是怎么回事?
推荐答案
pdf格式会剥离PDF版本1.7(ISO 32000-1:2008)第7.4.7节"JBIG2Decode过滤器"中指定的jbig2文件的标题和结尾.
pdf format strips the header and the tail of the jbig2 file as specified in PDF, Version 1.7 (ISO 32000-1:2008) section 7.4.7 JBIG2Decode Filter
此外,某些pdf文件包含jbig2流,其最后一段的大小未指定(ff ff ff ff). libjbig2dec无法处理此问题.
Further, some pdf files contain jbig2 streams with last segment of unspecified size (ff ff ff ff). libjbig2dec can not handle this.
这篇关于pdf中的jbig2数据不是有效的jbig2数据.错误的魔术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!