This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Mozilla Support में खोजें

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

pdf attachment

  • 7 प्रत्युत्तर
  • 0 यह समस्या है
  • 18 views
  • के द्वारा अंतिम प्रतियुतर lcdtm

more options

Hi,

I have a supplier who has started sending invoices as attachments with the wrong Content-Type.

Instead of:

Content-Type: application/pdf; name="test.pdf"

they send

Content-Type: test.pdf

My problem is, I can't open these files in any program. I have to save it first, and then open it in a pdf reader via a filemanager.

This only happens with the above content type.

When running thunderbird from the terminal and watchting the output, the following message appears when I select a pdf program to open the file in:

JavaScript error: chrome://messenger/content/msgHdrView.js, line 1739: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIMIMEInfo.launchWithFile]

Ubuntu 22.10 Thunderbird 102.9.0

Any ideas?

Tommy

Hi, I have a supplier who has started sending invoices as attachments with the wrong Content-Type. Instead of: Content-Type: application/pdf; name="test.pdf" they send Content-Type: test.pdf My problem is, I can't open these files in any program. I have to save it first, and then open it in a pdf reader via a filemanager. This only happens with the above content type. When running thunderbird from the terminal and watchting the output, the following message appears when I select a pdf program to open the file in: JavaScript error: chrome://messenger/content/msgHdrView.js, line 1739: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIMIMEInfo.launchWithFile] Ubuntu 22.10 Thunderbird 102.9.0 Any ideas? Tommy

All Replies (7)

more options

lcdtm said

Any ideas?

Perhaps advise the sender to stop sending invalidly formatted emails. If the data in the PDF was corrupt you would tell them you can't read the corrupt PDF, as the data in the email they send is corrupt,(well invalid). Apply the same logic. Tell them to lift their game and report a bug in whatever they are using to send these emails. Most anti spam engines would raise the emails score significantly for being malformed as it is often a key indicator of SPAM. So you might just stop getting the emails if your provider does spam filtering.

There is a list of registered content-types here https://www.iana.org/assignments/media-types/media-types.xhtml Perhaps you might ask them to have their product updated to comply with this basic email/Web requirement of having a valid content type

According to Microsoft " A grammar that details the syntax of the Content-Type header is described in RFC 2045 Section 5.1, available at" https://www.rfc-editor.org/rfc/rfc2045.html#section-5.1 While their grammar/syntax is somewhat suspect, the meaning is clear. No dumping a bare file name in a field that something else should occupy and pretending you have done the job.

more options

Hello there lcdtm.


The code /Component returned failure code: 0x80520012 / means that the files could not be found for this output . in this case the computer received a command to find a file that did not exist. (Check why this file doesn't exist for some reasons).


Greetings Firefox volunteer.

more options

Hi Matt.

Thanks for the reply.

I have reported it to them. They ignored me :(

I just tried again taking a different approach. I hope that will yield some results.

But, if thunderbird can see that there is an attachment, the user clicks on it and a dialog comes up where you can select a program to open it in.

Shouldn't thunderbird then be able to open the attachemnt even if the content type is unknown to it?

Tommy

more options

@googlethunderbird

Thats the problem. Thunderbird seems to be unable the create the file if the content type is either unknown or set to the filename of the attachment (I don't know if it's one or both).

I can save the file without any problems, but not open it in any program.

Tommy

more options

Hello there lcddtm

let me send it to you in an easier way so that you can understand it again. you will benefit from the first column (*).


reasons a PDF won't open:

  • Unsupported file type: This is the most common reason you cannot open PDF. Occasionally some files may erroneously have the default application set to Adobe Reader. This problem is usually an inadvertent human error.
  • Outdated Acrobat or Adobe Reader: An outdated Adobe Reader or Acrobat program will throw this error. Adobe Inc continuously releases updates of its software to incorporate new features and enhance security.
  • PDF files created using non-Adobe programs: Many programs can make portable document files. Unfortunately, some of these programs do not follow the correct standards. The result is that you cannot display PDF.
  • Damaged PDF files: Sometimes, someone may send you a damaged file. The damage could have occurred during the document's creation or email transmission where the document isn't correctly decoded.
  • Damaged Installed Adobe Reader: A damaged installation of Adobe Reader or Acrobat often gives the error "cant open PDF file". Damage is caused by an interrupted installation process, an update from Windows 7 to Windows 10, or the computer's file system's corruption. Corruption can occur due to incorrect power shutdown, software failure, or hardware malfunction.
  • PDF files have a virus: The inbuilt Windows Defender or computer virus software can prevent you from opening a PDF file if a virus is detected.



  • Unsupported file type: This is the most common reason you cannot open PDF. Occasionally some files may erroneously have the default application set to Adobe Reader. This problem is usually an inadvertent human error.



Try to contact the sender and inform them of their dealings with you and sending this .

Greetings Firefox volunteer.

Googlethunderbird द्वारा सम्पादित

more options

lcdtm said

But, if thunderbird can see that there is an attachment, the user clicks on it and a dialog comes up where you can select a program to open it in. Shouldn't thunderbird then be able to open the attachemnt even if the content type is unknown to it?

Some programs "guess" the content type either by trusting the file extension or by sniffing the first part of the binary file. Mozilla programs historically have not done that, either to enforce standards behavior or for safety reasons. I guess what I'm saying is that it would be possible for Thunderbird to figure out that it is a PDF, but I don't know whether Mozilla would ever do that. It is a rare case, as far as I know.

lcdtm said

Thunderbird seems to be unable the create the file if the content type is either unknown or set to the filename of the attachment (I don't know if it's one or both). I can save the file without any problems, but not open it in any program.

I assume when you tell Thunderbird to open an attachment using an external program, that it saves the attachment in the background. Does Thunderbird preserve the name test.pdf, or does it drop the .pdf, or does it use a completely useless name that you have to change before you can open it?

Currently, Thunderbird shows me a new tab with a PDF preview rather than launching Acrobat. Does yours normally do that for other PDFs?

more options

@jscher2000

I assume when you tell Thunderbird to open an attachment using an external program, that it saves the attachment in the background. Does Thunderbird preserve the name test.pdf, or does it drop the .pdf, or does it use a completely useless name that you have to change before you can open it?

Thunderbird saves the PDF with the same filename as it's shown in the email. In this case: /tmp/pid-193217/test.pdf (The pid is thunderbirds current).

Then the error: JavaScript error: chrome://messenger/content/msgHdrView.js, line 1739: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIMIMEInfo.launchWithFile]

Is there anyway to make thunderbird outout the filename it's trying to access?

Currently, Thunderbird shows me a new tab with a PDF preview rather than launching Acrobat. Does yours normally do that for other PDFs?

Yes. PDF's with normal content type is show in a tab.

lcdtm द्वारा सम्पादित