Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfDocumentProcessor.GetPageText(Int32) Method

Obtains text from the specified page.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v24.2.dll

NuGet Package: DevExpress.Document.Processor

#Declaration

public string GetPageText(
    int pageNumber
)

#Parameters

Name Type Description
pageNumber Int32

An integer value that specifies the page number. The minimum value is 1.

#Returns

Type Description
String

A String value that represents 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 = pdfDocumentProcessor.GetPageText(1);
See Also