Re: evince [-list] segfault with Python bindings



Hi,

2010/11/22 Pablo Rodríguez <oinos web de>:
> 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.
I just realized this weekend that the  bindings for evince-2.32 seem
to be broken.
>
> 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()
adding:

sw = gtk.ScrolledWindow()
sw.add(e)
w.add(e)

instead of the following line:
> w.add(e)

should do the work. I am afraid there is no documentation for the bindings,

Greetings,

José


> 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
> _______________________________________________
> evince-list mailing list
> evince-list gnome org
> http://mail.gnome.org/mailman/listinfo/evince-list
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]