Bug 208119

Summary: Wrong error message when saving a file with /Encrypt
Product: [Applications] okular Reporter: Dima Ryazanov <dima>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: m.wege, pete
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dima Ryazanov 2009-09-21 21:37:34 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Ubuntu Packages

I opened a PDF file downloaded by Firefox, then tried to save it. I got the error message:
"File could not be saved in '/home/dima/N-400.pdf'. Try to save it to another location."

Why couldn't it be saved? I certainly have "write" permissions, and Okular created a 0-byte file with that name.
Comment 1 Peter Lewis 2009-10-03 16:09:42 UTC
I'm getting this too.

I think it might be the same as bug 163363, which is due to firefox. See here:
https://bugzilla.mozilla.org/show_bug.cgi?id=437767
Comment 2 Albert Astals Cid 2009-10-04 22:13:36 UTC
Probably, are you getting this error only if you
 * open firefox
 * click on pdf to open okular
 * close firefox
 * save file in okular
or also if you
 * open firefox
 * click on pdf to open okular
 * save file in okular
 * close firefox
?
Comment 3 Dima Ryazanov 2009-10-05 00:05:06 UTC
No, actually - I never closed Firefox.
I'll try it again when I get a chance, but I wasn't doing anything unusual.
Comment 4 Dima Ryazanov 2009-10-05 20:12:29 UTC
Apparently, it happens without Firefox, too.
I just click a PDF file in Dolphin, then click "Save As..." in Okular.
Comment 5 Albert Astals Cid 2009-10-05 20:21:04 UTC
Are you saving the file over itself?
Comment 6 Dima Ryazanov 2009-10-05 20:25:48 UTC
Um, no.
But looks like it only affects certain PDFs. Try this one: http://www.uscis.gov/files/form/N-400.pdf
Comment 7 Albert Astals Cid 2009-10-05 20:57:56 UTC
Ok, see the problem, poppler can't save files with Encrypt, and just reports failure, so all we can do is guess, this needs an improvement to the poppler-qt4 api and make okular use it.

Rewriting the bug subject to make it clearer
Comment 8 Pino Toscano 2009-10-12 10:36:16 UTC
*** Bug 210287 has been marked as a duplicate of this bug. ***
Comment 9 Albert Astals Cid 2009-10-20 01:00:57 UTC
SVN commit 1037771 by aacid:

in case we have a new enough poppler give a better error message when we can't save files with /Encrypt
BUGS: 208119


 M  +7 -1      core/document.cpp  
 M  +8 -0      core/document.h  
 M  +21 -1     generators/poppler/generator_pdf.cpp  
 M  +1 -1      generators/poppler/generator_pdf.h  
 M  +2 -2      interfaces/saveinterface.h  
 M  +10 -2     part.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1037771