GNOME Bugzilla – Bug 336633
pdf detected as text
Last modified: 2006-04-18 13:01:54 UTC
That issue has been mentioned on https://launchpad.net/malone/bugs/36106 "... I can reproduce this problem for some PDF files (files are recognized as "text/plain" but can be opened with evince/xpdf/acroread). I'm not sure whether this plays a role or not but all PDF documents that are not recognized by nautilus (no problem using the file command) are PDF 1.4 documents. However, there are PDF 1.4 documents that are correctly recognized. My gnome is up-to-date: libgnome2-vfs 2.14.0-0ubuntu1 nautilus 2.14.0-0ubuntu3 Unfortunately I don't have a small file to attach, but the pdf manual from the pgf package is an example of a not correctly recognized file. After installing pgf it can be found at /usr/share/doc/texmf/latex/pgf/version-for-pdftex/en/pgfmanual.pdf.gz "gunzipping" gives a pdf file recognized as "text/plain". ..." The mentionned .pdf can be downloaded on http://pkg-gnome.alioth.debian.org/bugzilla/pgfmanual.pdf "$ gnomevfs-info -s pgfmanual.pdf Name : pgfmanual.pdf Type : Regular MIME type : text/plain Default app : gedit.desktop ..." It starts by "%PDF-1.4" so should match the "%PDF-" magic
kylesm@gmail.com
The file is recognized correctly using an 2.12 version (2.12.1-0ubuntu2) of gnome-vfs $ gnomevfs-info pgfmanual.pdf ... Name : pgfmanual.pdf Type : Regular MIME type : application/pdf Default app : evince.desktop ...
gnomevfs-info doesn't use the mimemagic by default, you need "-s" option for that which might be a new option
Another bug about that: https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/36817 "I can't open pdf's from nautilus anymore. It complains that "The filename "letter.pdf" indicates that this file is of type "PDF document". The contents of the file indicate that the file is of type "plain text document". If you open this file, the file might present a security risk to your system." Well DUH OF COURSE pdf files look like text files. This problem seems to happen for all pdf files that are generated by dvipdfm, even though all those documents are correctly identified by file as pdfs, and evince, xpdf, acroread and gv can display them correctly. PDF's generated directly by pdflatex or by ps2pdf work fine. This is on dapper with nautilus 2.14.0-0ubuntu3 and tetex-base 3.0-15build1. ... > Thanks for your bug. Do you have an example to point? ... http://librarian.launchpad.net/1843061/letter.pdf Attaching a pdf that nautilus won't open http://librarian.launchpad.net/1843062/letter.tex Attaching the TeX source for the test case. Process this with latex and dvipdfm to get the pdf that nautilus won't open. ... +1 I just experienced this problem with a one particular pdf file (uploaded). Apparently it was created with "pdfeTeX-1.21a" http://librarian.launchpad.net/1927039/avr-libc-user-manual-1.2.5.pdf Troublesome PDF"
This is a shared-mime-info database problem. Filed here: https://bugs.freedesktop.org/show_bug.cgi?id=6577
*** Bug 338231 has been marked as a duplicate of this bug. ***
I have a problem quite like this one: i have several pdf files that are detected by nautilus as "plain text" files, however when i run gnomevfs-info on the command like it seems to be correctly identified. This does not happen with all the pdf only with a handful of them. I'm using gnome-vfs and nautilus from CVS HEAD.