你有一个py-poppler-qt例子吗? [英] have you got a py-poppler-qt example?

查看:107
本文介绍了你有一个py-poppler-qt例子吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在PyQt4中开发一个应用程序,最终必须打开并显示PDF文件.对于此任务,有一个python库:python-poppler(各种拼写样式).

I'm developing an application in PyQt4 that eventually has to open and show PDF files. For this task there is a python library: python-poppler (in various spelling flavours).

问题是它的文档非常少,到目前为止,我发现的唯一简单的工作示例使用Python + Gtk + Cairo,而我发现的Python + Qt的示例使用了该库的旧版本,并且进行了许多重大更改从那以后发生过,因此不再起作用. 我正试图使用​​PyGtk示例中的代码来破解PyQt代码的一周,但到目前为止没有成功.

The problem is that it is terribly under documented and the only simple working example I found so far uses Python+Gtk+Cairo, while the example with Python+Qt I found uses an older version of the library, and many major changes have occurred ever since, hence it doesn't work anymore. It's a week I'm trying to use the code in the PyGtk example to hack the code of the PyQt one, but no success so far.

有人能打开并显示一个PDF文件的Python-Qt程序的简单示例吗?这可能对社区了解如何使用该库很有用?

Has anybody got a simple example of a Python-Qt program that opens and shows a PDF file, which might be useful to the community to see how to work with that library?

非常感谢.

使用损坏的pyqt示例进行存档

归档与有效的PyGtk示例

推荐答案

下面是一个埋在应用程序的实验性(未使用)分支中的示例,这是指向包含代码的特定文件的链接.不知道对您有帮助吗?所有相关的poppler代码都包含在该文件底部的PdfViewer类中.

There is an example buried deep within an experimental (unused) branch of an app, here is a link to the specific file containing the code. Don't know if it'll help? All the relevant poppler code is self contained within the PdfViewer class at the bottom of that file.

http://bazaar.launchpad.net/~j-corwin/openlp/pdf/annotate/head:/openlp/plugins/presentations/lib/pdfcontroller.py

这篇关于你有一个py-poppler-qt例子吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆