property TextPageSnapshot[PageNumber: Integer]: TPdfTextPageSnapshot; // read only
type TPdfTextPageSnapshot = record
PageNumber: Integer;
Width: Double;
Height: Double;
Status: TPdfTextSnapshotStatus;
Text: WString;
Characters: TPdfTextCharacterSnapshots;
TextObjects: TPdfTextObjectSnapshots;
end;
| PageNumber | Integer. One-based page index within the loaded document |
| Status | TPdfTextSnapshotStatus. Completion flag, visited counts, unmapped and failure counters, and the budget flags that were reached |
| Text | WString. Extracted page text in native PDFium order |
| Characters | Per-character records with code point, indices, bounds, origin, angle, font size, colours and matrix facts |
| TextObjects | Per-text-object records with character ranges, font name, flags, weight and render mode |
The first access for a page captures the snapshot with TPdfTextSnapshotOptions.Default budgets, one million characters, one hundred thousand text objects and a 16 MiB font name budget. The active page is read through its loaded handles, and any other page is loaded and closed transiently without changing PageNumber or firing OnPageChange
Every access returns a deep copy, so changing a caller-owned string or array cannot modify the cached snapshot or the PDF
Completed snapshots are retained in the bounded cache described by TextSnapshotCacheCapacity and measured against CacheBudgetBytes, and GetStructuredText plus physical-layout GetTextInReadingOrder reuse the same snapshot
Calling without an active document raises EPdfError, and a PageNumber outside one to PageCount raises EPdfError with the message Incorrect page number
Use ReadTextPageSnapshot for custom capture budgets or to bypass the cache deliberately
Snapshot := Pdf.TextPageSnapshot[PageNumber];
if Snapshot.Status.Completed then
LogCharacterCount(Length(Snapshot.Characters));