Re: [evince] EvView: Loading from memory, instead of a file



On Fri, 2011-07-15 at 12:15 +0200, Carlos Garcia Campos wrote:
> Excerpts from Murray Cumming's message of vie jul 15 10:19:09 +0200 2011:
> > I'm using EvView in Glom:
> > http://www.murrayc.com/blog/permalink/2011/07/14/glom-storing-pdfs/
> > 
> > The PDFs are in a database, instead the filesystem. So I'm saving a
> > temporary file and giving the URI to e_job_load_new():
> > http://developer.gnome.org/libevview/stable/EvJob.html#ev-job-load-new
> > 
> > But is there some way to load it from memory instead? Or do you have
> > suggestions for how to implement that in EvView?
> > 
> 
> There's poppler_document_new_from_data() but it's not supported by
> evince. To implement it you should add:
> 
>  - libview/ev-jobs: ev_job_load_new_with_data()
> 
>  - libdocument/ev-document-factory:
>  ev_document_factory_get_document_from_data() using gio to guess the
>  mime type of the data.
>  
>  - libdocument/ev-document: ev_document_load_from_data() and implement
>  it in the backends that support it.
> 
>  - I think we are assuming a document always has an URI, so you would
>  need to check where the document URI is used.

Thanks. This patch works for me:
https://bugzilla.gnome.org/show_bug.cgi?id=654832

I should investigate the other backends and maybe document it as only
working for some backends, but maybe it's a start.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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