Closed Bug 1739959 Opened 4 years ago Closed 4 years ago

Opening pdf attachments without pdfjs: Several Problems

Categories

(MailNews Core :: Attachments, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: klaus.kusche, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

Thunderbird 91.3.0, linux:
Double-clicked on a pdf attachment in a received mail.

Actual results:

Attachment opened within thunderbird using pdfjs.

After disabling pdfjs in the preferences:

  • Still a new, completely empty tab is opened in thunderbird
    (also with empty tab title!).

  • The "Opening ..." dialog came up, but with "Save file" preselected instead of "Open with ...".

Even when using right click and "Open" instead of double click,
still "Save file" instead of "Open with ..." is preselected in the "Opening..." dialog.

Expected results:

First of all, the handling of pdf attachments should be configurable in the "Files and Attachments" list in the preferences. However, attachment type pdf is not listed there! Moreover, there should be an easy way to disable pdfjs.
I want to view my pdf's using an external application!

If pdfjs is disabled, double-clicking a pdf attachment or right-clicking on it and selecting "open" should behave exactly in the same way as for any other attachment, and as it did before version 91.3:

  • Thunderbird should not open a new (useless) tab.

  • Thunderbird should open the "Opening ..." dialog with "Open with ..." preselected, not with "Save file" preselected.

How did you disable pdf.js in the preferences, and wouldn't that remove "Portable Document Format (PDF)" from the "Files & Attachments" Content Type column?

Component: Untriaged → Attachments
Product: Thunderbird → MailNews Core

I've set "pdfjs.disabled" to "true" in the preferences.

However, obviously this has automatically set some other preference I didn't notice.

Because now, I've set "pdfjs.disabled" to "false" (the default) again,
and to my surprise

  • this does not re-enable pdfjs

  • but it brought back the old and expected "open" behaviour:
    The "Opening .." dialog comes up with "Open with ..." preselected,
    and no new tab is opened.

What's going on here?

But no matter if "pdfjs.disabled" is true or false, pdf is not listed in the "Files and Attachments" table.

Did you restart Thunderbird after making the changes?

I'm not sure. I think I did not restart Thunderbird before I tried to open a pdf attachment after setting "pdfjs.disabled" to "true".

Currently, opening a pdf attachment works correctly no matter if "pdfjs.disabled" is true or false,
even after restarting firefox.

But in both cases,

  • the attachment is opened externally. I've no idea how to re-enable pdfjs!

  • pdf is still not listed in "Files and Attachments".

There should be an easy way to enable/disable pdfjs on the fly and without manually setting config variables (and break things doing so)!

Sorry, I can not reproduce the issue using Thunderbird 91.3.0 on Fedora 34 Workstation, Gnome 40 desktop, and don't understand why a user would not use the drop-down in the Actions column of Files & Attachments to change the action.

I can chose my default Document Viewer application from there, and it will be used each time I open a PDF attachment.

This is what I did in my attempt to reproduce this report.

  1. Set pdfjs.disabled to true.
  2. The Files & Attachments Content Type was still set to "Portable Document Format (PDF)", as was the Action set to "Preview in Thunderbird".
  3. Quit and restarted Thunderbird.
  4. The Content Type and Action for PDF were gone from Files & Attachments.
  5. Opened an email with a PDF attachment.
  6. Double-clicked the attachment and the "What should Thunderbird do with this file?" dialog opened with the options to select "Document Viewer (default) or "Other" to view the file, or the option to "Save File".
  7. Selected "Document Viewer", tested with 3 emails with PDF attachments, and all the attachments opened in the selected application.
  8. Quit and Restarted Thunderbird.
  9. The "Portable Document Format (PDF)" Content Type was back with the Action set to "Use Document Viewer" in Files & Attachments.
  10. Quit and restarted Thunderbird after resetting pdfjs.disabled to false.
  11. I was offered "Preview in Thunderbird" as an Action, but it remained at "Use Document Viewer".

I don't see a need to mess with the configuration files.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID

Then please reopen with a changed description (or should I open a new bug?).

The initial problem is that "Portable Document Format (PDF)" was not shown in Files & Attachments,
it was not shown even before I messed with the config settings (and it is still not shown).
That's the only reason why I messed with the config settings:
I found no other way to switch pdfjs off, because pdf was not listed as document type.

My "files and attachments" table in the preferences contains exactly three entries:
"application/x-ms-wmz type" Always ask
"http" Use web browser (default)
"https" (empty?!)
No other file types are listed.

So the new question is: What can cause the pdf entry (and all the other entries) to be lost?

Shall I provide a screenshot of the preferences?

Klaus,

This appears to be a support issue.

I suggest posting the question on Thunderbird Help

You should also try Help > Troubleshoot Mode, or a test profile.

My preferred method for trying a new profile is to use Help > More Troubleshooting Information.
Then scroll down until you see about:profiles.
Click it and then click the Create a New Profile button.
Follow the prompts and create a test profile.
Then scroll down until you find the profile and click the Launch profile in new browser button.
Once Thunderbird opens, check Files & Attachments for the Portable Document Format (PDF) Content Type.

You could use the Profile Manager

I tried starting thunderbird for the first time under a new user account and home dir (i.e. a completely new instance).

  • The files & attachments section in the new thunderbird showed only pdf and no other types of attachments.

  • I compared my prefs.js with the one of the new user with a graphical diff tool.
    There are many differences (of course, because my thunderbird profile is many years old and very actively used),
    but none of them seems to be relevant for the problem in question.

As described in Bug 1740703:

  • The pdf entry is there also in my thunderbird,
    and it shows up as soon as "pdf" is entered in the filter of the files & attachments list,
    and it works as expected,
    but it is not shown if the filter is left empty!

  • The problem is not specific to pdf:
    There are many types of attachments I've used in the past (and set applications or defaults for)
    which are either shown only when you filter the list for them (but not without a filter!),
    or are not shown at all even when filtering for them.

The current behaviour of the files & attachments list is not a support problem,
but definitely a bug: Either a bug in the code, or a bug in UI design:
If something is called "filter", then with "filter" being empty, all entries must be shown.
This is obviously not the case: Most entries (including "pdf") show up only after filtering for them, not with an empty filter.
So the behaviour is not what the UI suggests, hence either the code or the UI design is buggy.

(I'm in programming and software engineering for more than 40 years,
have been the head of software QA in one of Austrian's larger software companies for several years,
now I'm a professor for software engineering...).

However, I think it suffices to work on Bug 1740703:
This bug initially was about problems when opening a pdf attachment.
Pdf attachments now open correctly,
and the files & attachments problems belong to 1740703.

You need to log in before you can comment on or make changes to this bug.