THPDFHeadlessDocument.ExtractPageTextBounded

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

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

The effective limits are the smaller of the requested limits and the document limits; a supplied cancellation token is used during extraction, while the existing document token is checked before execution

All original document options are restored directly in a finally block, including failure and cancellation; keep the instance exclusively owned during this operation

Native comparison combines both document and comparison tokens before calling this method and checks text preparation budgets before interpreting content

Document API · Document resource limits