Firefox connector won't save PDF from firefox pdf viewer when "Always Ask" enabled for PDF files

edited December 7, 2020
When viewing a PDF displayed by firefox after clicking a link to and and selecting "Open with Firefox", and then clicking the Zotero connector , nothing happens.
  • Connector version 5.0.76, Zotero 5.0.93, Firefox 83, ubuntu
  • Could you post a URL as you see it for a PDF? If it's start with file: (as I suspect it does) then Zotero isn't able to save the file: it doesn't work on file URLs (due to security restrictions by browsers).
  • E.g. if you start here, http://kokkinizita.linuxaudio.org/papers and want to get the technote (2nd item).

    Clicking the link and clicking Open with Firefox does open a file:///tmp/... window
    Matches your description. Might be good if connector said "Sorry I can't do that"

    Trying to work around this another way:
    secondary-click on the link brings up a menu that includes Zotero Connector > Save to Zotero ->, but clicking save to zotero doesn't bring up any submenu or save anything.
  • FWIW, that opens directly in Firefox for me without a dialog and that should be the behavior of most PDFs (and you can then use the add-to Zotero button to save it) so you might want to check your PDF handling settings.

    IIRC, Firefox constrains what an add-on can do at all on file URLs quite strictly, so I don't think even an error message is viable. Note, though, that the icon is greyed out, whereas for a saveable PDF, you'll see a PDF icon.
    Trying to work around this another way:
    secondary-click on the link brings up a menu that includes Zotero Connector > Save to Zotero ->, but clicking save to zotero doesn't bring up any submenu or save anything.
    Yeah -- that's weird. Not sure what the intended behavior is supposed to be. The right-click connector menu currently only works to save the current webpages (with a note, if you have text selected)

    The workaround for PDFs that open in your browser is to download & drag to Zotero.
  • edited December 7, 2020
    Hmm. If I choose "open with firefox" and check the "Do this automatically for files of this type" box on the Firefox, then go back and click the link again, I get "http://kokkinizita.linuxaudio.org/papers/digsvfilt.pdf" instead "file:///tmp/...", and can save to zotero.

    Wierd that just skipping asking me what to do ends up with a different URI in the address bar.

    (You can see the behaviour I was seeing by going into Preferences, search for Applications, and change PDF action from "Open With Firefox" to "Always Ask")

    One remaining quirk is that the little dialog that allows choosing which collection to put the item into does not appear.
  • That is odd, I agree. Firefox recently changed things around a bit and made the Open with Firefox function also more prominently available for downloaded PDFs, where the local URI makes sense. I'm guessing this is a random side-effect of that change.
  • One remaining quirk is that the little dialog that allows choosing which collection to put the item into does not appear.
    Starting a couple years ago, Firefox stopped allowing extensions to display any UI on PDFs, so we're not able to show the popup. It still works in Chrome.
Sign In or Register to comment.