evince [-list] segfault with Python bindings
- From: Pablo Rodríguez <oinos web de>
- To: evince-list gnome org
- Subject: evince [-list] segfault with Python bindings
- Date: Mon, 22 Nov 2010 21:14:23 +0100
Hi there,
I have a small Python script that displays a PDF document thanks to the
poppler Python bindings.
Since I'm moving to a Fedora 14, that includes poppler-0.14 and there
are no poppler Python bindings for this version(yet), I have to use
evince Python bindings.
The most basic sample I found is taken from
http://blog.tomeuvizoso.net/2009/01/embedding-evince-gnome-mobile-and-gnome.html.
Tweaking it with other information found at
http://efreedom.com/Question/1-3411929/Simple-Hello-World-Program-Python-Evince,
I got the following:
import evince
import gtk
w = gtk.Window()
w.show()
e = evince.View()
w.add(e)
e.show_all()
docmodel = evince.DocumentModel()
doc = evince.document_factory_get_document('file:///home/ousia/a.pdf')
docmodel.set_document(doc)
e.set_model(docmodel)
gtk.main()
I'm afraid that it doesn't display the PDF file (I'm using
gnome-python2-evince-2.30.0.
I should be doing something wrong, but pressing the arrow keys (Up,
Down, Left and Right) leads to segmentation fault. Even if the code is
wrong, I guess this is a bug.
My questions are:
How should I add the scrolled window?
Where can I find documentation (besides the Python help itself) and
samples for the Python bindings for evince?
Thanks for your help,
Pablo
--
http://www.ousia.tk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]