-
I'm trying to highlight multiple lines of text as single highlight by using addHighlightAnnot, but it's highlighting each line separately. For Example Line No 1 Is there is any way to get single rect value for all 3 lines. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
First of all:
|
Beta Was this translation helpful? Give feedback.
-
Text marker annotations work on the basis of either single rectangles or quads (used in case of non-horizontal stuff), or on a list of such objects. If a list is used, one text marker is created for all members of the list. But the highlighting (underlining, strikeout, etc.) is visually still the same as if you created separate text markers for each rectangle. You are free to give any rectangle / quad to |
Beta Was this translation helpful? Give feedback.
Text marker annotations work on the basis of either single rectangles or quads (used in case of non-horizontal stuff), or on a list of such objects.
If a list is used, one text marker is created for all members of the list. But the highlighting (underlining, strikeout, etc.) is visually still the same as if you created separate text markers for each rectangle.
You are free to give any rectangle / quad to
page.addHighlightAnnot()
- there needs no text at all be contained in it: it could be empty or contain an image ... whatever.So in your case simply join the line rectangles into one and use the result as argument for annot creation.