ZotFile - Advanced PDF management for Zotero

  • Thanks, @bwiernik, I keep forgetting those symlinks.

    @ckatzenbach, yes, full text search works the same with linked or directly stored attachments.
  • The only limitations of linked files are not having access on the zotero website and not being possible to use them in Group libraries.
  • Lately, Zotfile often truncates my highlights made in preview when I use the "extract annotations" feature.

    Often it is the first sentence that is missing. Any ideas what might be happening here? Yes, the text is properly highlighted. New install of macOS high sierra, latest version of both zotfile and zotero.

    Thank you in advance.
  • I should add that this issue arises only when using Preview to highlight PDF documents. When I use Acrobat Reader, highlights are correctly extracted.
  • I don't know if this will come too late to help @goldsoundz, but my workaround for the way LiquidText appends "_LT" to the filename is to export PDFs from LiquidText to a separate folder.

    I've created an Automator folder action to watch that folder for incoming files. When a new PDF appears, the Automator script renames the file (replacing "_LT" with "") and moves it to the folder that I set Zotfile to export to/import from (with the "Replacing existing files" box checked).

    Zotfile is then able to "Get from tablet" and extract the annotations from LiquidText. It's a little cumbersome, but it works.
  • @benjamin.pauley 's solution for the LiquidText Get from tablet issue worked perfectly for me, and I'm no Automator expert (brief googling was adequate on how to set it up). Great solution to something that was causing me angst as I love both Zotero and LiquidText and they were not playing well together!
  • I am not sure if you are already aware, but as the Zotero 5 update, the "Use additional subfolders defined by" functionality in Zotfile's tablet settings (which I have set to /%w) is not working.

    [JavaScript Error: "SyntaxError: JSON.parse: bad control character in string literal at line 1 column 32 of the JSON data" {file: "chrome://zutilo/content/keys.js" line: 23}] [JavaScript Error: "formatURLPref: Couldn't get pref: extensions.getAddons.link.url" {file: "jar:file:///Applications/Zotero.app/Contents/Resources/omni.ja!/components/nsURLFormatter.js" line: 143}] uf_formatURLPref@jar:file:///Applications/Zotero.app/Contents/Resources/omni.ja!/components/nsURLFormatter.js:143:7 gListView.initialize@chrome://mozapps/content/extensions/extensions.js:2735:9 gViewController.initialize@chrome://mozapps/content/extensions/extensions.js:709:7 initialize@chrome://mozapps/content/extensions/extensions.js:211:3 version => 5.0.54, platform => MacIntel, oscpu => Intel Mac OS X 10.13, locale => en-US, appName => Zotero, appVersion => 5.0.54, extensions => Zutilo Utility for Zotero (3.0.3, extension), ZotFile (5.0.8, extension), Shockwave Flash (, plugin), Zotero Word for Mac Integration (5.0.15.SA.5.0.54, extension, disabled), Zotero LibreOffice Integration (5.0.14.SA.5.0.54, extension, disabled)

  • Does it work if you disable Zutilo?
  • Hi, every time I check my saved search folder for the _tablet tag, to see what files Zotfile syncs to my Dropbox folder, I receive a Zotero notification for four files that 'The file "[filename.pdf]" does not exist.' None of these files (Parent Metadata nor attachments) carry the '_tablet' tag anymore. I fully deleted one of the files mentioned, and reinstalled ZotFile, but the notifications keep popping up. Where would I need to remove traces for these files to remove the notifications?
  • Hi - boost, I have the exact same issue as @everb. Have removed the _tablet tag from the references, tried creating a new saved search for the tablet folder, and the notifications keep popping up and the references remain in the tablet folder.

    Many thanks for any help!
  • Any ideas why Zofile's 'Extract Annotation' procedure is suddenly running remarkably slow? I've recently tried with two documents, both journal articles of roughly 20 pages, no images in the PDF (i.e. average sized files) and it now takes around 3 min to extract my annotations. These annotations consist of text I highlighted in Adobe Acrobat. Previous extractions would take perhaps 10-15 seconds.
  • abodywithoutorgans wrote on June 11, 2018

    "Lately, Zotfile often truncates my highlights made in preview when I use the "extract annotations" feature.

    Often it is the first sentence that is missing. Any ideas what might be happening here? Yes, the text is properly highlighted. New install of macOS high sierra, latest version of both zotfile and zotero".

    This is the same problem that I wrote about here on April 26.

    Here's a picture, with the PDF screen shot, followed by the extracted text:

    https://www.dropbox.com/s/tirw4sz02lc0nrh/Zotero PDF extraction missing text.jpg?dl=0

  • @Bellthorpe, did you confirm that if you copy the highlighted text and paste it in a text editor that the text missing in the note is properly copy/pasted into the editor? Sometimes the underlying hidden text in a pdf does not match the text image.
  • Absolutely, right from the beginning of having this issue.

    I've just copied the following, which in the image had the first line missing:

    "230. In the case concerning Maritime Delimitation and Territorial Questions between Qatar and Bahrain ..."

    Still trying different approaches, I highlight text in two ways. The first, if there is not much to be done, involves highlighting the text then clicking on "highlight" or "underline". The second is to click on "highlight" without any text selected. Then, any text that I do click/drag to highlight will be highlighted. This is much faster. However, the problem appears more often when using this method.

    Although I prefer Preview, I'm going to use Acrobat for a while and see if the problem is still there.
  • Hello,

    First, thank you for the great products. Both Zotero and ZotFile make bibliography management much more pleasant.

    I would like to implement the following workflow:

    1. Once I attach a PDF file to a certain item in Zotero, the PDF gets automatically renamed by using metadata terms, e.g., Surname et al. - 2018 - This is just a test document.pdf. This is a great feature.
    2. I would like to open the file for annotating with external PDF viewer. In my case, this is Okular.
    3. After annotating the file, I would like it to be automatically saved under a different name and attached to the same Zotero item, e.g., Surname et al. - 2018 - This is just a test document_annotated.pdf.
    4. Finally, I can extract the annotations from the new file. So far, according to my tests, this feature works as expected.

    This way, I can maintain a "clean" and original version of the paper in PDF format, and I can make the annotations on a custom version of the paper.

    Is this behavior achievable and feasible currently? If yes, what are the steps to introduce it?
    I am currently using Zotero 5.0.55 and the latest version of ZotFile.

    Thank you in advance!
  • Hello,
    a short question about the user-defined wildcards. Do I understand correctly that information that is not assigned to the item but to an attachment (inline notes, tags) cannot be used for renaming?
    Thanks and best regards
  • If I understand your question correctly, the answer is that only item metadata (title, author, etc.), not item attachments, notes, or tags, can be used to rename files.
  • Hi! Currently, if I add a note to a file using Preview, it's adding 'ÿb' to the front of the extracted text, replacing € with ¬ and ' with ˘
  • Same here. Can confirm the observation described by wahnxsinn.
    Z 5.0.56beta18 /Zotfile 5.0.8 / macOS
  • Localized renaming
    Zotfile renames the item type to a localized version of the item type (i.e. "%T item type (localized)").
    Is there a way to get it to rename to the English (or any other) version, even though Zotero is running in German (or any other language)?
  • When I attempt to attached several different PDFs to the same parent and move/rename them, each time I update I lose information. For example, I have chapters 1-3 for a book in one file and chapters 4,7,8 in another file. When I first move and rename them, zotfile copies them all, rename to the parent followed by an index number (nothing for first pdf, 2 for second).

    However, if I try to update the name, it then deletes the second file and leaves just the first file for both links on the parent.

    I really need to be able to move and rename both files (or really up to N files where N is unlimited) since I often have reading selections from different classes and sources and need to be confident that it won't be deleted if I update my Zotero library by mass renaming (if, for example, I add a lot of stuff or want to change naming conventions).

    A database without reliability is really no database at all...

    Windows 10 v1803
    Zotero 5.0.55
    zotfile 5.0.8
  • Hello,
    my Zotfile renames, but doesn't create linked files and doesn't move them to the folder I need. I tried million times, nevertheless with no result ((. Any ideas how to cope with that?

    Win 10 Home v 1803+ Zotero Standalone 5.0.55 + Zotfile 5.0.8 +Chrome addon

    Help me, please!
  • How exactly are you trying to rename/move the files?
  • edited October 7, 2018
    My problem with not-moving-files zotfile was solved after uninstalling and then installing Zotero Standalone 5.0.55 + Zotfile 5.0.8 again.

    But the other two I got: 1) When choosing %c subfolder pattern Zotfile puts everything in "undefined" and only then the real subfolder names.
    2) Afterthat I installed everything on the 2nd computer with the same settings, but it can't find the attachments. But if to create new files here, Zotfile creates subfolders correctly without "undefined" ...
    Both computers are running Win10. relative paths were cosen in preferances on both.
    System files located on HDD and synchronized by Zotero storage. Attachments are at E:\Zotero_full\YandexDisk\Zotero_Library on the 1st and D:\Zotero_full\YandexDisk\Zotero_Library on the 2nd computer.

    What should i do with that?
  • Is it possible for links to my zotfile defined storage directory be made when dragging and dropping a pdf into zotero? When I do this the pdf is an attachment stored in the zotoero storage directory as opposed to a link to the file in my cloud storage folder, as I get when importing the citation from Firefox. Thanks
  • I am having the problem when I sync files to tablet, using ZotFile, that there are a number of additional subfolders created. The issue has been adressed before, but still persists, and no good solution has been provided in this thread, not that I see.

    After googling I found out that what is happening is that the relative directories used in Linked Attachment Base Directory functionality in Zotero (for using your library on multiple computers) is being applied to the files in tablet sync as well. Switching to absolute paths fixes the problem and removes the redundant folders in tablet sync, but that leaves me unable to use Zotero/ZotFile effectively on multiple computers instead.

    Does anyone have a better solution? One that allows me to use Zotero/ZotFile on multiple computers, and get a proper tablet sync functionality. And can we expect a fix that addresses this problem anytime soon?
  • Make saved searches "Add to subfolder" compatible:

    I do not know whether this has been asked before, but I would like to send items to a folder in zotfile from a saved search, rather than from a folder. The case being that I have a saved search with everything that is colour tagged with "to read". What I would like to do is to move select items over from my zotero DB to a folder "to read" on my tablet. But Zotfile does not "see" a saved search folder in the manage attachments/send to subfolder on tablet dialogue.
    Any solution for this?
  • edited October 16, 2018
    I do not know whether this has been suggested, but instead of the max length of the title set in characters, would it be please possible to set it by number of words? I am trying to achieve a naming of author_1stwordoftitle_year. Or eventually I would welcome a wildcard for the "citekey" field.
  • Thanks for an amazing plugin!

    Two feature requests that would be really useful for me.

    I'm using /%c/ subfolders (i.e. one for each Zotero collection/subcollection). Downside of this is that when a paper is in multiple collections Zotfile saves it in only one folder (great in itself, would be horrible if there were multiple copies). But even better would be if Zotfile could automatically create symbolic links so that the paper can be accessed from each folder.

    Second feature (macOS specific): two-way sync of zotero and finder tags. Would be so great!
  • @Bellthorpe Has the issue of truncating highlights been remedied after changing to Acrobat? I have been having the same issue with Preview.
This discussion has been closed.