从 pdf 解析注释 [英] Parse annotations from a pdf
问题描述
我想要一个 python 函数,它接受一个 pdf 并返回文档中注释注释的文本列表.我看过 python-poppler (https://code.launchpad.net/~poppler-python/poppler-python/trunk) 但我不知道如何让它给我任何有用的东西.
I want a python function that takes a pdf and returns a list of the text of the note annotations in the document. I have looked at python-poppler (https://code.launchpad.net/~poppler-python/poppler-python/trunk) but I can not figure out how to get it to give me anything useful.
我找到了 get_annot_mapping
方法并修改了提供的演示程序以通过 self.current_page.get_annot_mapping()
调用它,但我不知道如何处理AnnotMapping 对象.好像没有完全实现,只提供了copy方法.
I found the get_annot_mapping
method and modified the demo program provided to call it via self.current_page.get_annot_mapping()
, but I have no idea what to do with an AnnotMapping object. It seems to not be fully implemented, providing only the copy method.
如果有任何其他库提供此功能,那也很好.
If there are any other libraries that provide this function, that's fine as well.
推荐答案
结果表明绑定不完整.现在已修复.https://bugs.launchpad.net/poppler-python/+bug/397850一个>
Turns out the bindings were incomplete. It is now fixed. https://bugs.launchpad.net/poppler-python/+bug/397850
这篇关于从 pdf 解析注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!