Method ExtractText

Namespace
SoftZenPdf
Assembly
SoftZenPdf.dll

ExtractText(TextExtractionOptions?)

Extracts the text of every page.

public IReadOnlyList<string> ExtractText(TextExtractionOptions? options = null)

Parameters

options TextExtractionOptions

Extraction options; null for the defaults.

Returns

IReadOnlyList<string>

One string per page, in page order.

ExtractText(int, TextExtractionOptions?)

Extracts the text of a page as plain text. Runs on different lines are separated by newlines, and a space is inserted where there is a visible gap between runs on the same line.

public string ExtractText(int pageIndex, TextExtractionOptions? options = null)

Parameters

pageIndex int

Zero-based page index.

options TextExtractionOptions

Extraction options; null for the defaults.

Returns

string

The page text. Problems such as unmapped characters are reported in Warnings.

Exceptions

ArgumentOutOfRangeException

pageIndex is outside the document's pages.