How to highlight the color for non english search keyword as orange in pdfclown

51 Views Asked by At

I am using pdf clown and i got the requirement like highlight the color for non english search keyword as orange.Currently i am able to search the keyword and highlight with yellow color for non english keywords as per the screenshot: screenshot

Kindly provide your inputs to highlight the color for non english search keyword as orange.Thanks in advance .

1

There are 1 best solutions below

1
mkl On BEST ANSWER

I assume your code is the same as in this question with PDF Clown fixed as in this answer.

In the code the highlight annotation is created without any color selection. Thus, yellow is used.

If you add a color selection to

new TextMarkup(page, highlightQuads, null, MarkupTypeEnum.Highlight);

like this

new TextMarkup(page, highlightQuads, null, MarkupTypeEnum.Highlight).withColor(new DeviceRGBColor(1, .5, .2));

you get

screenshot with orange highlight