简体   繁体   English

如何在pdfclown中将非英文搜索关键字的颜色突出显示为橙色

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

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:我正在使用 pdf 小丑,我得到了像将非英语搜索关键字的颜色突出显示为橙色的要求。目前,我可以按照屏幕截图搜索关键字并用黄色突出显示非英语关键字:截屏

Kindly provide your inputs to highlight the color for non english search keyword as orange.Thanks in advance .请提供您的输入以将非英语搜索关键字的颜色突出显示为橙色。提前致谢。

I assume your code is the same as in this question with PDF Clown fixed as in this answer .我假设您的代码与此问题中的代码相同,并在此答案中修复了 PDF Clown。

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你得到

带有橙色突出显示的屏幕截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM