Incorrect text selection in PDF reader

I often need to select some text in PDF reader and then press CTRL+C to copy the selected text to clipboard. When I performed the operations above mentioned in Zotero built-in PDF reader, the selected text was always not the same with highlighted text. For example, when I selected 'abc' in 'abc def', the 'abc' was highlighted, but 'c d' was copied to clipboard after CTRL+C.

Zoteo: 6.0.4
OS: Windows 10 21H2
System-level Zoom: 225%
display resolution: 4K
  • Hi, I prefer to read papers within Zotero, and sometimes I have to copy the content to search it on Google. But I found that I can not select the words, and "CTRL+C "and "CTRL+V" do not work even. Do you know how to fix it?
    Thanks.
  • In my scenario I can select text (selecting words is not so easy, though), and CTRL+C works. Maybe there is another program in your system that has registered CTRL+C for other purposes?
  • @hayhayhay Could you send the PDF file to support@zotero.org with a link to this thread?

    @ambulate Most likely your issue is already fixed and should be available in one of upcoming Zotero releases.
  • @martynas_b I found the same issue in every PDF I have, not a specific one. I found the same issue in Obsidian's PDF annotation plugin and logseq, but Adobe Reader/Foxit Reader work flawlessly for every PDF. So my guess is that a combination of your software components (PDF.js, maybe?) and my sw/hw environment is causing the problem.

    My system:

    Zoteo: 6.0.4
    OS: Windows 10 21H2
    System-level Zoom: 225%
    display resolution: 4K
  • @hayhayhay Does the problem exist if you open the PDF file with https://mozilla.github.io/pdf.js/web/viewer.html ?
  • edited April 21, 2022
    @martynas_b Yes, the problem does exist if I open my PDF file with the link, but the degree of mismatch between hightlight and actual selection is less than that of Zotero.
  • @hayhayhay It might help if you directly report the issue to https://github.com/mozilla/pdf.js/issues , with screenshots and example PDFs.

    I mean the issue you see on https://mozilla.github.io/pdf.js/web/viewer.html , because eventually we will upgrade to the latest PDF.js version.
  • @martynas_b I see. Thanks for the pointer!
  • (To be clear, if you do, don't mention Zotero in your report, since that will just confuse things. If you can reproduce something in the pdf.js demo, you can just report it as a pdf.js issue.)
  • edited October 4, 2022
    The problem still exists in version 6.0.15.

    The pdf.js demo site works fine in my environment now.
    https://mozilla.github.io/pdf.js/web/viewer.html

    I think the problem is related to text layout and zooming. One possible evidence: select some sentences that occupy multiple lines, and you will see unaligned highlights at the end-of-line region. Every selected line has some text area (at the end-of-line region) not covered by the highlight. At one line, there may be 5% of line length not covered by the highlight; at another line, there may be 13% of line length not covered by the highlight.
  • I'm not sure why you think this would be fixed in 6.0.15? If you can reproduce this in the pdf.js demo, it's an upstream problem, and any fix would first need to happen in pdf.js and then would make it into Zotero at some point in the future.

    Anyhow, does this happen if you set your system zoom level back to the default? Does it happen if you disable all third-party plugins? There's no general issue here with highlighting in the Zotero PDF reader, so it would be something specific to your system.
  • edited October 4, 2022
    The pdf.js demo site works fine in my environment now.
    https://mozilla.github.io/pdf.js/web/viewer.html

    I tried to set system zoom level back to 200% that is default, but to no effect.

    Sure, I'll wait for the future update. Thanks for the great work!
  • There are some text selection issues that can be fixed only after we release Zotero 7 and upgrade PDF.js.
  • Rolled back to 6 to keep plugins I needed.

    Correct text selection is more valuable to me.

    Have the Text Selection issues described above been fixed in the latest version of 7 available?
  • Yes, fixed in the beta version.
Sign In or Register to comment.