Free Support Forum - groupdocs.com

Search and highlight support in PNG viewer for .NET

Hi i just want to know, will GroupDocs pngviewer supports search and highlight or not.

if it supports means i need some references.

@bharathiGK

GroupDocs.Viewer does support extracting text with coordinates and this data can be used for search and highlight feature, see the related documentation article Image Viewer - Get text coordinates. Do you use some client-side UI solution?

Hi. Thanks for your support.
Yes I’m using jQuery viewer.js and viewer.css

@bharathiGK

You’re welcome!

Please note that when retrieving text coordinates as it is shown in the Image Viewer - Get text coordinates article you have to set ExtractText to true on PngViewOptions too. When ExtractText is enabled Viewer will use an appropriate rendering engine so you could match the output images with the text coordinates.

using (Viewer viewer = new Viewer("sample.docx"))
{
    PngViewOptions viewOptions = new PngViewOptions();
    viewOptions.ExtractText = true;
    
    viewer.View(viewOptions);
}

Okay. Thank you for your support

@bharathiGK

You’re welcome!

Hi, In Image Viewer Search not working after enabling,
viewOptions.ExtractText = true;

I have attached sample application for your reference.
https://1drv.ms/u/s!Ashw7CN5fQm2kB3OUuKRNQVoL-9t?e=Ps8h4Z

@bharathiGK

When using viewer.js the search is only supported in HTML mode. The GroupDocs.Viewer for .NET does support extracting text as shown in my previous comment and you have to implement support of this feature in viewer.js as it is not supported out of the box.