We have a requirement to preview the Microsoft Office files(ppt, doc, excel files stored in AEM DAM) on a web page.
1. Preview should be a pop-up when clicked on a preview button. It should display the desired format file on popup.
2. The other part of this requirement is to provide an option on the pop-up itself to search for a keyword within the previewed file.
The searched result should contain the slides/page number with the number of times that keyword(highlighted in any color when the slide/page containing the keyword is opened) appeared on the slide/page.
Pop-up on the left side can have a search box, and below to search box can show the search results. While on the right side, it previews the file.
Could you please share the best practice for implementing such functionality or suggest a feasible approach or any built-in library available?
Note: since the MS files are located in AEM DAM, Google Doc Viewer/ MS Office Online would not be a fit solution.
I don't think there is anything ootb in AEM to render such documents, however, you can rely on Google Docs viewers, please check this example: https://jsfiddle.net/7xr419yb/.
Hi, thanks for your reply.
Since the MS files are located in AEM DAM, Google Doc Viewer would not be a fit solution.
To create a preview option, you have to create a custom modal window component that display the asset.. In the same component you can add the search functionality.
For search functionality inside assets please refer https://www.argildx.us/technology/fulltext-search-in-aem-pages-assets-custom-search-pdf-excel-and-po...
Hi @Gaurav_Sachdeva_ , thanks for your reply.
Could you please confirm if this search is only specific to the single file?
The expectation is that the search is done within a file, not in its sibling files under the same parent folder.
@AshishPa Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.