evince claims a corrupt PDF file that could not open is a "text/plain" file

Bug #924566 reported by mohican
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
evince (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

EDITED

This PDF file came as an email attachment. It weights originaly 86 KB.

1. In Thunderbird the file can never be opened by evince.
In evince, the error message says it could not open it because it is a "text/plain" file.

2. When the file is saved to the hard disk from Thunderbird, sometimes (but not always !) the file is corrupt (truncated to 2 KB - see attachment).

If the file is correctly saved to the hard disk, then it opens allright.

If the file is truncated, evince produces the same error message than when opening from Thunderbird.

So, despite the fact that an error message appears in evince, it seems that the problem comes from Thunderbird.

Yet THE ERROR MESSAGE IN EVINCE IS NOT CORRECT : the file is not "text/plain", it is corrupt. This is not a very serious bug but it brings confusion.

Note that in Nautilus, the mime type of the corrupt file is displayed correctly as "application/pdf".

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: evince 3.2.1-0ubuntu2.1 and 3.2.1-0ubuntu2.2 (also evince 2.32.0)
ProcVersionSignature: Ubuntu 3.0.0-15.26-generic 3.0.13
Uname: Linux 3.0.0-15-generic i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Tue Jan 31 23:54:43 2012
ExecutablePath: /usr/bin/evince
InstallationMedia: Ubuntu 11.10 "Oneiric" - Build i386 LIVE Binary 20111013-11:02
SourcePackage: evince
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
mohican (mohican) wrote :
mohican (mohican)
description: updated
Revision history for this message
mohican (mohican) wrote :

File was corrupted when saved from Thunderbird. The bug comes apparently from thunderbird.

Changed in evince (Ubuntu):
status: New → Invalid
mohican (mohican)
description: updated
summary: - a PDF file could not be opened claiming it is a text/plain file
+ evince claims a corrupt PDF file that could not open is a "text/plain"
+ file
Changed in evince (Ubuntu):
status: Invalid → New
Revision history for this message
mohican (mohican) wrote :

Sorry for so much editing and changing the status, I got confused before I fully understood what the problems where.

description: updated
Revision history for this message
mohican (mohican) wrote :

Finally I discovered that the problem originates in the email themselves : a wrong Content-Type tag is set for the PDF file attached.
In one occasion it reads : "Content-Type: =?windows-1252?q?application/pdf;"
In another : "Content-Type: text/plain;"
When it is correct : "Content-Type: application/pdf;", there's no problem.

I also tested different webmail intallations : they react variously to this problem. Some are OK, some not at all.

Also note that the incoming PDF files themselves are not corrupt, WHEN they are correctly saved to the hard disk, they are OK.

Revision history for this message
mohican (mohican) wrote :

If you are interested by the 'Content-type' bug, and how to deal with it, see here :
https://bugzilla.mozilla.org/show_bug.cgi?id=659355

tags: removed: apparmor
Revision history for this message
penalvch (penalvch) wrote :

Doesn't open in Adobe Reader. File is jacked.

Changed in evince (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.