|
var viewer = new ej.pdfviewer.PdfViewer({
serviceUrl:'https://ej2services.syncfusion.com/production/web-services/api/pdfviewer',
documentPath :"PDF_Succinctly.pdf",
});
ej.pdfviewer.PdfViewer.Inject(ej.pdfviewer.Toolbar, ej.pdfviewer.Magnification, ej.pdfviewer.BookmarkView, ej.pdfviewer.ThumbnailView, ej.pdfviewer.TextSelection, ej.pdfviewer.TextSearch, ej.pdfviewer.Print, ej.pdfviewer.Navigation, ej.pdfviewer.LinkAnnotation, ej.pdfviewer.Annotation, ej.pdfviewer.FormFields);
viewer.appendTo('#PdfViewer');
viewer.textSearchModule.searchText("authors and"); |
|
var viewer = new ej.pdfviewer.PdfViewer({
serviceUrl: ‘https://ej2services.syncfusion.com/production/web-services/api/pdfviewer,
documentPath :"PDF_Succinctly.pdf",
documentLoad:function(args){
viewer.textSearchModule.searchText("authors and");
},
});
ej.pdfviewer.PdfViewer.Inject(ej.pdfviewer.Toolbar, ej.pdfviewer.Magnification, ej.pdfviewer.BookmarkView, ej.pdfviewer.ThumbnailView, ej.pdfviewer.TextSelection, ej.pdfviewer.TextSearch, ej.pdfviewer.Print, ej.pdfviewer.Navigation, ej.pdfviewer.LinkAnnotation, ej.pdfviewer.Annotation, ej.pdfviewer.FormFields);
viewer.appendTo('#PdfViewer'); |
Hello, thanks for your response.
I tried your code and it has fixed my problem.
Anyway, we need to open the pdf and search by exact sentence or by single word:
Exact Phase: 'unlock full power'
List of Strings: Unlock+full+power
Could you helping us, implementing this functionality?
Regards,
Alessio
Hello,
for us it is important to highlight the single words because the pdf is opened by the result of a search engine that returns the document both by exact sentence and by single words. So, we need to highlight more then 1 word like: (unlock, full, power) that are scattered throughout the PDF.
Like this example:
Lorem ipsum dolor sit unlock, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo full. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est power
If we don't have this functionality we should find another PDF Viewer.
Thanks.