Open pdf from command line

Hi,

I've been enjoying very much the new pdf viewer and note taker, and very impressed by all the work that goes into it!

I was wondering whether there might be some way of opening a pdf--or an item's attachments--from the command line, in a new tab.
I was imagining something like firefox's command:

firefox --new-tab /path/to/file

I understand if this is not possible, for the use cases are, I imagine, a little limited.

Cheers!
  • Ended up finding a solution:

    Using the zutilo plugin, you can find the item id of a pdf--"copy select item id".
    Or you can look in the Zotero storage folder, the subdirectories of which are all labelled according to the itemid.

    This can be used to generate a link to that item:
    zotero://open-pdf/library/items/"ITEMID"

    From the command line, this can be used to open the pdf.

    I use "xdg-open + link" on Linux but I assume the particular command would be system-specific.

    I also had to make sure my mime types were set up correctly so that xdg-open opened such links in zotero.

Sign In or Register to comment.