agentcooper / react-pdf-highlighter

Set of React components for PDF annotation

Home Page:https://agentcooper.github.io/react-pdf-highlighter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shadow when highlighting

Akaban opened this issue · comments

Description

When I highlight any text on the rendered PDF the text is duplicated all over the highlighting, making it unreadable. Since this does not happen on online demos of react-pdf that I can find on the net I expected the problem to be related to versions. But I used many differents versions of react-pdf and pdf.js and nothing seem to fix the problem.

This may be related to upstream.

I tried to change versions of react-pdf-highlighter and differents versions of PdfWorker as well and nothing seemed to fix the problem.

Same problem happens in Google Chrome and Mozilla Firefox.

Steps to reproduce

Steps to reproduce the behavior:

  1. Load a PDF using react-pdf-highglighter
  2. Highlight some text
  3. Text is duplicated all over the highlighting

Expected behavior

I didn't expect text to be duplicated

Additional information

Capture de 2021-02-11 12:03:31

Environment

  • Browser (if applicable): google-chrome 88.0.4324.150-1 and firefox 85.0.2-1
  • React-PDF-highlighter version: 3.4.0
  • React version : 17.0.1

Thanks for any help btw :) Would be greatly appreciated !

And the library is awesome

Try adding following style to PdfHighlighter.css

.textLayer ::selection{
    color: transparent;
  }