Bug 167292 - kpdf after saving a pdf file to the documents folder, it is listed as txt file and no more as pdf
Summary: kpdf after saving a pdf file to the documents folder, it is listed as txt fil...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 14:57 UTC by Defrenne M
Modified: 2008-12-30 09:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Defrenne M 2008-07-23 14:57:02 UTC
Version:            (using KDE 3.5.9)
Installed from:    Ubuntu Packages
OS:                Linux

every time, I use to save a pdf document in the folder documents, the file is corrupt and look for the system as it was a text file. Kpdf can not open that file and report is : kdeini can not open file .....
Kpdf see no pdf file although there is one or more, and if I try to open that file by clicking on it the header look like that:
%PDF-1.3
%����

6 0 obj << /Type /Page
/Resources << /Font 4 0 R /ProcSet [ /PDF /Text ] /XObject 5 0 R >>
/MediaBox [0 0 595.28 841.89]
/Contents 7 0 R
/Parent 8 0 R >>
endobj

7 0 obj
<< /Length 2597 /Filter [ /ASCII85Decode /FlateDecode ] >>
stream
>>>>>>
it seem to me that the questions marks on the second like are corrupt signs 

the function save seems to corrupt that kind of files
Comment 1 Defrenne M 2008-07-23 14:58:00 UTC
I may be contacted at fa372128@scarlet.be
Comment 2 Albert Astals Cid 2008-07-24 22:20:01 UTC
How do you save it? Using konqueror? kpdf? something else?
Comment 3 Defrenne M 2008-07-24 22:38:31 UTC
saved from konqueror or firefox it's the same result.
opening it directly from konqueror is ok but saving result in a corrupt file
Comment 4 Defrenne M 2008-07-25 06:38:43 UTC
In konqueror on the site "ftp://ftp.kde.org/pub/printing,kdeprinthandbookbeautified.pdf" the system open the file in kate and the report looks like thath

Le fichier « ftp://ftp.kde.org/pub/kde/printing/kdeprint-handbook-beautified.pdf » est binaire, l'enregistrer créera un fichier corrompu.

is is because the system is in french. in english " the file is binary, saving it will create a corrupt file". but this is not a binary file.
Comment 5 Albert Astals Cid 2008-07-25 17:44:19 UTC
if you try to open it from a shell, that is open konsole and type
kpdf thePathToTheFileIJustSaved.pdf
does it work?
Comment 6 Defrenne M 2008-07-25 17:56:46 UTC
Le Friday 25 July 2008 17:44:20 Albert Astals Cid, vous avez écrit :
[bugs.kde.org quoted mail]


answer from kpdf in konqueror
Impossible d'ouvrir « file:///home/caligula/Bureau/PI-COAX-05_2008.pdf »


answer in the konsole
kpdf: WARNING: Unknown mimetype 'text/plain'

does that meen something for you??
Comment 7 Albert Astals Cid 2008-07-25 18:26:05 UTC
It means that your system is broken for some reason it believes pdf files are text files, not a kpdf problem at all.

"kfile thePathToTheFileIJustSaved.pdf" from a shell
should return to you also that it is a text file while
"file thePathToTheFileIJustSaved.pdf" from a shell
would return pdf file, right?
Comment 8 Defrenne M 2008-07-25 20:35:31 UTC
Le Friday 25 July 2008 18:26:06 Albert Astals Cid, vous avez écrit :
[bugs.kde.org quoted mail]

yes correct return is pdf file
and now what to do?

the installation is right from the cd

Defrenne M
Comment 9 Albert Astals Cid 2008-07-27 23:47:30 UTC
I'm reassigning this bug to kdelibs as kfile misdetecting a pdf file as text is not a kpdf bug, but a kdelibs one.
Comment 10 Defrenne M 2008-08-01 08:38:57 UTC
Le Sunday 27 July 2008 23:47:48 Albert Astals Cid, vous avez écrit :
[bugs.kde.org quoted mail]

in konkeror config file, file association was primary listed as text.
after removing the text definition, some pdf files where opened as pdf by 
kghostview. So some part of the problem are resolved but why does this "text 
definition" come for a pdf file?
Comment 11 Defrenne M 2008-12-30 09:04:37 UTC
from fa372128@scarlet.be in fact for some unknown reason, the files where saved with some extra "return" after the first line of the file removing this let kpdf open the file as pdf file and not as text.
Why does this append , let my know but its fixed after manually removing this extra "return"