ZotFile link not opening PDF on Windows

  • I think this is the same issue I am having on my Microsoft Surface. Here is an example of my underlying zotfile: zotero://open-pdf/library/items/49X6TVYA?page=11

    The link in the extracted annotations will not open the location or the pdf at all for that matter.

    Any recommendations? Thank you
  • Can you provide a Debug ID for opening such a link?
  • I'm experiencing the same issue: D220235565.
  • No errors in there.

    What do you have set for a PDF reader in the General pane of the preferences?
  • 'system default', which is actually Xodo;
    I'm using a brand new Windows 10 installation;
    I'm suspecting this has something to do with execute rights on Windows. But I'm not so familiar with the way Windows starts exe's from other programs (Zotero)
  • Is Xodo a regular .exe program, or is it a UWP app you installed via the Microsoft Store? If the latter, it won't work with Zotero — we haven't found a way to launch PDF files via UWP apps.
  • Some troubleshooting:
    1. doubleclicking on a pdf from within Zotero correctly starts Xodo and opens the document
    2. looking into taskmanager reveals that Xodo is running as:
    C:\Program Files\WindowsApps\5E8FC25E.XODODOCS_4.2.6.0_x64__3v3sf0k6w2rec\Xodo_Windows10.exe
    3. Trying to start Xodo from the commandline with this command gives me "access denied"

    I don't know if this is of any help for you?
  • OK, I missed your previous comment. Xodo was indeed installed from the Microsoft store.
    Thank you for clarifying.
  • I'm actually surprised it works for double-clicking. I thought we weren't able to support UWP apps at all, though maybe they work for standard file opening when set as the default app, and the problem is that people haven't been able to select them as the PDF reader in the preferences.

    But the fact that you can't launch the .exe manually at all certainly would prevent the zotero://open-pdf functionality from working, since that relies on program-specific command-line flags (currently Acrobat and PDF-XChange on Windows) to select a specific page.
  • I have the same issue from windows 10 on 2 different PCs (from ubuntu no problem!) with zotero last version, just downloaded. same for zotfile
    I can't open links such as zotero://open-pdf/library/items/2BGVB6ID?page=1
    I use acrobat reader and I can easily run acrobat from terminal. no problem there.
  • edited January 29, 2020
    @davidenitti: Are you able to open PDFs normally via Zotero? Do those open in Acrobat? Can you provide a Debug ID for trying to use a zotero://open-pdf link?
  • @dstillman yes, I can open pdf with zotero with whatever pdf reader as default. I tried different readers. I only can't open zotero://open-pdf links
    I'll try to provide a debug id asap. I have to check how to do it. thanks!
  • Follow the link dstillman gave above to see how to submit a debug ID: https://www.zotero.org/support/debug_output#debug_output_logging
  • edited January 31, 2020
    @dstillman in this debugID I press the link and nothing happens: D1465178600
  • edited February 3, 2020
    @emahlan, @davidenitti: Where are you triggering these? In a note, or in a report? It looks like the latter may have broken in a recent version. But opening a zotero://open-pdf link from a note or from a linked-URL attachment works for me.
  • @dstillman when I click on a link in a note. the same link opens on ubuntu (I sync the library).
  • edited February 3, 2020
    Can you provide another Debug ID for this with ZotFile disabled?

    That shouldn't make a difference — as far as I know, ZotFile removed its own open-pdf functionality when we integrated it into Zotero — but you're not receiving the normal "ZoteroLinkClick" line in the debug output when you click on a note, which suggests something is off here. (You should be able to see that line yourself if you View Output in the Debug Output Logging menu, when you click a zotero:// link or any other link in a note.)
  • ZotFile removed its own open-pdf functionality when we integrated it into Zotero
    This happend only recently in Zotfile 5.0.13, see here:
  • @dstillman none of the above worked. My debug ID is D1080790460.
  • Thanks — I was finally able to reproduce this. It happens on Windows when a default PDF reader isn't set for the system (such that it opens PDFs in Edge, at least in my stock Windows 10 install).

    Edge isn't a supported viewer for opening to a specific PDF page, so the correct behavior here for zotero://open-pdf links is to simply open the PDF, as happens when you double-click on one in the items list. In the latest Zotero beta, I've fixed it to do that, and the fix will be included in Zotero 5.0.83. You can also avoid this bug by setting a custom PDF reader from the General pane of the preferences.

    If you want to take advantage of the page links, you'll need to use either Acrobat or PDF-XChange (or another program that uses one of the same command-line flags to specific a page number).
  • This fix is included in Zotero 5.0.83, so if you had switched to the beta, you can switch back now if you want to.
  • I found this to open UWP apps via terminal.

    Maybe this can help to implement a way to open the pdf via Zotero.
Sign In or Register to comment.