PDF Viewer Context Menu (right click menu)

When reading heavy texts I often look up definitions on my Mac using the Mac's context menu look up/define feature. In Zotero this seems to work fine on my iOS devices however not on the OSX built-in pdf viewer. For a reading app it is essential to enable access to such feature as the current menu is extremely limited (see here https://ibb.co/0Yv6gk2) and is not integrated with essential built in features in mac's text context menu.
  • Adding the "Look Up" menu option is technically infeasible for Zotero at the moment, but accessing the feature via its trackpad gesture works. You can see what the gesture is in System Preferences -> Trackpad -> Point & Click. I believe that the default is a single-finger Force Click on devices with Force Click support, and a three-finger tap on others.
  • Or Command-Control-D while hovering your cursor over the word.
  • edited January 7, 2023
    This would be a major improvement to the already great PDF reader. I love so many features (most of all the ability to edit and comment on highlighted text), but the inability to look up words or translate parts of foreign language texts — just like I can do in most other apps on mac — slows me down. I tried both the trackpad gestures and the keyboard shortcut, but unfortunately it does not resolve my problem. In the scanned (and OCRed) PDFs I work with, what I get when I hover over a word is a strings of words connected into one (with no spaces in between while the text in the PDF normally has spaces when I copy and paste from the PDF) and this long string of words minus spaces naturally cannot be found in any dictionary. As an example: if I were to hover over the word "improvement" at the start of this text, I would see something like "amajorimprovementtothealready" in the yellow lookup bubble which, naturally, cannot be found in any dictionary. Appreciate any advice and even more if apple's context menu could be incorporated into Zotero.
  • @pkodytek: That's a bit of a separate issue, or actually a pair of issues.

    First, that's obviously primarily a problem with the OCR in the PDF, and it will affect any function that needs to extract text from the PDF, such as highlighting. You should test copying from the PDF from various PDF readers, and if it's a general problem, you should report it to whoever produced the PDF or (if you OCRed it) try different OCR software. If it's specific to Zotero, email the PDF to support@zotero.org with a link to this thread and we can see if there's anything to do to improve the parsing.

    For the actual issue in this thread, even without a context menu you should be able to just select the word in question and press Cmd-Ctrl-D to run lookup on just the selected text. That's just not currently working in the Zotero PDF reader. (E.g., highlight the concatenated "improvement" in your comment above in Firefox or Safari and it will look up "improvement". It doesn't work in Chrome for some reason, but the Firefox behavior is what's relevant technically for Zotero.) We'll see if we can fix that.

    For translation, we can't vouch for it, but there's a plugin for the PDF reader that hooks into Google Translate.
  • edited January 9, 2023
    @dstillman: Thanks for your clarification and help! I love how you guys can pinpoint the issue more precisely than I ever could!

    You are right that this string of words does not come up with all the PDFs I have, but on those OCRed by Wondershare PDFelement (which is now my default tool for OCR).
    I tried some more files that were OCRed by someone else and noted that the issue comes up at the end of the line. So what I am thinking that maybe the matter is the definition of a word-separater? I don't know. I am sending the files to the support address.

    I was not aware of the plugin. Just installed it and works fine! Interestingly, the words in the it captures and translates is orderly separated and the "stringing" issue does not occur here.
Sign In or Register to comment.