MozillaZine

PDFs attachments not being processed correctly.[Linux.]

User Help for Mozilla Thunderbird
cajun.saint
 
Posts: 4
Joined: March 14th, 2018, 6:40 am

Post Posted March 14th, 2018, 6:57 am

OS - Ubuntu 16.04 x64
Thunderbird 52.6
When I receive a PDF attachment, what I see in the preview pane is[img=https://imgur.com/a/aSuAh] this[/img]. If I save it, I cannot open it with any PDF viewer - I receive a 'unsupported file' or similar error. If I go to the same account via webmail, there is no issue.
I also tested on a Windows machine. No issue with Outlook, but the issue also appears in Thunderbird in Windows.
What could be causing this?
Last edited by LIMPET235 on March 14th, 2018, 7:05 am, edited 1 time in total.
Reason: Added [Linux] to the title.

tanstaafl
Moderator

User avatar
 
Posts: 45250
Joined: July 30th, 2003, 5:06 pm

Post Posted March 14th, 2018, 1:39 pm

That looks like the pdf file is being treated as a text file (doesn't recognize the protocol). What are you using as the pdf viewer under Windows? I prefer nitro pdf but have had good luck with foxit reader. I avoid adobe reader.

One possibility is that the mimetypes.rdf file in the profile has been corrupted but if you have the same problem if you save the attachment and open it manually (outside of Thunderbird) that would seem to rule that out. Have you tried that?

I suggest you download a demo pdf file using a web browser and verify whatever pdf viewer you use can view it. Firefox has a built-in pdf viewer so being able to view the pdf in webmail or on the web says nothing about the ability of your installed pdf viewer.

Are you able to view jpeg and png attachments and remote images okay using Thunderbird?

cajun.saint
 
Posts: 4
Joined: March 14th, 2018, 6:40 am

Post Posted March 29th, 2018, 7:44 am

In Windows I have tried Adobe, Firefox, Evince and Foxit. In Linux I have tried Evince and Firefox. I posed the question as this just happening to me, but this is a company wide problem affecting about 20 users or so. We use Thunderbird as our mail client for our mobile users. The workaround has been to use webmail.
All other attachments can be viewed without issue.
Sorry for the late response. I guess I turned off email responses.

tanstaafl
Moderator

User avatar
 
Posts: 45250
Joined: July 30th, 2003, 5:06 pm

Post Posted March 29th, 2018, 11:12 am

Are there any circumstances (perhaps a plain text message with a PDF attachment sent from webmail) where you can open the PDF file in Thunderbird? I'm not suggesting it as a workaround, I'm trying to understand the dependencies.

When you say "In Windows I have tried Adobe, Firefox, Evince and Foxit." does that meant you tried unsuccessfully to download a PDF file you found on the web using a browser and view it using those utilities, to verify the PDF viewers were not to blame?

cajun.saint
 
Posts: 4
Joined: March 14th, 2018, 6:40 am

Post Posted March 29th, 2018, 12:04 pm

Thanks for the input!
I just attempted to send a report from our reporting server via PDF with a message and had the same issue.
If I download a PDF from anywhere, or try to open one that was previously saved on the hdd/network, I can open with all programs. The only time the issue appears is when opening the PDF attachment from Thunderbird.

tanstaafl
Moderator

User avatar
 
Posts: 45250
Joined: July 30th, 2003, 5:06 pm

Post Posted March 29th, 2018, 12:25 pm

Try moving your mimetypes.rdf file somewhere safe outside of the profile and then restarting Thunderbird. That should force it to create a new version of that file with default values (since its gone). You will have to reconfigure Thunderbird again to tell it what utilities to use to open what file types but hopefully that will workaround your problem. That file tells it how to recognize different file types and what to do with them (in an attachment). It can get corrupt.

If that doesn't help try saving a copy of the attachment from Thunderbird and verify that you can open it with foxit etc. via windows explorer. If you can't, then it sounds like the attachment is corrupted for some unknown reason when the message is fetched by Thunderbird. You've already verified its okay in webmail so its not the senders fault. Are you using a POP or IMAP account? If you have more than one account does this problem effect all accounts?

Please use view -> message source or control-U and look at the raw message source of one of these messages. Browse down until you find the headers for the PDF attachment, after the message body. This will be just before a big block of characters all run together (base64 encoding of the attachment). What are the headers for the PDF attachment? An example is:

Content-Type: application/pdf;
name="Quick Carbon 1GCBoston Globe32215.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="Quick Carbon 1GCBoston Globe32215.pdf"

cajun.saint
 
Posts: 4
Joined: March 14th, 2018, 6:40 am

Post Posted January 18th, 2019, 11:16 am

Thank you for the reply, I just found the email of your reply and decided to try to tackle this again.
OK - Moved the mimetypes.rdf file, did not solve.
When I save the file, it saves as a plain text file where you can see I guess what I would call the header information, like this:
Code: Select all
%PDF-1.4
%€‚ƒ
1 0 obj
<< /Creator <>
/Title <>
/Author <>
/Producer <5265706f72744275696c646572>
/Keywords <>
/Subject <> >>
endobj
2 0 obj
[/PDF /Text /ImageB /ImageC /ImageI]
endobj
3 0 obj
<< /Type /ExtGState
/SA true
>>

Everyone in the organization is using an IMAP account and this issue is for everyone who uses Thunderbird in the organization.
Here is the header info in the source:
Code: Select all
Content-Type: text/plain;
   name="Email_IncomeSummaryReport.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
   filename="Email_IncomeSummaryReport.pdf"

tanstaafl
Moderator

User avatar
 
Posts: 45250
Joined: July 30th, 2003, 5:06 pm

Post Posted January 18th, 2019, 5:31 pm

Content-Type is used to identify what type of attachment it is by assigning it a "MIME type". If its unrecognizable I believe Thunderbird falls back to guessing based on the file extension. However, your header says its plain text. So nothing gets interpreted and it displays the raw code for the PDF file. Content-Type should have been application/pdf .

If you use the Header Tools Lite add-on to edit that header and to set it to application/pdf you should be able to use a PDF file viewer to view the attachment. Your problem is caused by the sender. Another common error would be to assign it a MIME type of "application/octet-stream" (very content free, basically says its just 8bit data)

Return to Thunderbird Support


Who is online

Users browsing this forum: Google [Bot] and 4 guests