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



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.

I think that's all.

Regards, 
-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462

Attachment: signature.asc
Description: PGP signature



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