Skip to main content

IPdfAdapterWithTextExtraction Interface

Definition

Assembly:Avalonia.Controls.PdfViewer
Package:Avalonia.Controls.PdfViewer

Extension interface for adapters that support text extraction.

public interface IPdfAdapterWithTextExtraction

Implements: IPdfAdapter, IDisposable

Methods

NameDescription
ExtractTextAsyncExtracts text from a page.
SearchAsyncSearches for text in the document.

ExtractTextAsync Method

Extracts text from a page.

public System.Threading.Tasks.Task<string> ExtractTextAsync(Avalonia.Controls.Pdf.Core.IPdfPage page, System.Threading.CancellationToken cancellationToken)

Parameters

page Avalonia.Controls.Pdf.Core.IPdfPage

cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task<string>

SearchAsync Method

Searches for text in the document.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfSearchResult>> SearchAsync(Avalonia.Controls.Pdf.Core.IPdfDocument document, string query, Avalonia.Controls.Pdf.Core.SearchOptions options, System.Threading.CancellationToken cancellationToken)

Parameters

document Avalonia.Controls.Pdf.Core.IPdfDocument

query string

options Avalonia.Controls.Pdf.Core.SearchOptions

cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfSearchResult>>