如何使用DBU中的EVINCE中的开放式PDF文档获取当前页码?
如果我在Evince(GNOME文档查看器)中打开PDF文档,如何使用DBU获取当前页码?
使用Zathura我可以使用以下命令获取页码:(
busctl get-property --user org.pwmt.zathura.PID-1123767 \
/org/pwmt/zathura \
org.pwmt.zathura pagenumber
我已经使用 d-feet 获取总线,对象和接口名称)。
但是,当谈到Gnome Evince时,我找不到任何API来检索当前页码。
有什么选择吗?
PS:我在Ubuntu上使用EVINCE 3.36.10
20.04
If I open a PDF document inside evince (GNOME Document Viewer), how do I get the current page number using DBus?
using zathura I could get the page number using the following command:
busctl get-property --user org.pwmt.zathura.PID-1123767 \
/org/pwmt/zathura \
org.pwmt.zathura pagenumber
(I have used D-Feet to get the bus, object, and interface names).
However, when it comes to Gnome evince, I can't find any API to retrieve the current page number.
Are there any options to achieve that?
P.S: I am using evince 3.36.10
on Ubuntu 20.04
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为没有办法使用DBU检索这些信息。但是,可以使用GVF(GNOME虚拟文件系统)检索与页码相关的元数据:
每当您滚动页面时,此信息都会更新。
一个重要的说明(根据我的测试)是该文档不应在
/tmp
目录中,因为看来这些元数据没有保存。I think there is no way to retrieve that information using DBus. However, one can use GVFS (Gnome Virtual File System) to retrieve the metadata relevant to the page number:
This informations is updated whenever you scroll the page.
One important note (according to my tests) is that the document should not be under
/tmp
directory as it appears that those metadata are not saved.