Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打开部分pdf,当书签是同时显示印刷页和实际页的类型时会退出 #37

Open
vincentaxhe opened this issue Jun 21, 2024 · 6 comments
Labels

Comments

@vincentaxhe
Copy link

vincentaxhe commented Jun 21, 2024

有的pdf是靠右显示印刷页和实际页的像Page A (1),当打开这类pdf时,会因为有书签却读不出而退出。而且一直写入书签的方法也是不能保留印刷页码的,这个writer.add_outline_item就是不能的。
不知道保留印刷页但以实际页跳转是哪个库可以做的。

@chroming
Copy link
Owner

你指的是
page 2 1
这样的结构?印刷页1, 实际页2?

@vincentaxhe
Copy link
Author

链接: https://pan.baidu.com/s/1TRQ9HlTUobTmVK6eIanvdA?pwd=kgrt 提取码: kgrt
你可以用这个pdf打开看下,并测试下

@vincentaxhe
Copy link
Author

用zathura会显示印刷页和实际页,在evince只会显示印刷页,但同样会导航到实际页

@vincentaxhe
Copy link
Author

有个丑陋的读取这类pdf不失败的方法,用pdftk xx.pdf dump_data_utf8,能读取实际页数,但不含有印刷页信息

@chroming chroming added the bug label Jun 25, 2024
@chroming
Copy link
Owner

chroming commented Jun 25, 2024

试了下发现退出是因为已有目录读取失败时会报错退出,尝试修复了这个问题又发现新的问题,等有空再修了
印刷页目前还不太清楚是否有方法能支持

@chroming
Copy link
Owner

修复了读取pdf失败退出的问题:
https://github.com/chroming/pdfdir/releases/tag/v0.3.0-beta25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants