[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading
From: |
Richard Shann |
Subject: |
Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file |
Date: |
Tue, 19 Mar 2013 20:51:52 +0000 |
This sounds great - I have just uploaded a demo
https://vimeo.com/62188678
When I watched it (on a windows machine) it suffered rather from some
blacking out at the start, but generally I am quite pleased with it.
Any comments would be welcome - if anyone has time/inclination/expertise
to improve it I can send the original (I see that they have compressed
it some more).
Can we host it in good resolution on denemo.org? It is 18 Mb as I
uploaded it - now sure what they have compressed it to.
Richard
On Tue, 2013-03-19 at 13:03 -0500, Jeremiah Benham wrote:
> Ok. I figured out how to do it without the install of all the libs
> into ~/lib. I also set the mime type in pdfdocument.evince-backend to
> include application/octet-stream. Now its working fine. The only thing
> that gets copied outside of Denemo.app/ is the fonts. I found a
> website with some code that claims that it is a way to do this in c so
> that the install outside of Denemo.app is unnecessary. I may just call
> this good though.
>
> I have tested portmidi and it works. portaudio seems to work because I
> hear audio on playback. evince is now working and all the guile stuff
> appears to be loading. Everything seems to work now.
>
> I am going to post this bundle on the facebook group for testers and
> if I don't hear big issues then I will release it as 1.0.
>
> I am goint to gub up a linux binary soon. I believe what I have
> learned about evince can be applied to the Linux binary.
>
> Jeremiah
>
> On Tue, Mar 19, 2013 at 11:56 AM, Jeremiah Benham
> <address@hidden> wrote:
> I got it working. I added mach-o support to evince. Then I
> copied Denemo.app/Contents/Resources/lib to ~/lib. I am hoping
> I can avoid doing this though. My next step is to read man
> dlopen. If all else fails, I guess I can do something like:
> ln -s $PREFIX/lib ~
> $PREFIX/bin/denemo
> rm ~/lib
>
> Jeremiah
>
> On Mar 19, 2013 11:17 AM, "Richard Shann"
> <address@hidden> wrote:
> Jeremiah I have had another response from
> <address@hidden> the
> evince list (to my original post):
> Hi Richard,
> How are you compiling evince? One way of encountering
> the errors you are
> facing is that either shared-mime-info is not
> installed on your system
> or glib is not finding it, so please double check that
> you have
> shared-mime info installed [1] (If you are using
> jhbuild, just do
> jhbuild install shared-mime-info)
> Greetings
> José
>
> [1]
> http://freedesktop.org/wiki/Software/shared-mime-info
>
>
> On Tue, Mar 19, 2013 at 4:48 AM, Richard Shann
> <address@hidden> wrote:
> Hi Hib,
>
> I have had some feedback from Jeremiah who is
> working with the
> Mac on
> the evince library build, he ran the call to
>
>
>
> ev_file_get_mime_type("file:///tmp/DenemoYBsSdY/denemoprintB.pdf", 1,
> NULL)
>
> in gdb and got back the string
>
> "text/plain"
>
> So he appended ";text/plain" and
> ";application/octet-stream" for
> good
> measure to the pdfdocument.evince-backend
> file:
>
>
>
> MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf;application/x-ext-pdf;text/plain;application/octet-stream
>
> but reports it still didn't load.
>
> He says he is still hacking so there is no
> need to respond to
> this
> unless you have a specific idea (e.g. about
> that "text/plain"
> thing)
> that will help.
>
> Thanks again,
>
> Richard
>
> > > 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
>
>
>
>
>
> _______________________________________________
> evince-list mailing list
> address@hidden
>
> https://mail.gnome.org/mailman/listinfo/evince-list
>
>
>
>
> On Tue, 2013-03-19 at 08:28 -0500, Jeremiah Benham
> wrote:
> >
> >
> > On Tue, Mar 19, 2013 at 6:23 AM, Richard Shann
> > <address@hidden> wrote:
> > Jeremiah - here is the response from the
> evince list about the
> > text/plain value.
> > Can you run the
> >
>
> ev_file_get_mime_type("file:///tmp/DenemoYBsSdY/denemoprintB.pdf", 0,
> > NULL)
> >
> > This returned:
> > application/octet-stream
> >
> > I set it to look for the modules path using getenv
> and now I am
> > getting some errors. Maybe I can copy
> libevdocument.2.dylib to
> > libevdocument.2.so or something.
> libevdocument.2.dylib exists with
> >
> /jeremiahbenham/Desktop/Denemo.app/Contents/MacOS/../Resources/lib. I
> > placed it in my LD_LIBRARY_PATH. Here is the error:
> >
> > (denemo:179): EvinceDocument-WARNING **:
> >
>
> dlopen(/Users/jeremiahbenham/Desktop/Denemo.app/Contents/MacOS/../Resources/lib/evince/2/backends/libpdfdocument.so,
> 10): Library not loaded: /usr/lib/libevdocument.2.dylib
> > Referenced
> >
> from:
> /Users/jeremiahbenham/Desktop/Denemo.app/Contents/MacOS/../Resources/lib/evince/2/backends/libpdfdocument.so
> > Reason: image not found
> >
> > (denemo:179): EvinceDocument-WARNING **: Cannot load
> backend
> > 'pdfdocument' since file
> >
>
> '/Users/jeremiahbenham/Desktop/Denemo.app/Contents/MacOS/../Resources/lib/evince/2/backends/libpdfdocument.so'
> cannot be read.
> > warning: Ignored unknown object module at 0x1998d300
> with type
> > 0x38c85a
> >
> >
> > (denemo:179): EvinceDocument-WARNING **:
> >
>
> dlopen(/Users/jeremiahbenham/Desktop/Denemo.app/Contents/MacOS/../Resources/lib/evince/2/backends/libpdfdocument.so,
> 10): Library not loaded: /usr/lib/libevdocument.2.dylib
> > Referenced
> >
> from:
> /Users/jeremiahbenham/Desktop/Denemo.app/Contents/MacOS/../Resources/lib/evince/2/backends/libpdfdocument.so
> > Reason: image not found
> >
> > (denemo:179): EvinceDocument-WARNING **: Cannot load
> backend
> > 'pdfdocument' since file
> >
>
> '/Users/jeremiahbenham/Desktop/Denemo.app/Contents/MacOS/../Resources/lib/evince/2/backends/libpdfdocument.so'
> cannot be read.
> >
> > ** (denemo:179): WARNING **: Trying to read the pdf
> file
> > file:///tmp/DenemoXTxl4l/denemoprintB.pdf gave an
> error: File type
> > application/octet-stream type
> (application/octet-stream) is not
> > supported
> >
> >
> > Jeremiah
> >
> >
> >
> > call he suggests, the different second
> parameter is a boolean
> > which
> > toggles between "fast" mime type detection
> and slow. We were
> > calling for
> > "fast".
> >
> > He gives a helpful reference to where in the
> code this is
> > going on ...
> > email is below
> > 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><
> >
> > On Tue, Mar 19, 2013 at 9:48 AM, Richard
> Shann
> > <address@hidden> wrote:
> > > Hi Hib,
> > >
> > > I have had some feedback from Jeremiah who
> is working with
> > the Mac on
> > > the evince library build, he ran the call
> to
> > >
> > >
> >
>
> ev_file_get_mime_type("file:///tmp/DenemoYBsSdY/denemoprintB.pdf", 1,
> > NULL)
> > >
> > > in gdb and got back the string
> > >
> > > "text/plain"
> >
> > "text/plain" is obviously not correct, it
> should be something
> > with
> > 'pdf' in it I guess.
> >
> > Could you see what
> >
> >
>
> ev_file_get_mime_type("file:///tmp/DenemoYBsSdY/denemoprintB.pdf", 0,
> > NULL)
> >
> > gives back as well?
> >
> > Evince code for mime type detection is in
> > libdocument/ev-file-helpers.c.
> > I'm afraid it is a bit unpredictable when
> glib fails to find
> > the
> > correct mime-type/content-type.
> >
> > On Tue, 2013-03-19 at 00:46 -0500, Jeremiah
> Benham wrote:
> > > 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
> > > >
> >
> >
> >
> >
>
>
>
- [Denemo-devel] ev_document_factory_get_document not loading pdf file, Richard Shann, 2013/03/17
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file, Richard Shann, 2013/03/18
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file, Jeremiah Benham, 2013/03/18
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file, Jeremiah Benham, 2013/03/19
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file, Richard Shann, 2013/03/19
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file, Jeremiah Benham, 2013/03/19
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file, Richard Shann, 2013/03/19
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file, Jeremiah Benham, 2013/03/19
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file, Jeremiah Benham, 2013/03/19
- Re: [Denemo-devel] [evince] ev_document_factory_get_document not loading pdf file,
Richard Shann <=