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!
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!
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Upgrade Storage
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.