jbig2 data in pdf is not valid jbig2 data. Wrong magic

丶灬走出姿态 提交于 2019-12-13 03:45:18

问题


I would like to take some jbig2 data out of a pdf file and load it using libjbig2dec (http://sourceforge.net/projects/jbig2dec)

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

But a valid jbig2 file should start with this magic:

0x97, 0x4a, 0x42, 0x32, 0x0d, 0x0a, 0x1a, 0x0a

What's going on here?


回答1:


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

Further, some pdf files contain jbig2 streams with last segment of unspecified size (ff ff ff ff). libjbig2dec can not handle this.



来源:https://stackoverflow.com/questions/27709913/jbig2-data-in-pdf-is-not-valid-jbig2-data-wrong-magic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!