Changing PDF reader for Zotero Standalone Only

I know that it is easy enough to change the default PDF viewer on Macs (which, of course, will also change the PDF viewer in Zotero Standalone), but is there a way to have Zotero Standalone use a different PDF viewer than viewer from the one set as the default viewer on the Mac? If there's a preference panel that handles this, I've missed it somehow. (Changing the default viewer on Firefox doesn't seem to carry over onto Zotero Standalone. I guess there's no reason why it should, but I gave it a try anyway).

Thanks!
  • no, there isn't. Zotero Standalone just passes PDF handling over to your operating system.
  • Although there isn't a setting in Zotero for this, it is possible to create a shell script that uses the location of the file to determine which PDF viewer to use. Since you can set Zotero to save all its files to a specific directory, this can effectively create a different default PDF viewer for articles opened from Zotero.

    All you need to do is to modify this script to point to the location of your Zotero PDFs and you PDF-viewers of choice. Then just set the script as your default PDF viewer. I am not the creator of the script, but I can confirm that it worked for me on Antergos Linux (Arch derivative). I would expect it to work on other Linuxes and on Macs.

    To set the script as the default PDF-viewer on Antergos, you need to create a desktop file pointing to the script, and then modify the line containing application/pdf in ~/.config/mimeapps.list to open PDFs with the newly created desktop file.

    Here is the script for reference.


    #!/bin/bash

    # Check if the pdf is in the Zotero folder.
    if [[ "$1" == */zotero-data/storage/* ]]
    then
    # Replace all / with \ (needed for the windows program Foxit Reader)
    f="z:${1//\//\\}"
    /usr/share/playonlinux/playonlinux --run "Foxit Reader" "$f"
    else
    evince "$1"
    fi
  • great, It works.
  • This is no longer necessary. You can now set a different PDF reader from the General pane of the Zotero preferences.
  • dstillman, thanks a lot!
Sign In or Register to comment.