THPDFHeadlessDocument.ExtractPageTextBounded

function ExtractPageTextBounded(PageIndex, MaxGlyphs,
  MaxDecodedBytes: Integer;
  CancellationToken: THPDFCancellationToken = nil): UnicodeString;

Extracts Unicode page text via the existing nested-content interpreter under temporary positive glyph, token, encoded-object and decoded-stream bounds

The effective limits are whichever is smaller, the requested limits or the document limits; a supplied cancellation token is used during extraction, whilst the existing document token is checked before execution

All original document options are restored straight away in a finally block, failure and cancellation included; keep exclusive ownership of the instance for the duration

Native comparison merges the document and comparison tokens before calling this method and checks text preparation budgets before interpreting content

Document API · Document resource limits