Features
pdfFindController
is now public, that means you can now execute a search on the pdf.
In your component's ts file:
- Add reference to
pdf-viewer
, - then when needed execute search()
@ViewChild(PdfViewerComponent) private pdfComponent: PdfViewerComponent;
search(stringToSearch: string) {
this.pdfComponent.pdfFindController.executeCommand('find', {
caseSensitive: false, findPrevious: undefined, highlightAll: true, phraseSearch: true, query: stringToSearch
});
}