Search results

Extract Text in Angular PDF Viewer component

22 Nov 2022 / 1 minute to read

The PDF Viewer library allows you to extract the text from a page along with the bounds. Text extraction can be done using the isExtractText property and extractTextCompleted event.

The following steps are used to extract the text from the page.

Step 1: Follow the steps provided in the link to create a simple PDF Viewer sample.

Step 2: The following code snippet explains how to extract the text from a page .

Copied to clipboard
 <ejs-pdfviewer #pdfViewer id="pdfViewer" [serviceUrl]='service' [documentPath]='document' (extractTextCompleted)='extractTextCompleted($event)' [isExtractText] = true style="height:640px;display:block"></ejs-pdfviewer>
Copied to clipboard
public extractTextCompleted(e: any): void {
// Extract the Complete text of load document
// Extract the Text data.
// Extract Text in the Page.
// Extract Text along with Bounds

Find the Sample, how to Extract Text