Skip to content

4.1.1

Compare
Choose a tag to compare
@VadimDez VadimDez released this 13 Feb 22:48
· 631 commits to master since this release

Features

  • [#260] - Public PDFFindController
  • [#279] - make pdfFindController public

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
  });
}