Bug 462481

Summary: Saving a PDF opened in Okular using "save as" results in mangled file
Product: [Fedora] Fedora Reporter: David Tonhofer <bughunt>
Component: popplerAssignee: Rex Dieter <rdieter>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: jnovy, kevin, krh, ltinkl, rdieter, than
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-06 04:07:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File mangled by okular
none
Original file, or saved with "save copy" (md5sum 42dc4776e1ba30e0ddb4b58bd0a9cbbe) none

Description David Tonhofer 2008-09-16 16:00:07 UTC
Created attachment 316860 [details]
File mangled by okular

Description of problem:

I have got a file (originally from Wikipedia) of 334086 byte which can be opened in okular and:

- If saved using okular's "save as" results in a mangled file (enlarged to 334086 byte and with unreadable first page)

- If saved using okular's "save copy as" results in a correct byte-by-byte copy of the original file.

Version-Release number of selected component (if applicable):

kdegraphics-4.1.0-5.fc9.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Open file in okular
2. Save as or Save copy as
3. Compare

Comment 1 David Tonhofer 2008-09-16 16:01:23 UTC
Created attachment 316861 [details]
Original file, or saved with "save copy" (md5sum 42dc4776e1ba30e0ddb4b58bd0a9cbbe)

Comment 2 Rex Dieter 2008-09-16 16:34:06 UTC
I wonder what the point of or the difference between SaveAs vs Save Copy As. ?

Regardless, looks like Save Copy As is what you really want here.

I can confirm that SaveAs produces something different/crashy for me as well.  For this issue, I'd suggest reporting upstream to bugs.kde.org (and/or simply don't use this feature).

Comment 3 Kevin Kofler 2008-09-16 17:06:39 UTC
Obviously, Save As rewrites the file (presumably it can also be used to convert between formats, maybe it can also store annotations or will be able to do that in a future version), Save Copy As doesn't. The only real issue I see is that the first page became unreadable, other than that it appears to work as designed.

Comment 4 Rex Dieter 2008-09-16 17:20:39 UTC
For the SaveAs that I tried, the resulting pdf crashed okular. :(

Comment 5 David Tonhofer 2008-09-17 08:24:35 UTC
>>> I'd suggest reporting upstream to bugs.kde.org

I should have consulted bugs.kde.org immediately:

It looks like this has been "RESOLVED FIXED" upstream:

https://bugs.kde.org/show_bug.cgi?id=163737

...so it can be "RESOLVED UPSTREAM" here.

Comment 6 Kevin Kofler 2008-09-17 12:13:16 UTC
KDE upstream claims this is a poppler bug and has been fixed in a more recent poppler.

Comment 7 Rex Dieter 2008-09-17 12:48:27 UTC
I've got a scratch build done for testing purposes:
https://koji.fedoraproject.org/koji/taskinfo?taskID=828058

In my limited testing, opening a pdf in okular, and without doing anything else, both SaveAs and SaveCopyAs produce files identical to the original, which seems much better than the status quo (where at least SaveAs produces a modified, unreadable file).

Assuming we can get a confirmation (or 2) wrt the fix, any objections to issueing a poppler update for F-9?

Comment 8 Rex Dieter 2008-09-25 12:42:01 UTC
Ping, Bueller?  

If I don't hear anything in the meantime, I'll wait another week(ish) before moving forward with the plan to issue an update for F-9.

Comment 9 Fedora Update System 2008-10-09 13:15:05 UTC
poppler-0.8.7-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/poppler-0.8.7-1.fc9

Comment 10 Fedora Update System 2008-10-16 02:10:13 UTC
poppler-0.8.7-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update poppler'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8858

Comment 11 Fedora Update System 2008-11-06 04:07:47 UTC
poppler-0.8.7-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.