zl03jsj / mupdf

扩展mupdf 实现图像数字证书签名, 手写笔迹数字证书签名, 插入图片, 手写签名注释..改进手写批注,实现模拟真实手写的算法, annot自定义数据, annot插入,删除密码校验等功能...支持ios, windows, mac, linux, c++, java, android
GNU Affero General Public License v3.0
151 stars 55 forks source link

执行 pdftest 命令时出现 cycle in page tree 错误 #5

Closed wonderffee closed 5 years ago

wonderffee commented 5 years ago

./pdftest main is call error: cycle in page tree warning: cycle in page tree

搞不明白出现这个的原因,有人知道吗

zl03jsj commented 5 years ago

是不是pdf文件解析出现了问题啊.. 先换一个pdf文件试试看.先找到问题先. @wonderffee

wonderffee commented 5 years ago

应该不是pdf 文件的问题,因为首先就是用的你提供的pdf(在iOS源码中的)来测试的,后来自己另找了一份pdf也是同样的问题 @zl03jsj

zl03jsj commented 5 years ago

ok, 回头我有空我会看看的. @wonderffee

zl03jsj commented 5 years ago

@wonderffee 我测试了一下,这个错误的原因是, 在pdf_sample.c 文件, 303行,

testAddAnnotation(ctx, doc, 17, ofile);

testAddAnnotation的第三个参数, 表示pageno, 你的pdf文件, 没有17这么多页, 所以会报错了. 我已经修改了这个参数, 默认为0