Add PDF as file from URL

It might already be possible to do this, but I can't see how.

Currently, if I'm viewing a PDF on the web (in firefox, in the built in viewer), say https://example.com/blah.pdf, there are two ways I can add it as a citation with an attached PDF:

1. Click the normal "create item from webpage", which creates an item with useless metadata, but with the PDF attached correctly (including the URL). I then have to manually enter all of the metadata.
2. Save the PDF manually, and then import it (e.g drag-and-drop). Then I can use the "retreive PDF metadata" function to (usually) get a decent set of metadata. However, then the PDF attachment doesn't have a URL associated with it, and there is no guarantee that the retreieved metadata includes the correct URL.
3. Use a combination of both: create a webpage item from the PDF, then create a separate item with just the metadata, and then drag the attached PDF into the citation item with the nice metadata. This is a fair bit more effort.

It would be nice to be able to simply click "save snapshot/PDF", and have it save the currently viewed PDF/page as a file (e.g. as an attachment without a parent). Then the "retrieve PDF metadata" function could still be used, while retaining the original file URL.
  • edited July 7, 2015
    If you have the snapshot pref enabled in the General pane of the preferences, "Create Web Page Item from Current Page" (or the new save button) will save just the PDF, which you can then run "Retrieve Metadata from PDF" on.

    You can also leave that pref off and Shift-click the save button (to do the opposite of the pref) or use the "(with snapshot)" option in the new save button's drop-down menu.
  • Wow, so it does. I swear that wasn't happening before. I did have that pref off, because I don't like webpage snapshots. But the new drop-down thing helps a lot there. Thanks for the quick response, and sorry for wasting your time :)
  • This is what I want to do as well - create a PDF parent item while viewing a PDF in Firefox. It doesn't seem to be working for me.

    - I have Zotero Standalone 4.0.27.6 and Zotero for Firefox extension 4.0.27.5 installed.
    - Firefox has the Adobe PDF Plug-In For Firefox and Netscape 15.8.20082.
    - Zotero General Preferences - both of these are checked:
    - Automatically take snapshots...
    - Automatically attach associated PDFs...


    When I am on a PDF page in my browser (viewing the PDF in the plug-in browser),
    - clicking the new "smart save" button yields a web page item with a child attachment of the PDF, but not the PDF
    - Shift-clicking the new "smart save" button yields a web page item only
    - clicking the down arrow on the button provides two choices
    - Save to Zotero as Web Page (with snapshot)
    - Save to Zotero as Web Page (without snapshot)

    The strange thing is, I thought I successfully did this before.

    Any ideas what I'm doing wrong? Thanks for any help you can provide.
  • Close Standalone and save from Zotero for Firefox (which will work as above), or drag the icon to the left of the URL (globe or padlock) into Standalone. The save button doesn't currently work correctly for PDFs in connector mode.
  • Dan,

    Thanks for the quick response! Most helpful. I tried both methods.

    I shut down Zotero Standalone, then used the menu button in Firefox to save a PDF. The little window appeared, indicating that it was saving the PDF. However, when I re-started Zotero Standalone, the item wasn't there. If I did the same operation with a web page, the web page item was there when I re-started Standalone. (Do I perhaps have to shut down and restart Firefox after Zotero Standalone has been shut down?)

    I then dragged the globe for a PDF to the Zotero Standalone window (being careful to avoid triggering the Firefox top menu). That worked, creating a new standalone item. That's a very helpful workaround, though I hope you will be able to fix the menu button.

    One further question. The new item had a PDF icon and an item type of attachment. As an attachment, I can't create a bibliography item from it. For one such document, I was able to retrieve the metadata using the "Retrieve metadata for PDF document" option. That turned the item into a Journal Article with a PDF attachment, for which I can create a bibliography entry.

    My question is, for PDFs from the web for which metadata can't be retrieved, how do I turn them into an item for which I can at least enter metadata?

    Thanks again!
  • I shut down Zotero Standalone, then used the menu button in Firefox to save a PDF. The little window appeared, indicating that it was saving the PDF. However, when I re-started Zotero Standalone, the item wasn't there.
    Just click the Z to open the Zotero pane in Firefox. When you save the item, you should then see it being saved to the open collection. If you haven't opened the Zotero pane in Firefox since restarting Firefox, the item should end up in the root of your personal library.
    My question is, for PDFs from the web for which metadata can't be retrieved, how do I turn them into an item for which I can at least enter metadata?
    Right-click, "Create Parent Item".
  • Dan,

    Outstanding! Thank you.

    Once I opened the Zotero pane within Firefox (with Zotero Standalone closed, of course), the PDF item was created in the library.

    Since a web page item had downloaded without the pane being open, I didn't realize that the pane had to be open for the PDF item download to work.

    To recap, to download and create a PDF item being viewed in Firefox using Zotero Standalone, the Firefox menu button will not work as it would in Zotero Firefox only. It will only create a web page item.

    There are two options to work around this limitation:

    1) While on the page displaying the PDF, drag the icon (globe or lock) from the left side of the Firefox address bar to the Zotero Standalone library.

    2) Close Zotero Standalone. Open the Zotero pane in Firefox (the Z on the menu button). Download and create the item using the menu button.

    Thanks again for the help and special thanks for the fast response.

    Zotero is an amazing tool; I can't believe it took me so long to discover it.
  • edited July 23, 2015
    Since a web page item had downloaded without the pane being open, I didn't realize that the pane had to be open for the PDF item download to work.
    That's a bug, which we'll fix (along with the connector-mode PDF issue, though that might take a little longer). But it should work as long as the Zotero pane was opened once since the Firefox window was opened (or Firefox was started), even if the pane was since closed.
  • OK, for the next release I've fixed that issue saving PDFs without having opened the pane at least once.
  • Dan,

    I just want to thank you for the update. I've been using the workaround (dragging the address bar icon to Zotero) since our exchange in this thread. At some point recently, I must have updated to 4.0.28.6. Yesterday, without thinking about it, I clicked on the Zotero icon while viewing a PDF in Firefox. The PDF downloaded into Zotero as an attachment to a new web page item. Beautiful!

    Michael
  • Michael and Dan - I have a similar issue. I also want to have the Zotero save button in Zotero for Firefox automatically create a webpage parent item and a PDF attachment. At the moment, although I have enabled the 'attaching snapshot' as a default, when I save using quick save or Shift-click (which I used to do) it creates a PDF attachment only.

    It's a pretty minor gripe as all I have to do is create a parent item by right-clicking, but I do download a lot of PDFs (without any useful metadata)so just wondering if I can somehow get to where Michael got.

    Joyce
  • If you're viewing a PDF, Zotero saves only the PDF so that you have the option of using Retrieve Metadata from PDF.

    What we might do in a future version is run Retrieve Metadata automatically and then, if that fails, create a parent item. We would probably also want to give the option of updating a parent item from the child attachment's metadata.
Sign In or Register to comment.