Skip to main content
Table of Contents

TTMSFNCPDFLib.GetDocumentPageText Method

Returns the text drawn on a zero-based page of the opened PDF, one line per text line.

API unit family: TMSFNCPDFLib Declaring type: TTMSFNCPDFLib Inherited from: TTMSFNCCustomPDFLib

Syntax

GeneratedPascalC++
function GetDocumentPageText(PageIndex: Integer): string;
System::UnicodeString __fastcall GetDocumentPageText(int PageIndex);

Remarks

Character codes are decoded through the /ToUnicode CMap of each font, so embedded subset fonts read back correctly. Form XObjects are followed, so overlay and underlay text is included.

Parameters

Name Description
PageIndex Zero-based index of the page to read.

Returns

Page text, with lines separated by a line feed; an empty string when the page shows no text.