ZotFile - Advanced PDF management for Zotero

  • jfiduccia, that is pretty much impossible. Zotfile does not make any changes to the pdf so the problem must be related to something else...
  • Zotfile is not working at all with 5.0 beta. It won't rename files and will not send files to tablet. When I send a file to tablet it doesn't appear in the "Tablet Files" saved search folder within Zotero either.

    Any upcoming fixes solutions. So far as I can see there doesn't seem to be a update.
  • There is a 5.0 branch on github (https://github.com/jlegewie/zotfile/tree/5.0). A lot of work went into that but I haven't touched it for six weeks or so. It's not tested and I don't recommend that anyone uses it for their daily work. It might well screw things up. Testing with detailed step-by-step bug reports, however, would be helpful. Not sure when I will be able to finish it up though...
  • edited July 23, 2016

    I love this idea, thank you first off.

    Right now I have annotations syncing from iannotate on a shared webdav.

    I can get from tablet but when I do, the page number is wrong in the annotation's note?

    I can provide more logs I'm asking first if this is a known issue or something simple before I collect the data.

    Thank you!
  • I just used Jpdftweak to change the pagination correctly, and the content pages are correct in iannotate (second page is i, chapter 1 starts at pg10 and is now 1) ... although annotation extraction still shows the actual page and not the logical one.
  • well it seems this is never going to be supported? https://github.com/jlegewie/zotfile/issues/57
  • no, that ticket was closed as duplicate, not as won't fix. https://github.com/jlegewie/zotfile/issues/190 is still open and looking fairly promising, though Joscha says it'd likely take someone else to do the work.
  • Attaching new files as standalone items?

    I have the Zotfile Source Folder for Attaching new files set to the Windows download folder. Most often, I want the new file that appeared in that directory to be uploaded as a standalone item, not an attachment to an existing item.

    Is there a way to do this with Zotfile? If not, may I suggest it as a feature request? I upload a lot of items to Zotero as PDFs. Since they upload as attachments, I then right-click the item to Create Parent Item after which I fill out the relevant information.

    As I'm writing this, it occurs to me that I would like the same functionality in Zotero itself (which is perhaps where it would have to be, so I will also follow up by searching there).

    Thanks - and thank you for a fabulous add-in!
  • @mgreis
    If you have the Watch Folder feature enabled and click you the New Attachment popup with no Zotero item selected, Zotfile will import the attachment as a standalone attachment and try to Retrieve Metadata automatically.

    (You can de-select items in Zotero by holding down Control on Windows. Not sure which key does it on Mac/Linux.)
  • Brenton,

    Thanks. It did not occur to me to think of de-selecting the current item. Ctrl-Click on Windows does seem to do that.

    The attachment still didn't upload as a separate item. I tried several ways because it appeared that in moving away from and then back to the Zotero window, an item was being re-selected. Sometimes this was because I happened to click in the list area when I moved back to Zotero.

    After some experimentation, I found that, with some gymnastics, I could manually unselect the item after the upload box had appeared but before it disappeared. That wasn't particularly satisfactory, as you can imagine.

    After more experimentation, I finally found that, if if I was careful and clicked ONLY on the pop-up new file window when returning to Zotero, the new file would upload as a standalone item without having to de-select anything.

    This seems more complicated that it should be. In either of the two cases, it would improve the situation if the pop-up window would remain on the screen longer. There are times when I come back to the Zotero window and see there is a new file, but it takes a few seconds to determine what it is and if I want it uploaded to the Zotero library.

    A couple of other notes:
    - Files added to the watch directory must be timestamped close (how close?) to the current time. Merely being added to the directory does not seem to trigger the upload notice if the file is not "new" by timestamp.

    - If you edit/change a file in the watch directory and then save it, Zotfile will recognize it as a new file and upload it. This could be used as a feature to keep certain documents up-to-date in your Zotero library, but note that Zotfile does not replace the previous file (nor does it change the name, so you have two files with the same name). That's just an observation, though...not a bug report or feature request :-).

    Thanks again!
  • I'm having a minor issue with Zotfile. I added a few PDFs from a temporary directory to my library. The files were imported and copied into my Zotero directory tree, so I deleted the original downloads. Now every time I select an item in Zotero, Zotfile pops up with an error message "Source folder is not valid..." When I restore the temporary directory, the errors stop. Is there a way I can get Zotfile to forget this temporary directory (which I don't want to have sitting on my desktop, which is where it was), and stop checking it for source files?
  • @mageejp: In the general tab of the ZotFile preferences, uncheck the "Watch for new files" checkbox or select a valid source folder.
  • @adamsmith: Thanks! That worked.
  • Apologies if this has been answered before but I've not been able to find it by searching the forum and this thread's 29 pages have defeated me!

    Some of the files I sent to tablet got deleted manually somehow, so now Zotfile throws a whole load of 'file not found' errors whenever I access the search results for files on tablet.

    The error messages say 'The file C:..path../filename.pdf does not exist'
    with further details
    TypeError: tablet_file.exists is not a function
    (chrome://zotfile/content/zotfile.js, 2782)

    I tried resending to the tablet as a workaround but this fails with the same message.

    Any suggestions on how to clear these errors please? This fantastic add on is otherwise working perfectly.
  • On the files in Zotero (not the Zotero item, but the attached PDFs itself) delete the tag _tablet (in the right-hand pane). That should fix this.
  • Yes, that has instantly solved the problem.

    Thanks for this ultra fast & very helpful answer adamsmith!
  • ZotFile add-on not available from https://addons.mozilla.org/fr/android/
    I couldn't find any way to install it on android 6.0.1 firefox 48.0 ... Any advice?
  • Zotfile and Zotero are plugins for desktop Firefox. You can't install them in Android.
  • Sorry for the following rather naive question (searched for it but it might be too dumb to have been asked already): I just started using zotfile and am not sure if I'm misunderstanding the "watch for new files in source folder" option or have incorrectly configured. I was thinking that if I set this up correctly it would automatically move pdf's I downloaded into the source directory to the custom file location/subdirectory structure I specified. I was able to manually move my previous zotero docs using the "rename attachments" but when I download a new pdf to the source folder, nothing happens. Do I need to manually initiate this somehow? I am on Mac OS (also new to that).
  • Hey,

    I am using zotfile to rename and move attachments and changed the preferences such that I get links in my zotero interface (as I store the pdf files in a dropbox folder). Now sometimes I want to attach further supplementary material to one entry (such as images, txt-files, etc). The problem I encounter is, that when I let zotfile rename and move the additional attachments the same way as it does with the pdf files, I get multiple links named all identical (and as they are links I can not even distinguish between pdf and other attachments via the little icon, because latter is in all cases this link symbol). This way there is no way for me to find out, which of the attachments actually is my pdf, image, txt,..., respectively.

    Is there a way to fix that problem? I was thinking that adding a suffix to added attachments which display the file type (such as "_pdf" for pdf files, "_txt" for txt files etc.) would be a fairly good solution. Although I don't know how to achieve that.

  • I'm also interested in the question posed by NeleMV. Whats the process for attaching multiple attachments to a citation? I guess we could get Zotfile to only rename .pdf's which would preserve a unique file name for other attachments, but how do we handle multiple pdf attachments? In the case of e.g. multiple book chapters I've been joining them into one pdf, but there may be times where you want to attach supplementary material from a journal article.
  • edited September 19, 2016
    @mattvlaw If you have the Source folder feature enabled, when you move a PDF into that folder, you should see a popup window in the lower right corner of the Zotero window. Click that to attach the PDF to the current item. Is that not working for you?

    @NeleMV There is not currently a way to get Zotfile to automatically append a suffix to attachments of different types (it will for multiple attachments of the same type, though). You can manually change the attachment title by selecting the attachment link in Zotero and clicking the title (in bold text) in the Zotero right pane. You can rename the attachment item and associated file there manually.

    @Tsau017 You can exclude specific file types (e.g., .docx, .txt) from Zotfile renaming in the Zotfile Advanced Settings. For multiple attachments of the same file type (at least PDFs), Zotfile will automatically add numbers to the ends of subsequent attachments. You can also manually rename files as I describe above (e.g., after using Zotfile to rename the PDFs, I then manually add Supplementary Material to the end of the file name for that PDF).
  • @bwiernik I figured it out, thanks! I just wasn't understanding the workflow completely.

    I understand now that I basically have two ways to process a download via Zotfile--either download/extract metadata with Zotero and rename attachment, or add the metadata to Zotero, download the PDF, then click the item in Zotero and hit the resulting popup. Depending on the document (e.g. if it's OCR'ed or not) I'll do either one. Then Zotfile renames and moves the pdf to my organized directory for easy access. Awesome!

  • The best method is to use the Zotero URL button at the journal web page. This will grab the best metadata and the PDF at the same time.
  • Hi, I am trying to use this but it's not plug and play and i'm confused by the set up. I've installed it 5 times but I don't see a little icon in my mozilla browser. I want to have all my PDFs that i'm reading synced in mozilla so I have access on my ipad or my PC. I'm using Zotero (for Mozilla and for word). How do I get going?
  • I will experiment with ZotFile 5.0 on my Zotero stand-alone until Zotero 5.0 is ready.

    I have one opening question for ZotFile version 5.0 development.
    When capturing highlighted text sections and associated notes is it possible to capture the colour properties for each of multiple highlighted sections and pass this information to Zotero to reproduce the colour styles ?

    I can use Foxit Reader to highlight text and notes in different colours but this is lost in ZotFile 4.2.6 when I "Extract Annotations". i.e. no coloured sections of text.

    I can make use of colour information in tinymce.
  • I am using Zotero with Zotfile 4.2.6 and trying to get it to extract annotations I have done mainly in Goodreader. Zotfile will successfully extract highlighted text, and also text in popup notes done on Goodreader. But it will not extract text from the standard annotation tool, which is equivalent to Acrobat's textbox. I just checked and it is the same thing with PDF files annotated in Acrobat. Zotfile will extract material from comments and highlights but not from textboxes. Since I use textbox annotations a lot and hardly ever use comments (hate the extra clicking) this is proving a problem. I can cut and paste from both the comments and the textboxes while in a browser. Perhaps there is a fix for this or I am overlooking something obvious, so if you know what it is please help.
  • @dragonfly, the ZotFile 5.0 beta does not work with Zotero so you won't be able to do that. Please use the separate thread for anything about the beta.

    @mrhunt, correct, zotfile doesn't extract text from what you call the "standard annotation tool". I am sure there is an issue on github for it. I am open to a pull request but won't do it myself.
  • Hi there,

    I am having similar problems with annotation that jfiduccia has already described.

    Problem 1: Highlights moving
    I am having a similar problem that jfiduccia described on June 15, 2016 with highlights. See here: https://yale.box.com/s/ijcfn2yyvau1e57xn2m2n163rdxvesd9

    The first annotation on the first page should be: "We used data from the Thematic Mapper to model sage grouse winter habitat over a 2,548-km2 area in northeastern Utah." But the highlight has shifted up a few lines.

    Problem 2: Page getting offset
    Not sure why this is happening, but I am using Preview to highlight my papers and when I open them the entire page has shifted but the highlights remain in the same location. See here: https://yale.box.com/s/sopse2p9c2kt7hmwsakhilq6kca3f6e0

    Thank you!
  • You could try an alternative PDF annotator.
    As I wrote earlier I found that ZotFile extracts annotations from Foxit Reader.


    I use Zotero stand alone on Ubuntu. A bit of tweaking of mime types was needed in Ubuntu so that Foxit becomes the default PDF reader
This discussion has been closed.