PdfDocumentProcessor.GetPageText(Int32, PdfTextExtractionOptions) Method
In This Article
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,
PdfTextExtractionOptions options
)
#Parameters
Name | Type | Description |
---|---|---|
page |
Int32 | The page number. The minimum value is 1. |
options | Pdf |
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