denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading


From: Jeremiah Benham
Subject: Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file
Date: Tue, 19 Mar 2013 00:46:13 -0500

I decided to hack on evince a bit. I put a few lines of code in to set the evince module dir based on environment variable. I am also going to force all files to be pdf if the filename ends with .pdf so that we don't have to mess wity mime stuff.

Jeremiah

On Mar 18, 2013 5:58 PM, "Jeremiah Benham" <address@hidden> wrote:
On 3/18/13, Richard Shann <address@hidden> wrote:
> Jeremiah -
>
> I have received this very informative reply from Hib Eris - would you like
> me to put a print-out of ev_file_get_mime_type() into the sources
> or are you able to do
>
> call ev_file_get_mime_type ("file:///tmp/Denemou<xxx>/denemoprintB.pdf", 1,
> NULL)
>
> while in gdb? (The temp directory will be <xxx> and you need either A or B
> depending).

I ran this in gdb:
(gdb) print (char *) ev_file_get_mime_type
("file:///tmp/DenemoYBsSdY/denemoprintB.pdf", 1, NULL)

This is what it returned:
$3 = 0x76836c0 "text/plain"

I ran:
file /tmp/DenemoYBsSdY/denemoprintB.pdf
it returned:
/tmp/DenemoYBsSdY/denemoprintB.pdf: PDF document, version 1.4

>
> or can you just check /usr/lib/evince/4/backends/pdfdocument.evince-backend

It looks ok. At the end it has:
MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf;application/x-ext-pdf
I appended:
;text/plain;application/octet-stream

Unfortunately it is still not loading. I am going to have to do some
tinkering I guess. I am not sure if this pdfdocument.evince-backend is
even being read. I will let you know later my progress or lack of.

Jeremiah

> first (I would guess it is ok)
> and look at the other fix - the "register the pdf mime type somewhere in
> your OS specific mime type
> store" thing.
> The email exchange follows
> Richard
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
>
> Hi Richard,
>
> On Sun, Mar 17, 2013 at 4:10 PM, Richard Shann <address@hidden>
> wrote:
>> Running GNU/Denemo on Mac OSX we use ev_document_factory_get_document()
>> to load a pdf file. On this platform (only) the call fails with the
>> message
>>
>> File type application/octet-stream type (application/octet-stream) is
>> not supported
>>
>> Can anyone suggest what might be wrong? The call is working fine on
>> GNU/Linux and on Windows.
>
> Previously, I've run into the same problem when porting Evince to
> Windows. It has something to do with Evince' mime-type
> detection/handling. I think there were several issues with it.
>
> First step to fixing this is to see what this evince function returns:
>
> mime_type = ev_file_get_mime_type (uri, TRUE, error);
>
> If that returns 'application/octet-stream', I guess you need to
> register the pdf mime type somewhere in your OS specific mime type
> store.
>
> If the mime type is something like 'application/pdf', then make sure
> the returned mimetype is specified in the file
> /usr/lib/evince/4/backends/pdfdocument.evince-backend.
>
> Regards,
>
> Hib Eris
>
>
>
>
>
>
>
>
>
>
>
> That
>
>
>
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/denemo-devel
>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]