All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfDocumentProcessor.GetPageText(Int32, PdfTextExtractionOptions) Method

Obtains text from the specified page.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v21.1.dll

Declaration

public string GetPageText(
    int pageNumber,
    PdfTextExtractionOptions options
)

Parameters

Name Type Description
pageNumber Int32

The page number. The minimum value is 1.

options PdfTextExtractionOptions

An object that contains extraction options.

Returns

Type Description
String

The text obtained from the specified page.

Remarks

If a document does not contain the specified page, the GetPageText method returns an empty string.

The GetPageText method returns text as a string of lines separated by newlines (“\r\n”).

PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor();
pdfDocumentProcessor.LoadDocument("PDF32000_2008.pdf");
string firstPageText = processor.GetPageText(1, new PdfTextExtractionOptions { ClipToCropBox = false });
See Also