Skip to content

Highlighting by rectangle bounds and not text #980

Answered by wojtekmaj
gla5001 asked this question in Q&A
Discussion options

You must be logged in to vote

You can use canvasRef prop to draw whatever you want on a given canvas. Here's an example with watermark added dynamically, but should be able to figure out how to draw anything else.

https://codesandbox.io/s/react-pdf-watermark-5wylx?file=/src/index.jsx

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by wojtekmaj
Comment options

You must be logged in to vote
4 replies
@jiangxiaoqiang
Comment options

@zeitderforschung
Comment options

@jiangxiaoqiang
Comment options

@zeitderforschung
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
4 participants
Converted from issue

This discussion was converted from issue #979 on April 10, 2022 22:41.