PDFium Delphi Component Docs

PDFium VCL API Reference

On Windows, use VCL or the Lazarus Windows widget set. Native Free Pascal/LCL targets use Linux Qt6 or macOS Cocoa and a matching PDFium shared library; native LCL setup explains toolchain and runtime requirements. The Delphi/C++Builder VCL wrapper remains a Windows option; native Delphi macOS crypto and timestamp helpers are qualified separately from that visual wrapper

Helper Units

UnitDescription
FPdfAsyncProvides structured cancellation, configurable futures, and a bounded priority worker pool for responsive background PDF work
FPdfMatrixProvides affine composition, diagnostics, fitted rectangle mapping, inverse geometry, decomposition, and bulk point or rectangle transforms for PDFium page-object APIs
FPdfMeasureAdds TPdf.MeasureText, MeasureTextWidth, and WrapText helper methods for text layout in PDF user units
FPdfLayoutBuilds paginated, tagged, grid-based, Markdown, HTML, table, image, link, and reusable-node layouts
FPdfTextShapingShapes bidirectional Unicode text into bounded visual glyph runs with an extensible shaper interface and a Windows Uniscribe implementation
FPdfProductionProvides bounded colour, font, SVG, replacement, XFA, barcode, Portfolio, and RichMedia production workflows
FPdfDiffResource-limited page alignment, Unicode text changes and connected visual regions
FPdfMergeTransactional page merging with outlines, named destinations and internal links, checked by reopening independently
FPdfOcrTesseractOptional Tesseract OCR with explicit dependency requirements and recognition allowances
FPdfFormMergeTransactional AcroForm field merging with selected collision policies
FPdfBarcodeZXingOptional native barcode encoding and recognition
FPdfStyledEditChecked PDF text replacement retaining styles, with preview and rollback
FPdfSemanticDiffStable annotation and form changes, with before/after overlay coordinates
FPdfColourLittleCmsOptional native ICC transformation of original Gray, RGB and CMYK samples
FPdfDocumentColourResource-limited document colour conversion that reports unsupported objects
FPdfRedactionNested Form, solid-filled path and affine-image geometry for transactional redaction
FPdfStandardsExecutionExecutes measurement, GeoPDF, PDF/A repair, PDF/UA, PDF/X, PAdES evidence, PDF/VT, PDF/E, and PDF/R workflows
FPdfAsn1Encodes, navigates, decodes, and validates bounded ASN.1 DER data with high-tag identifiers, typed values, canonical checks, and resource limits
FPdfPreflightReportBuilds queryable standards reports, PDF/A repair plans, PDF/X production preflight, declarative rules, resource budgets, isolated parallel validation, aggregation, and machine-readable export
FPdfBenchmarkRuns bounded performance and conformance corpora with load, first-page, rendering, saving, memory, semantic, pixel, and independent-reopen gates
FPdfXmpReads, edits, and incrementally writes bounded namespace-aware XMP packets with typed RDF values and unknown namespace preservation
FPdf standards helpersStandalone associated-file, PAdES, PDF/A, PDF/E, PDF/R, PDF/UA, PDF/VT, and PDF/X validation and save APIs
FPdfThumbnailProvides the TPdfThumbnailView scrollable thumbnail navigation control
FPdfCompressStream-level FlateDecode compression, default open-action injection, post-save normalisation, and PDF version inspection used by the TPdf save pipeline
FPdfContentNormalizeScans and normalises PDF content sequences, including bounded inline-image handling
FPdfXfdfStandalone XFDF import and export of form fields and annotations without loading pdfium.dll
FPdfEditPDFium page-object editing binding plus standalone ARGB colour helper functions
FPdfPdfvtMimeBuilds and validates single-file PDF/VT-2s MIME part streams carrying an inline PDF/VT document, reusable attachments, and ICC profile
FPdfIccProfilePerforms bounded ICC header and tag-table validation with MD5, SHA-256, profile metadata, and multilingual description matching
FPdfEncryptWrites AESV3-CBC or ISO/TS 32003 AESV4-GCM encrypted PDFs and authenticates AESV4 compatibility decryption
FPdfAesPure-Pascal AES-128 and AES-256 block cipher with key expansion and AES-256-CBC stream wrappers
FPdfHmacPure-Pascal HMAC-SHA256, HKDF-SHA256, constant-time byte comparison, and secure byte clearing
FPdfMacBuilds and verifies ISO/TS 32004 standalone CMS AuthenticatedData tokens
FPdfAesGcmPure-Pascal AES-GCM authenticated encryption for AES-128 and AES-256 keys
FPdfSha256Pure-Pascal SHA-256 hash with incremental and one-shot helpers
FPdfSha512Pure-Pascal SHA-512 and SHA-384 hashing sharing one context type
FPdfSha3Pure-Pascal SHA3-256, SHA3-384, SHA3-512, and streaming SHAKE256 hashing for PDF 2.x cryptographic extensions
FPdfCmsBuilds RFC 5652 CMS and CAdES SignedData from a detached digest and an ICmsSigner crypto backend
FPdfTsaRFC 3161 timestamp authority client for the PAdES B-T and B-LTA profiles
FPdfTsaWinWindows WinHttp timestamp transport backend for RFC 3161 requests
FPdfTsaFpclibcurl timestamp transport for RFC 3161 requests on Linux and macOS
FPdfTsaPosixNative Delphi POSIX HTTP transport for RFC 3161 timestamps, with finite request allowances
FPdfCryptoPAdES signer-resolution facade over the active crypto backend
FPdfTrustedListAuthenticated European trusted-list parsing, caching, updating, trust anchors, and qualified-service evaluation
FPdfCryptoWinWindows backend for CNG signing, detached CMS verification, signer certificate extraction, and cache-only system trust evaluation
FPdfCryptoMacmacOS backend signing with a Keychain identity and verifying CMS through CMSDecoder and SecTrust
FPdfCryptoSslExplicitly configured OpenSSL signing, independent CMS checks, limited OCSP/CRL evidence and individual signer diagnostics that keep the preceding CRL verdict when no OCSP response or responder is examined
FPdfCryptoOcspResource-limited OCSP DER and freshness filtering ahead of native responder authentication
FPdfPkcs11PKCS#11 token signing backend that keeps the private key inside the token, on every platform
FPdfSha1Pure-Pascal SHA-1 used only to match a certificate by thumbprint, never as a signing digest
FPdfBidiUnicode Bidirectional Algorithm (UAX #9) resolution and visual reordering, with no platform dependency
FPdfTextShapingHbHarfBuzz text shaping backend for platforms without Uniscribe

TPdf Component Methods

Document Management

MethodDescription
CreateDocumentCreate a new empty PDF document
LoadDocument(Data: TMemoryStream; Buffered: Boolean = True)Load PDF document from memory stream
LoadDocument(Data: Pointer; Size: Integer; Buffered: Boolean = True)Load PDF document from memory buffer
LoadDocumentLoad PDF document from FileName
LoadDocument(const Data: TBytes; Buffered: Boolean = True)Load PDF document from TBytes
LoadCustomDocument(AStream: TStream; AOwnsStream: Boolean = False)Stream a PDF document from any TStream via FPDF_LoadCustomDocument; PDFium pulls blocks on demand instead of copying the entire file into memory. AOwnsStream = True transfers stream lifetime to the TPdf instance
TPdfLoadOptions, TPdfLoadReport, LastLoadReportSelect compatible, strict, or recovery loading and inspect bounded xref audit evidence
SaveAsRepairedWrite a full single-revision copy and independently strict-load it before delivery
TPdfRandomAccessStoreThread-safe seekable storage with positioned I/O and one-way spill from bounded memory to private delete-on-close temporary storage
SaveMemoryLimit, SaveTemporaryDirectory, LastSaveSpillCount, LastSaveLargestMemoryBufferConfigure and measure bounded working storage used by TPdf save staging
SaveAs(Stream: TStream; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown): BooleanSave document to stream with optional compression and explicit PDF 1.3 through PDF 1.7 conformance checks; encrypted explicit-version output and pv13 with saIncremental raise EPdfError
SaveAs(const FileName: string; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown): BooleanAtomically save document to file with optional compression and explicit PDF 1.3 through PDF 1.7 conformance checks; a failed normalisation or validation leaves an existing target unchanged
SaveAsLinearized(Stream: TStream; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown): BooleanWrite Annex F Fast Web View output with first-page grouping and verified page-offset and shared-object hint tables
SaveAsLinearized(const FileName: string; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown): BooleanAtomically write Fast Web View output through a same-directory temporary file
SaveAsObjectStream(Stream: TStream; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown; MaxObjectsPerStream: Integer = 100; MaxDecodedBytesPerStream: Integer = 65536): BooleanWrite bounded PDF 1.5+ object streams with a complete type-2 xref stream
SaveAsObjectStream(const FileName: string; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown; MaxObjectsPerStream: Integer = 100; MaxDecodedBytesPerStream: Integer = 65536): BooleanAtomically write modern object-stream output through a same-directory temporary file
SaveAsNormalizedContent(Stream: TStream; out Report: TPdfContentNormalizeReport; const Options: TPdfContentNormalizeOptions; SaveOption: TSaveOption = saNoIncremental; PdfVersion: TPdfVersion = pvUnknown): BooleanWrite normalised and coalesced logical page content with bounded syntax validation
SaveAsNormalizedContent(const FileName: string; out Report: TPdfContentNormalizeReport; const Options: TPdfContentNormalizeOptions; SaveOption: TSaveOption = saNoIncremental; PdfVersion: TPdfVersion = pvUnknown): BooleanAtomically write normalised-content output through a same-directory temporary file
SaveAsReachable(Stream: TStream; out Report: TPdfPruneReport; AllowSignedDocument: Boolean = False): BooleanRewrite the document as a single clean revision keeping only the objects reachable from the catalog and trailer /Info
SaveAsReachable(const FileName: string; out Report: TPdfPruneReport; AllowSignedDocument: Boolean = False): BooleanAtomically write a pruned single-revision copy through a same-directory temporary file
SaveAsDeduplicated(Stream: TStream; out Report: TPdfDedupReport; AllowSignedDocument: Boolean = False): BooleanRewrite the document sweeping unreachable objects and merging compatible fonts, images, and form XObjects onto one representative
SaveAsDeduplicated(const FileName: string; out Report: TPdfDedupReport; AllowSignedDocument: Boolean = False): BooleanAtomically write a deduplicated single-revision copy through a same-directory temporary file
SaveAsFlateRecompressed(Stream: TStream; const Options: TPdfFlateRecompressOptions; out Report: TPdfFlateRecompressReport; AllowSignedDocument: Boolean = False): BooleanRewrite the document re-encoding FlateDecode streams at maximum compression when the saving clears a caller threshold
SaveAsFlateRecompressed(const FileName: string; const Options: TPdfFlateRecompressOptions; out Report: TPdfFlateRecompressReport; AllowSignedDocument: Boolean = False): BooleanAtomically write a Flate-recompressed copy through a same-directory temporary file
SaveAsInlineImagesExternalised(Stream: TStream; const Options: TPdfInlineImageExternaliseOptions; out Report: TPdfInlineImageExternaliseReport; AllowSignedDocument: Boolean = False): BooleanRewrite the document extracting BI/ID/EI inline images into reusable XObjects and replacing inline blocks with Do operators
SaveAsInlineImagesExternalised(const FileName: string; const Options: TPdfInlineImageExternaliseOptions; out Report: TPdfInlineImageExternaliseReport; AllowSignedDocument: Boolean = False): BooleanAtomically write an externalised copy through a same-directory temporary file
SaveAsReproducible(Stream: TStream; out Report: TPdfReproducibleReport; AllowSignedDocument: Boolean = False): BooleanRewrite the document stripping non-deterministic timestamps and /ID so repeated saves are byte-identical
SaveAsReproducible(const FileName: string; out Report: TPdfReproducibleReport; AllowSignedDocument: Boolean = False): BooleanAtomically write a reproducible copy through a same-directory temporary file
ExportObjectGraph(Stream: TStream; const Options: TPdfObjectGraphInspectOptions; out Report: TPdfObjectGraphReport): BooleanExport active direct and object-stream values as bounded typed JSON with optional encoded-stream SHA-256 digests
SaveAsObjectGraphPatched(Stream: TStream; const Operations: TPdfObjectPatchOperations; out Report: TPdfObjectGraphReport; AllowSignedDocument: Boolean = False): BooleanApply transactional typed top-level dictionary patches and strict-load the staged result before delivery
SaveAsObjectGraphPatched(const FileName: string; const Operations: TPdfObjectPatchOperations; out Report: TPdfObjectGraphReport; AllowSignedDocument: Boolean = False): BooleanAtomically replace a file after the complete object-graph patch transaction succeeds
ExportObjectGraph / SaveAsObjectGraphPatched object-graph envelopeObject-graph inspection and patching model page shared by both methods, covering the versioned pdf-object-graph-v1 envelope and transactional patches verified by strict loading
InspectOptionalContent(out Inventory: TPdfOptionalContentInventory; Usage: TPdfOptionalContentUsage = ocuView; ConfigurationIndex: Integer = -1): BooleanRead the optional-content model and effective native rendering state
SaveAsOptionalContentConfigured(Stream: TStream; const Changes: TPdfOptionalContentStateChanges; const Options: TPdfOptionalContentConfigureOptions; out Report: TPdfOptionalContentConfigureReport; AllowSignedDocument: Boolean = False): BooleanWrite and strictly verify caller-selected optional-content state
BeginEditTransaction(const LabelText: WString = ''; AllowSignedDocument: Boolean = False)Start an atomic document edit transaction from a reproducible native snapshot
CommitEditTransaction: BooleanStore the changed transaction as a bounded SHA-256-chained bidirectional delta
RollbackEditTransactionRestore the pre-transaction document without adding an undo entry
BeginPageObjectEditTransaction(AllowSignedDocument: Boolean = False)Start an atomic page-scoped native object mutation batch
CommitPageObjectEditTransaction: BooleanGenerate page content once and commit all successful native mutations
RollbackPageObjectEditTransactionRestore the validated pre-batch document snapshot
PageObjectEditTransactionStatus: TPdfPageObjectEditTransactionStatusReport transaction state, page, mutation count, and content-generation count
BeginPageObjectEditTransaction / CommitPageObjectEditTransaction / RollbackPageObjectEditTransaction / PageObjectEditTransactionStatusAtomic page-scoped edit transaction model covering the bounded snapshot, batched native mutations, a single content regeneration pass, and rollback
UndoEdit: BooleanApply and verify the inverse delta at the current journal position
RedoEdit: BooleanApply and verify the forward delta after the current journal position
EditCanUndo: BooleanReport whether a committed document transaction can be undone
EditCanRedo: BooleanReport whether an undone document transaction can be redone
ClearEditJournalRelease committed edit history while keeping the current document state
ConfigureEditJournal(const Options: TPdfEditJournalOptions)Set entry, stored-delta, and snapshot limits
GetEditJournalInfo: TPdfEditJournalInfoRead journal position, labels, fingerprints, limits usage, and undo or redo availability
ExportEditJournal(Stream: TStream)Write the portable bounded journal format
ImportEditJournal(Stream: TStream; ApplyRecordedPosition: Boolean = True; AllowSignedDocument: Boolean = False)Validate and replay a journal only against its root or recorded fingerprint
SaveRecoverySnapshotWrite a checksummed recovery package containing source fingerprints and the verified edit journal
RestoreRecoverySnapshotRestore a recovery package only after checksum, source, journal, and result verification
InspectRecoverySnapshotRead recovery metadata and validate the package without applying edits
EnableRecoveryAutosave(const FileName: string)Atomically refresh an explicit recovery file after commit, undo, or redo
DisableRecoveryAutosaveStop commit-driven recovery writes without deleting an existing package
RecoveryAutosaveFileName: stringRead the absolute recovery autosave path or an empty string when disabled
ValidatePagePlan(const Plan: TPdfPagePlan; ImportedSource: TPdf = nil; AllowSignedDocument: Boolean = False): TPdfPagePlanValidationReportCompile a page operation into an exact old-to-new map and report navigation, label, form, structure, imported-feature, and signature effects without changing either document
GenerateLayout(Layout: TPdfLayoutDocument; out Plan: TPdfLayoutPlan; AllowSignedDocument: Boolean = False): BooleanMeasure and paginate first, then atomically append native text, rules, table borders, images, pages, and reusable page XObjects with stable page totals
GeneratePagedLayout(Layout: TPdfLayoutDocument; PagedPlan: TPdfLayoutPagedPlan; out Plan: TPdfLayoutPlan; AllowSignedDocument: Boolean = False): BooleanStream commands to seekable storage, materialise one bounded page array at a time, and append PDFium pages sequentially
GenerateTaggedLayout(Layout: TPdfLayoutDocument; out Plan: TPdfLayoutPlan; const Language: string = 'en-US'): BooleanGenerate a new semantic layout document with native MCIDs, a complete structure and parent tree, alternate text, table header associations, and tagged links
TPdfLayoutDocument.AddLink / AddSemanticNode / SetLastItemSemanticsAttach URI links, non-visual semantic containers, and role, parent, ID, language, alternate-text, list, and table metadata to layout items
TPdfLayoutDocument.AddTable(Table: TPdfLayoutTable)Snapshot and paginate a table with captions, repeated headers, splittable rows, merged cells, links, borders, and continuous tagged semantics
TPdfLayoutDocument.AddCachedNode(Node: TPdfLayoutCachedNode; Height: Single = 0; Width: Single = 0)Build a lazy node once, cache its measured plan, and emit repeated placements from one native Form XObject template
BeginIncrementalSave(AllowSignedDocument: Boolean = False)Start a dirty-object revision session from a stable semantic snapshot while retaining the exact encrypted or unencrypted source prefix
CommitIncrementalSave(Stream: TStream; out Info: TPdfIncrementalCommitInfo): BooleanAppend only changed or new indirect objects, inheriting encrypted security parameters and validating the complete revision chain
CommitIncrementalSave(const FileName: string; out Info: TPdfIncrementalCommitInfo): BooleanDurably flush, reopen, validate, and atomically replace through a same-directory side file while rolling session state back after failure
EndIncrementalSaveRelease the baseline and accumulated revision state
SaveAsEncrypted(const FileName: string; const Options: TPdfEncryptOptions): BooleanSaves the active PDF with AESV3-CBC or ISO/TS 32003 AESV4-GCM encryption
SaveAsEncryptedToStream(Stream: TStream; const Options: TPdfEncryptOptions): BooleanWrites the encrypted PDF output into any seekable TStream without staging through disk
ValidatePdfMac(const Password: AnsiString): TPdfMacValidationResultValidates an ISO/TS 32004 standalone PDF MAC against the original loaded source bytes
SaveAsWithAssociateFiles(const FileName: string; const Options: TAssocFilesOptions): BooleanSaves the active PDF to a file path while injecting associated files into the catalog or pages conforming to ISO 32000-2 §7.11.4
SaveAsWithAssociateFilesToStream(Stream: TStream; const Options: TAssocFilesOptions): BooleanWrites the PDF output with injected associated files into any seekable TStream without staging through disk
CompareWith(Other: TPdf; const Options: TPdfDocumentDiffOptions; out Report: TPdfDocumentDiffReport): BooleanCompares page count, geometry, rotation, extracted text, and tolerance-aware rendered pixels
ImportImposed(const Options: TPdfImpositionOptions; out Plan: TPdfImpositionPlan; out Report: TPdfImpositionExecutionReport): TPdfBuilds N-up or booklet output through batched native PDFium composition and reports execution counts
ImportPages(Pdf: TPdf; const Range: string; PageNumber: Integer = 1): BooleanImport pages from another PDF document. Range format: '1,3,5-7'
ImportPreferences(Pdf: TPdf): BooleanImport viewer preferences from another PDF

Page Operations

MethodDescription
AddPage(PageNumber: Integer; Width, Height: Double)Add a new page at the specified one-based position with given dimensions (in points, 72 points = 1 inch). Passing 0 is accepted as a compatibility alias for inserting the first page, and the inserted page becomes current
DeletePage(PageNumber: Integer)Delete page at specified index
ExtractThumbnail(PageNumber: Integer): TBitmapDecode the embedded thumbnail for any one-based page without changing the active page
GetPageBox(Box: TPdfPageBox): TPdfRectangleRead the selected page dictionary box from the current page
RemoveObject(Index: Integer; DestroyObject: Boolean = True)Remove a page object from the current page and regenerate page content
ReloadPageReload the current page
SetPageBox(Box: TPdfPageBox; const Rectangle: TPdfRectangle)Set the selected page dictionary box on the current page
UpdatePageApply pending changes to the current page (calls FPDFPage_GenerateContent)

Text Operations

MethodDescription
Text(StartIndex: Integer = 0; Count: Integer = MaxInt): WStringExtract text from current page
TextInRectangle(Left, Top, Right, Bottom: Double): WStringExtract text from rectangular area (page coordinates)
TextInRectangle(Rectangle: TPdfRectangle): WStringExtract text from rectangle
ReadTextPageSnapshot(PageNumber: Integer; const Options: TPdfTextSnapshotOptions; out Status: TPdfTextSnapshotStatus): TPdfTextPageSnapshotCaptures text, Unicode, geometry, style, and normalised text-object metadata in one explicitly bounded native pass
TextPageSnapshot[PageNumber: Integer]: TPdfTextPageSnapshotReturns a deep caller-owned copy from the revision-aware text snapshot LRU without changing the active page
TextSnapshotCacheCapacity, TextSnapshotCacheCount, TextSnapshotCacheHitCount, TextSnapshotCacheMissCountConfigures bounded retention and reports cache occupancy, hits, and misses
TPdfTextPageSnapshot / TPdfTextSnapshotStatusCaller-owned text snapshot record and bounded-read status model, plus the behaviour of the revision-aware LRU cache
ReadPageObjectsSnapshot(PageNumber: Integer; const Options: TPdfPageObjectSnapshotOptions; out Status: TPdfPageObjectSnapshotStatus): TPdfPageObjectsSnapshotCaptures immutable page-object geometry, style, marks, clips, image facts, and text facts under explicit budgets
PageObjectsSnapshot[PageNumber: Integer]: TPdfPageObjectsSnapshotReturns a deep caller-owned copy from the revision-aware page-object snapshot LRU
PageObjectSnapshotCacheCapacity, PageObjectSnapshotCacheCount, PageObjectSnapshotCacheHitCount, PageObjectSnapshotCacheMissCountConfigures bounded page-object retention and reports cache occupancy, hits, and misses
TPdfPageObjectsSnapshot / TPdfPageObjectSnapshotStatusCaller-owned page-object snapshot record and bounded-read status model, plus the behaviour of the revision-aware LRU cache
GetStructuredText(const Options: TPdfStructuredTextOptions): TPdfStructuredTextPageBuild a bounded page, block, line, and styled-span model with native character geometry and optional semantic enrichment
ExtractTables(const Options: TPdfTableExtractionOptions): TPdfTablesDetect ruled and whitespace-aligned tables on the current page with merged cells, confidence, CSV, and JSON output
ExtractDocumentTables(const Options: TPdfTableExtractionOptions): TPdfTablesExtract bounded tables across every page and mark matching cross-page continuation chains
BuildReflowDocument(const Options: TPdfReflowOptions; const CancellationToken: IPdfCancellationToken = nil): TPdfReflowDocumentBuild a bounded semantic page tree and emit responsive, escaped HTML with headings, paragraphs, lists, figures, and span-aware tables
ApplyOcrSearchLayer(Provider, Options, Report, CancellationToken): BooleanRender selected pages through PDFium and add confidence-filtered invisible OCR text without re-encoding page images
AddText(const Text, Font: WString; FontSize: Single; X, Y: Double; Color: TColor = clBlack; Alpha: Byte = $FF; Angle: Double = 0.0)Add text at specified position with font, colour, transparency, and rotation angle
SetText(ObjectIndex: Integer; const Text: WString)Set text for an existing text object (undocumented PDFium API, may cause formatting issues)
SetTextPositions(ObjectIndex: Integer; const Positions: TPdfSingleArray)Set per-character positions for an existing text object. Positions start with the second character and are relative to the text object origin
FindFirst(const Text: WString; Options: TSearchOptions = []; StartIndex: Integer = 0; DirectionUp: Boolean = True): IntegerStart text search, returns character index or -1 if not found
FindNext: IntegerContinue text search forward, returns character index or -1
FindPrevious: IntegerContinue text search backward, returns character index or -1
CreateDocumentSearch(Text, Options, StartPage, Direction, CancellationToken): TPdfDocumentSearchCreate a lazy forward or backward full-document search with one-page native handle retention, cancellation, and per-match geometry
CharacterIndexAtPos(X, Y, ToleranceX, ToleranceY: Double): IntegerGet character index at page position
RectangleCount(StartIndex: Integer = 0; Count: Integer = MaxInt): IntegerGet the number of text rectangles for a character range
ReadingUnits: TPdfReadingUnitsReturn sentence-level reading units for assistive listen-reading and semantic navigation
DocumentReadingUnits: TPdfReadingUnitsBuilds sentence-level TPdfReadingUnit records for the whole document readable-content stream
PageWordBoxes: TPdfWordBoxesReturn word boxes with FTextPage ranges and page-space rectangles for word-by-word highlighting
SetReadingWord(const Word: TPdfWordBox)Highlights one TPdfWordBox as the current spoken word on TPdfView
ClearReadingWordClears the current word-level reading cursor overlay on TPdfView
TrackReadingWordAt(PageNumber, CharIndex: Integer): IntegerMaps a page character offset to the containing TPdfWordBox, highlights it, and returns the word index
SelectWordBox(const Word: TPdfWordBox): BooleanSelect the viewer text range represented by one TPdfWordBox
SelectWordSpan(const Words: TPdfWordBoxes; StartIndex, EndIndex: Integer): BooleanSelect a same-page span of TPdfWordBox records as one viewer text selection
BuildReadingUnits(Fragments)Converts TPdfContentFragments into sentence-level TPdfReadingUnit records without loading pdfium.dll
NextReadingUnitOfKind(Units, CurrentIndex, Kind, GoForward)Finds the next or previous TPdfReadingUnit whose Kind matches a requested TPdfContentFragmentKind
BuildWordBoxes(PageText)Splits page text into TPdfWordBox records with word text and FTextPage character ranges
WordBoxIndexAtCharIndex(Words, CharIndex)Map a character index back to the zero-based TPdfWordBox index that contains it
SpokenTextAppend(var Spoken: TPdfSpokenText; const SpokenPart: WString; Page, StartIndex: Integer; SourceCount: Integer = -1)Append one mapped spoken-text run to TPdfSpokenText
BuildSpokenTextFromWords(Words, FirstWord, LastWord)Build TPdfSpokenText from a contiguous TPdfWordBox range
SpokenToPageChar(Spoken, SpokenOffset, Page, CharIndex)Translate a speech-engine character offset back to a PDF page character
EstimateSpokenWordIndex(Words, ElapsedMs, WordsPerMinute)Estimate the spoken word index when the speech engine reports no word position

Annotation Operations

MethodDescription
CreateAnnotation(const Annotation: TPdfAnnotation)Create a new annotation on the current page
DeleteAnnotation(Index: Integer)Delete annotation at index

Form Flattening

MethodDescription
GenerateFormAppearancesRegenerates /AP appearance streams for every form widget on every page (FPDF_FFLDraw). Call after FormField[] assignments and before SaveAs / FlattenPage / FlattenAllPages
FlattenPage(nFlag: Integer = FLAT_NORMALDISPLAY): IntegerFlatten annotations and form widgets on the current page into static content. Returns FLATTEN_SUCCESS, FLATTEN_NOTHINGTODO, or FLATTEN_FAIL
FlattenAllPages(nFlag: Integer = FLAT_NORMALDISPLAY): BooleanFlatten every page in the document. Returns True when all pages succeed
SetFormFieldFlags(Index: Integer; const Flags: TPdfFormFieldFlags)Set AcroForm field flags for the form field at the specified annotation index on the current page
SetFormFieldFlagsAt(X, Y: Single; const Flags: TPdfFormFieldFlags)Set AcroForm field flags for the form field at the specified page coordinates

XFA Operations

The v3.125.3 ordinary Windows libraries report failed final buffered writes as failed saves, in line with the v3.125.2 V8 repair. The Windows V8 libraries preserve edited text in packet-array and supported single-stream XDP saves, including original whitespace and supplementary Unicode. In v3.126.0, supported single-stream XDP also retains comments and processing instructions outside replaced live datasets and form packets, including UTF-8 and BOM-marked UTF-16 inputs; invalid input encoding, incomplete tags, invalid entity references, malformed processing instructions, comments or processing instructions inside replaced packets, DTD declarations and XMLDSig are rejected. These are bounded save guards, not a complete XML validator. Other supported packets and root namespaces are retained semantically; arbitrary external-form conformance and byte-identical XML serialisation remain outside the verified scope

Windows viewer copy, cut and form paste use a bounded 100ms clipboard-open retry budget in v3.126.0 without pumping UI messages; unavailable clipboard access still returns failure, and a failed cut leaves the original field text and selection intact

In v3.126.1, dynamic XFA page additions and removals update TPdf.PageCount and OnXfaPageCountChanged from the completed layout's actual total page count, rather than reading the native event's delta as the total

In v3.126.2, full XFA viewing keeps the default text-selection settings safe, replaces selected field text during keyboard input and refreshes page handles once a dynamic layout callback returns; read-only fields and AllowFormEvents retain their input restrictions

The v3.126.2 Windows V8 save guards validate attribute syntax, duplicate attributes, qualified names, namespace scopes and XML declarations before altering single-stream XDP; XML schemas, DTD, XMLDSig, XML 1.1 and supplementary-plane names remain outside the supported scope

AnalyzeSignatureRevisions separates page ownership from widget navigation links and preserves page-content context for shared appearance payloads, so a later page edit is no longer treated as a permitted form or annotation update

The v3.126.1 Windows V8 libraries also refresh loaded input-widget geometry when dynamic layout moves a field, keeping its text and native input hit area aligned with the new location. The required repository fixture verifies instance addition, removal and height changes through native events; arbitrary external forms and foreground viewer input remain separate acceptance work

MethodDescription
GetXfaConfigRetrieves the raw XML bytes of the XFA config packet from the PDF document
GetXfaDatasetsRetrieves the original XFA datasets XML bytes from the PDF document
GetXfaFormPacketsSnapshots all embedded XFA packets in a TXfaPacketList collection
GetXfaPacketByNameReturns the raw content bytes of the XFA packet identified by name
GetXfaPacketContentReturns the raw content bytes of the XFA packet at the given zero-based index
GetXfaPacketCountReturns the number of XFA packets embedded in the document
GetXfaPacketNameReturns the name of the XFA packet at the given zero-based index
GetXfaTemplateRetrieves the raw XML bytes of the XFA template packet from the PDF document

Attachment Operations

MethodDescription
CreateAttachment(const Name: WString): BooleanCreate a new empty attachment
DeleteAttachment(Index: Integer): BooleanDelete attachment at index

Image Operations

MethodDescription
AddJpegImage(JpegImage: TStream; X, Y, Width, Height: Double): BooleanAdd JPEG image from stream at specified position and size
AddPicture(Picture: TPicture; X, Y: Double)Add picture at position (original size)
AddPicture(Picture: TPicture; X, Y, Width, Height: Double)Add picture at position with specified size
AddImage(const FileName: string; X, Y, Width, Height: Double)Direct image-file insertion (delegates to AddPicture through a temporary TPicture); accepts any image format registered with the VCL or LCL graphics units
AddImage(Bitmap: TBitmap; X, Y, Width, Height: Double)Insert a pf32bit TBitmap directly without the TPicture intermediary; raises EPdfError on nil bitmap

Drawing Operations

MethodDescription
CreatePath(X, Y: Single; FillMode; FillColor; FillAlpha; Stroke; StrokeColor; StrokeAlpha; StrokeWidth; LineCap; LineJoin; BlendMode)Create a path starting at position (X, Y)
CreatePath(X, Y, Width, Height: Single; ...)Create a rectangular path with given bounds
MoveTo(X, Y: Single)Move the current point to (X, Y)
LineTo(X, Y: Single)Draw a line from the current point to (X, Y)
BezierTo(X1, Y1, X2, Y2, X3, Y3: Single)Draw a Bezier curve with two control points and an endpoint
ClosePathClose the current subpath
AddPathAdd the completed path to the current page

Rendering

MethodDescription
RenderPage(DeviceContext: HDC; Left, Top, Width, Height: Integer; Rotation; Options)Render page to a device context (HDC)
RenderPage(Left, Top, Width, Height: Integer; Rotation; Options; Color): TBitmapRender page to a new bitmap
RenderPage(Bitmap: TBitmap; Left, Top, Width, Height: Integer; Rotation; Options; Color)Render page to an existing bitmap
RenderPageByIndex(PageNumber, Width, Height: Integer; Rotation; Options; Color): TBitmapRender any page at an exact size without changing the active page, reusing parsed page scenes
RenderPageSkia(Canvas, Width, Height, DrawFormOverlay)Render the active page and optional form overlay to a caller-owned SkCanvas when the loaded PDFium module exposes Skia
RenderPageSkiaByIndex(Canvas, PageNumber, Width, Height, DrawFormOverlay)Render any page to Skia through the bounded parsed-page scene cache without changing the active page
SpotPlates / RenderSpotPlate / PageUsesOverprint / RenderOverprintPreviewEnumerate and render exact print plates or overprint preview through the capability-gated optional print-output ABI
GetSkiaRenderCapabilities / GetPrintOutputCapabilitiesProbe optional native rendering exports without making them PDFium DLL load requirements
RenderPageThumbnail(PageIndex, MaxWidth, MaxHeight, Rotation, Options, Background, ColorScheme): TBitmapRender any one-based page to a caller-owned thumbnail bitmap with optional rotation, flags, background, and low-vision colours without changing PageNumber
ThumbnailCacheMaxEntries / ThumbnailCacheMaxBytes / ThumbnailCacheStatistics / ClearThumbnailCacheBound embedded and rendered thumbnail retention by item and pixel-byte ceilings and inspect LRU telemetry
ClearPageSceneCacheRelease all unused parsed page scenes and retire in-flight entries when their render finishes
RenderPagesParallel(PageNumbers; Options; CancellationToken): TPdfParallelRenderReportRender several one-based page requests concurrently through isolated worker documents sharing one immutable memory, mapped-file, or native random-access source
RenderPageBandedToEncoder(Width, Height, BandHeight; Encoder): TPdfBandedImageReportFeed correctly clipped page bands to a caller codec without assembling a full-page bitmap
RenderPageBandedToStream(Stream, Width, Height, StreamOptions): TPdfBandedImageReportWrite forward-only PNG or TIFF output with bounded band memory and an optional output byte ceiling
RenderDiffOverlay(Other: TPdf; const Difference: TPdfPageDifference; const Options: TPdfDocumentDiffOptions): TBitmapRenders one TPdfPageDifference returned by CompareWith as a caller-owned overlay bitmap
RenderTile(Left, Top, Width, Height, PageWidth, PageHeight: Integer; ...): TBitmapRender a tile (portion) of a page to a new bitmap
RenderTile(Bitmap: TBitmap; Left, Top, Width, Height, PageWidth, PageHeight: Integer; ...)Render a tile to an existing bitmap
InvertPdfBitmap(Bitmap)Inverts RGB channels in a rendered 32-bit TBitmap in place for dark-mode or high-contrast viewing
GrayscalePdfBitmap(Bitmap)Converts a rendered 32-bit TBitmap to luminance greyscale in place
DuotonePdfBitmap(Bitmap, DarkColor, LightColor)Maps rendered bitmap luminance onto caller-selected dark and light colours in place

Coordinate Conversion

MethodDescription
DeviceToPage(X, Y, Left, Top, Width, Height: Integer; Rotation: TRotation; out PageX, PageY: Double): BooleanConvert device coordinates to page coordinates
PageToDevice(PageX, PageY: Double; Left, Top, Width, Height: Integer; Rotation: TRotation; out X, Y: Integer): BooleanConvert page coordinates to device coordinates

PAdES Digital Signatures

MethodDescription
PadesCryptoAvailableIndicates whether the signature cryptographical backend is available on the system
AnalyzeSignatureRevisionsClassifies later original-byte revisions against each signature's DocMDP and FieldMDP permissions
BuildPadesEvidenceReport(Options)Correlates native signature facts, trust, timestamps, policies, DSS/VRI coverage, and later revisions into bounded JSON or CSV evidence
PreparePadesRemoteSignature(Prepared; Options; out Request)Prepares a fingerprint-bound detached-signature placeholder with optional seed-value, certificate, FieldMDP, and DocMDP constraints for an HSM, cloud, or interrupted workflow
CompletePadesRemoteSignature(Prepared; Dest; Request; CmsDer)Validates and fills a persisted remote-signing session with the returned detached CMS value
SavePadesRemoteSigningRequest(Stream; Request)Serialises a versioned remote-signing request for later resumption
LoadPadesRemoteSigningRequest(Stream)Loads and validates a persisted remote-signing request
RenewPadesArchiveTimestamp(FileName; Options; out Report)Appends a new archival Document Time-stamp without modifying prior signed revisions
RenewPadesArchiveTimestampToStream(Stream; Options; out Report)Writes the renewed B-LTA chain to a stream after complete validation
SaveAsPadesDss(const FileName: string; const Options: TPadesDssOptions)Saves the active PDF with deduplicated PAdES DSS material and signature-specific VRI dictionaries
SaveAsPadesDssToStream(Stream: TStream; const Options: TPadesDssOptions)Saves the active PDF to a stream with deduplicated PAdES DSS material and signature-specific VRI dictionaries
SignPades(const FileName: string; const Options: TPadesSignOptions)Appends a constrained approval or certification PAdES signature using local certificate stores
SignPadesToStream(Stream: TStream; const Options: TPadesSignOptions)Writes a constrained approval or certification PAdES signature update to a stream
SignPadesWithPdfA(const FileName: string; const Options; PdfAOptions)Saves a signed PAdES PDF document complying with PDF/A archive standards
ValidatePadesInspects original-byte PAdES structures, rejects ambiguous required keys, proves exact Contents token exclusion, and reports covered revisions, cryptographic states, ISO/TS 32002 algorithm profiles, baseline level, and structural issues
ValidatePadesTrust(Options)Validates original-byte signature integrity, current system trust, optional revocation evidence, and RFC 3161 timestamp tokens
ValidatePadesTrustAsync(Options; Reply)Runs the staged trust validation on a worker thread with progress and cancellation

TPdf Component Properties

Published Properties (Design-Time)

PropertyTypeDescription
AboutstringComponent version information (stored False)
ActiveBooleanSet to True to load/activate the document, False to close it
FileNamestringPath to the PDF file to load
FormFillBooleanEnable interactive form filling with JavaScript support (default True)
PageNumberIntegerCurrent page number (1-based, 0 when no document is loaded)
PasswordstringPassword for opening encrypted PDF documents

Document Properties

PropertyTypeR/WDescription
AuthorWStringRDocument author
CompressedBooleanR/WWhen True (default), SaveAs post-processes the output to ensure all streams are FlateDecode compressed
CreationDateWStringRDocument creation date metadata
CreatorWStringRApplication that created the document
DocumentFPDF_DOCUMENTRLow-level PDFium document handle
FileIdentifier[IDType: TPdfFileIdentifierType]TBytesRPermanent or changing trailer file identifier bytes without the PDFium terminator byte
FormTypeTPdfFormTypeRForm type: ftNone, ftAcroForm, ftXFAFull, ftXFAForeground
IsTaggedBooleanRTrue if document is a tagged PDF
JavaScriptAction[Index]TPdfJavaScriptActionRDocument-level JavaScript name-tree action by zero-based index
JavaScriptActionCountIntegerRNumber of document-level JavaScript name-tree actions
JavaScriptActionsTPdfJavaScriptActionsRAll document-level JavaScript name-tree actions
KeywordsWStringRDocument keywords
LanguageWStringR/WDocument catalog language (/Lang)
StructureElementsTPdfStructureElementsRFlattened logical structure elements for the current page through the shared snapshot cache
StructureElementsForPage[PageNumber]TPdfStructureElementsRCaller-owned cached structure snapshot for any one-based page without changing the active page
StructureCacheCapacityIntegerR/WMaximum number of complete page structure snapshots retained by the LRU cache
StructureCacheCountIntegerRCurrent number of cached page structure snapshots
StructureCacheHitCount / StructureCacheMissCountInt64RCumulative structure snapshot cache telemetry for this component instance
MetaText[const Tag: string]WStringRArbitrary metadata value by tag name
MetadataTPdfDocumentMetadataROne snapshot containing the eight standard Info dictionary metadata fields
ModifiedDateWStringRLast modification date metadata
PageCountIntegerRTotal number of pages
PdfVersionTPdfVersionREffective PDF version, including a valid catalog /Version override when present
PermissionsLongWordRDocument permissions flags
GrantedPermissionsTPdfPermissionsRTyped owner-password permission set decoded from Permissions
PrintCopiesIntegerRNumber of print copies specified
PrintPageRangesTPdfPrintPageRangesROne-based print page ranges from viewer preferences
PrintPaperHandlingTPrintPaperHandlingRPaper handling preference
PrintScalingBooleanRWhether print scaling is enabled
ProducerWStringRPDF producer application
SubjectWStringRDocument subject
TitleWStringRDocument title
UserPermissionsLongWordRUser-level permissions
UserGrantedPermissionsTPdfPermissionsRTyped user-password permission set decoded from UserPermissions
ViewerPreference[const Key: string]WStringRViewer preference value by key
XFABooleanRTrue if document contains XFA forms

Page Properties

PropertyTypeR/WDescription
PageFPDF_PAGERLow-level PDFium page handle
PageBoundsTPdfRectangleRBounding rectangle of the current page
PageComplexityTPdfPageComplexityRNative object, segment, image-pixel, and transparency facts for the current page
PageBox[Box: TPdfPageBox]TPdfRectangleR/WMediaBox, CropBox, BleedBox, TrimBox, or ArtBox for the current page
PageHeightDoubleRHeight of current page in points
PageLabel[PageNumber: Integer]WStringRPage label for a given page number
PageModeTPageModeRHow the document should be displayed when opened
PageRotationTRotationR/WRotation of the current page (ro0, ro90, ro180, ro270)
PageWidthDoubleRWidth of current page in points
ThumbnailTBitmapRThumbnail bitmap of the current page
TransparentBooleanRTrue if the current page contains transparent content

Text and Character Properties

PropertyTypeDescription
Character[Index]WideCharUnicode character at index
CharacterAngle[Index]SingleCharacter rotation angle in radians
CharacterCountIntegerNumber of characters on current page
CharacterFontSize[Index]DoubleFont size of character at index; FontSize[Index] remains as a compatible alias
CharacterFontWeight[Index]IntegerFont weight of character at index
CharacterGenerated[Index]BooleanTrue if character was generated (not from original content)
CharacterIsHyphen[Index]BooleanTrue if character is a hyphen
CharacterMapError[Index]BooleanTrue if character has a mapping error
CharacterOrigin[Index]TPdfPointOrigin point of the character
CharacterRectangle[Index]TPdfRectangleBounding rectangle of the character
Charcode[Index]WideCharCharacter code at index
FindFPDF_SCHHANDLELow-level PDFium search handle
Rectangle[Index]TPdfRectangleText rectangle from last RectangleCount call
TextPageFPDF_TEXTPAGELow-level PDFium text page handle

Font Properties

PropertyTypeDescription
FontAscent[Index; FontSize]SingleAscent of the font used by the text object at index
FontBaseName[Index]WStringBase font name for the text object at index
FontData[Index]TBytesRaw font data for the text object at index
FontDescent[Index; FontSize]SingleDescent of the font used by the text object at index
FontFamilyName[Index]WStringFont family name for the text object at index
FontHandle[Index]FPDF_FONTLow-level PDFium font handle for the text object at index
FontIsEmbedded[Index]BooleanTrue if the text object's font is embedded in the PDF
FontItalicAngle[Index]IntegerItalic angle of the text object's font
FontSize[Index]DoubleBackward-compatible alias for CharacterFontSize[Index]
FontWeight[Index]IntegerFont weight of the text object's font (e.g. 400 = normal, 700 = bold)

Object Properties

PropertyTypeDescription
ObjectCountIntegerNumber of page objects
ObjectType[Index]TObjectTypeType: otUnknown, otText, otPath, otImage, otShading, otForm
ObjectBounds[Index]TPdfRectangleBounding rectangle of the object
ObjectBitmap[Index]TBitmapBitmap representation of the object
ObjectHandle[Index]PointerLow-level object handle
ObjectTransparent[Index]BooleanTrue if object is transparent

Image Properties

PropertyTypeDescription
Bitmap[Index]TBitmapBitmap of page object at index
BitmapCountIntegerNumber of bitmap objects on page
Image[Index]TPdfImageImage data (Width, Height, Data) at index
ImageInfo[Index]TPdfImageInfoLightweight dimensions, filters, DPI, bit depth, colour space, marked-content ID, and ICC facts without copying payload bytes
ImageCountIntegerNumber of images on page

Annotation Properties

PropertyTypeR/WDescription
Annotation[Index]TPdfAnnotationR/WGet or set annotation at index
AnnotationCountIntegerRNumber of annotations on current page

Form Properties

PropertyTypeR/WDescription
FormField[Index]WStringR/WForm field value by index
FormFieldAt[X, Y: Single]WStringR/WForm field value at page position
FormFieldCountIntegerRNumber of form fields on current page
FormFieldInfo[Index]TPdfFormFieldInfoRForm field information by index
FormFieldInfoAt[X, Y: Single]TPdfFormFieldInfoRForm field information at page position
FormFieldTypeAtPoint(X, Y: Double; out FieldType)BooleanRReturns the native field type at a page point without allocating an annotation handle
FocusedFormFieldValue()WStringRReturns the current logical form field value by FocusedFormFieldIndex without depending on the interactive caret
FocusedFormFieldName()WStringRReturns the current logical form field display name, preferring AlternateName and falling back to Name
FocusedFormFieldDetails()TPdfFormFieldInfoRReturns TPdfFormFieldInfo for the current logical form field
FormHandleFPDF_FORMHANDLERLow-level form fill handle
HasFormFieldAt[X, Y: Single]BooleanRTrue if a form field exists at the position

Attachment Properties

PropertyTypeR/WDescription
Attachment[Index]TBytesR/WAttachment data by index
AttachmentCountIntegerRNumber of attachments
AttachmentName[Index]WStringRAttachment filename by index
AttachmentType[Index]WStringRAttachment MIME subtype by index

Navigation Properties

PropertyTypeDescription
Bookmark[const Title: WString]TBookmarkFind a bookmark by title with destination, action, open state, descendant count, path, and colour metadata
BookmarkChildren[const Bookmark: TBookmark]TBookmarksChild bookmarks of a bookmark
BookmarkFrom[Handle: FPDF_BOOKMARK]TBookmarkBookmark data from a handle
BookmarksTBookmarksTop-level bookmarks array
Destination[Index]TDestinationNamed destination by index with view mode and raw view parameters
DestinationByName[const Name: WString]TDestinationNamed destination by name
DestinationCountIntegerNumber of named destinations
HasBookmarkChildren[const Bookmark: TBookmark]BooleanTrue if bookmark has children
LinkAnnotation[PageNumber, Index]TLinkAnnotationLink annotation on a given page
LinkAnnotationCount[PageNumber]IntegerNumber of link annotations on a page
WebLink[PageNumber, Index]TWebLinkWeb link (URL) on a given page
WebLinkCount[PageNumber]IntegerNumber of web links on a page

Digital Signature Properties

PropertyTypeDescription
Signature[Index]TPdfSignatureDigital signature information at index
SignatureCountIntegerNumber of digital signatures in the document
SignaturesTPdfSignaturesCaller-owned snapshot of every native digital signature

TPdf Events

EventTypeDescription
OnFormFieldEnterTPdfFormFieldEnterEventFired when a form field is entered. Parameters: Sender: TObject; const Text: WString
OnFormFieldExitTNotifyEventFired when focus leaves a form field
OnJavaScriptAlertTPdfJavaScriptAlertEventFired when PDF-embedded JavaScript calls app.alert to show a message box
OnJavaScriptBeepTPdfJavaScriptBeepEventFired when PDF-embedded JavaScript calls app.beep to play a system sound
OnJavaScriptMailTPdfJavaScriptMailEventFired when PDF-embedded JavaScript calls mailDoc or app.mailMsg to compose a mail message
OnJavaScriptPrintTPdfJavaScriptPrintEventFired when PDF-embedded JavaScript calls print to start a print job
OnJavaScriptResponseTPdfJavaScriptResponseEventFired when PDF-embedded JavaScript actions request user interaction
OnJavaScriptSubmitFormTPdfJavaScriptSubmitFormEventFired when PDF-embedded JavaScript submits a form to a URL
OnNamedActionTPdfNamedActionEventFired when the document raises a named action; set Handled to take the four standard navigation names over
OnPageChangeTNotifyEventFired when the current page changes
OnUnsupportedFeatureTPdfUnsupportedFeatureEventFired when the PDF contains an unsupported feature
OnXfaEmailTPdfXfaEmailEventFired when a dynamic XFA form requests an email action
OnXfaFocusChangeTPdfXfaFocusChangeEventFired when the focused field changes inside a dynamic XFA form
OnXfaGotoUrlTPdfXfaGotoUrlEventFired when navigating link URLs inside dynamic XFA forms
OnXfaHttpRequestTPdfXfaHttpRequestEventFired when a dynamic XFA form issues an HTTP request
OnXfaOpenFileTPdfXfaOpenFileEventFired when a dynamic XFA form requests opening an external file
OnXfaPageCountChangedTPdfXfaPageCountChangedEventFired when the page count of a dynamic XFA form changes at runtime
OnXfaRuntimeMissingTNotifyEventFired when an XFA document is opened but the XFA runtime is unavailable
OnXfaUriActionTPdfXfaUriActionEventFired when link URI actions trigger inside dynamic XFA contexts
OnFormCursorTPdfFormCursorEventFired when a form field requests a cursor shape; set Handled to override the native cursor
OnFormValueChangeTPdfFormValueChangeEventFired after the value of the focused form field changes
OnFormUriActionTPdfFormUriActionEventFired when a form field raises a URI action; set Handled to suppress native navigation
OnFormGoToActionTPdfFormGoToActionEventFired when a form field raises a go-to action with page, zoom mode, and positions; set Handled to navigate manually
OnFormSelectionRectTPdfFormSelectionRectEventFired when the form layer reports one selection rectangle for the focused field

Other Public Methods and Properties

APIDescription
function AnalyzeSignatureRevisions: TPadesRevisionAnalysisReportReconstructs the original revision chain and classifies later object changes for every embedded signature
function BuildPadesEvidenceReport(const Options: TPadesEvidenceReportOptions): TPadesEvidenceReportBuilds exportable multi-signature evidence from one retained original-byte capture
property About: stringReports PDFium Delphi Component component version information for TPdf
ActiveOpens or closes the selected PDF document
function AddAnnotationFileAttachment(AnnotIndex: Integer; const Name: WString; const FileData: TBytes): BooleanAttaches an embedded file to an existing annotation and writes its contents in one call
procedure AddImage(const FileName: string; X, Y, Width, Height: Double)Insert an image from a file into the current PDF page. Internally uses TPicture.LoadFromFile, so any image format registered with the VCL or LCL graphics units (BMP, PNG via Vcl.Imaging.PngImage / LCL TPortableNetworkGraphic, JPG, etc.) is accepted. Coordinates are in PDF user space (origin at the page lower-left); Width and Height are the placement size in user units, not the source image pixel size
function AddJpegImage(JpegImage: TStream; X, Y, Width, Height: Double): BooleanAdd JPEG image to the current PDF page using the specified coordinates
procedure AddPage(PageNumber: Integer; Width, Height: Double)Creates a new blank page with the given dimensions in points
AddPathCommits the accumulated MoveTo/LineTo/BezierTo path as a new page object with the requested paint
procedure AddPathToAnnotation(Index: Integer)Hands the pending CreatePath path to an ink or stamp annotation instead of to the page content
procedure AddPicture(Picture: TPicture; X, Y: Double)Add picture to the current PDF page using the specified coordinates
function AddPageObjectMark(Index: Integer; const Name: AnsiString; const Params: TPdfContentMarkParams): IntegerAdds a marked-content entry and its initial typed property list to a page object
PageObjectInfo / AnnotationObjectInfo / PageObjectMarks / PathInfo / TransformPageObject / RenderPageWithMatrixAdvanced page-content and annotation-object inspection, marks, paths, transforms, and text metrics gathered on one overview page
function SharePageObjectMark(TargetIndex, SourceIndex, SourceMarkIndex: Integer): BooleanReuses one native marked-content property mark on another page object
function AddShapedText(const Text, Font: WString; FontSize: Single; X, Y: Double; out Shaped: TPdfShapedText; Direction: TPdfTextDirection = ptdAuto; Color: TColor = clBlack; Alpha: Byte = $FF): BooleanShape bidi and complex-script runs into positioned CID Type 2 glyphs with ToUnicode and logical ActualText semantics
procedure AddStandardFontText(const Text: WString; StandardFont: TPdfStandardFont; FontSize: Single; X, Y: Double; Color: TColor; Alpha: Byte; Angle: Double = 0.0)Draws text with one of the 14 standard PDF fonts, embedding no font program
function AddCidType2Text(const FontData: TBytes; const Glyphs: TPdfCidGlyphs; FontSize: Single; X, Y: Double; const Options: TPdfCidFontOptions; out Report: TPdfCidFontReport; Color: TColor = clBlack; Alpha: Byte = $FF): BooleanEmbed positioned CID Type 2 glyphs with explicit Unicode mappings, optional TrueType subsetting, controlled fallback, and extraction verification
procedure AddText(const Text, Font: WString; FontSize: Single; X, Y: Double; Color: TColor = clBlack; Alpha: Byte = $FF; Angle: Double = 0.0)Add text to the current PDF page at the specified position
AnnotationIndexed property — returns the annotation record at the given index on the current page (subtype, rect, colour, contents, etc.)
AnnotationCountNumber of annotation objects attached to the currently active page
function AnnotationObjectCount(Index: Integer): IntegerCounts the page objects an ink or stamp annotation draws itself from
function AnnotationObjectInfo(Index, ObjectIndex: Integer): TPdfPageObjectInfoReads type, bounds, matrix, colours, and line style of one page object owned by an annotation
property Attachment[Index: Integer]: TBytesReads or replaces the raw byte payload of the document-level embedded file at the specified zero-based index. Each slot corresponds to one entry in the PDF EmbeddedFiles name tree defined in section 7.11 of the PDF 1.7 specification
AttachmentCountNumber of embedded file attachments declared in the document
property AttachmentDescription[Index: Integer]: WStringReads or writes the /Desc description of a document-level embedded file
function AttachmentHasKey(Index: Integer; const Key: WString): BooleanTests whether an embedded attachment carries a given file-specification key
AttachmentNameReturns the Unicode file name registered for the embedded file at the given zero-based index in the document EmbeddedFiles name tree
property AttachmentRelationship[Index: Integer]: WStringGives the /AFRelationship name of a document-level embedded file (ISO 32000-2 Table 43), or an empty string when it is absent
AttachmentTypeReturns the registered MIME / subtype string for the embedded file at the specified zero-based index. The value is taken from the file specification dictionary's /Subtype entry as defined in PDF section 7.11.3
AuthorReturns the value of the /Author entry from the PDF document information dictionary
BezierToAppends a cubic Bezier curve from the current point through control points (X1,Y1) and (X2,Y2) to (X3,Y3)
BitmapReturns a freshly-decoded VCL TBitmap holding the raster data of the specified image object on the current page. The bitmap is newly allocated on each call; the caller owns it and is responsible for calling Free
BitmapCountNumber of image page objects on the active page, accessible as VCL TBitmap
BookmarkLooks up a bookmark by its title string and returns the matching TBookmark record from the document outline tree defined in PDF section 12.3.3
BookmarkChildrenIndexed property — returns the immediate child bookmarks of a given parent bookmark node
BookmarkFromConverts a raw FPDF_BOOKMARK handle into a fully populated TBookmark record by reading the title, destination page, and action metadata for that outline node
BookmarksIndexed property — returns the full list of top-level outline (bookmark) entries for the document
CharacterRead-only indexed access to the UTF-16 string form of the character at the given index (typically one code unit, but two for a surrogate pair)
CharacterAngleRead-only indexed access to the rotation angle of the character in radians, taking the page CTM into account
CharacterCountNumber of extractable characters on the currently active page
CharacterFontSizeRead-only indexed access to the effective font size used to render the character (in PDF points, after CTM scaling)
CharacterFontWeightRead-only indexed access to the OS/2 usWeightClass value of the font used (100 = Thin, 400 = Regular, 700 = Bold, 900 = Black)
CharacterGeneratedReturns True when the character at the specified index was synthesised by PDFium during text extraction rather than being drawn explicitly by the page content stream. Synthetic characters are emitted for ligature expansion, soft hyphenation, and word/line boundary heuristics so search and select-all results read naturally
function CharacterIndexToTextIndex(Index: Integer): IntegerMaps a character index to its offset in the extracted text, or -1 for generated characters
function CharacterInfo(Index: Integer): TPdfCharacterInfoReads colour, font name and flags, loose bounds, matrix, and owning text object of one character
function CharacterIndexAtPos(X, Y, ToleranceX, ToleranceY: Double): IntegerGet the index of the character at or near a given position on the page. If no character lies at or near the point, the return value will be -1. If an error occurs, -3 will be returned
CharacterIsHyphenReturns True when the character at the specified index is recognised as a soft hyphen used for end-of-line word breaking. Useful when reconstructing words across line wraps without retaining the visible hyphen mark
CharacterMapErrorReturns True when the character at the specified index could not be mapped to a valid Unicode code point. The flag is reported per-character by the PDFium text extractor and lets callers identify code points that are likely incorrect because the originating font lacks a usable ToUnicode CMap or encoding vector
CharacterOriginRead-only indexed access to the origin (baseline-left anchor) of the character in PDF user-space points
CharacterRectangleRead-only indexed access to the bounding rectangle of the character in PDF user-space coordinates (origin bottom-left, in points)
CharcodeRead-only indexed access to the Unicode code point (UCS-4) of the character at the given index
function ChooseRenderFlags(Scale: Double; DestWidth, DestHeight: Integer): IntegerPicks native FPDF_RENDER_* flags from the final scale and destination size for adaptive image subsampling
procedure ClearFormFieldFocusWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
procedure ClearPageSceneCacheClears cached parsed page scenes without changing the active page
procedure ClearThumbnailCacheReleases retained embedded and rendered thumbnail bitmaps without changing cache limits or telemetry
ClosePathCloses the current sub-path by drawing a straight line back to the most recent MoveTo
CompressedControls whether streams in the output PDF are FlateDecode-compressed when SaveAs / Save is called. The post-save compression engine scans the serialised PDF, replaces any uncompressed streams with their zlib-deflated equivalents, and rebuilds the xref table. Already-compressed streams pass through unchanged
constructor Create(AOwner: TComponent); overrideCreates the TPdf component and initialises document, rendering, form, and cache state
procedure CreateAnnotation(const Annotation: TPdfAnnotation)Create a new annotation
CreateAttachmentAdds a new embedded file (attachment) at the document level
procedure CreateDocumentCloses the current document (if any) and starts a brand-new empty PDF
procedure CreatePath(X, Y: Single; FillMode: TPdfFillMode = fmNone; FillColor: TColor = clBlack; FillAlpha: Byte = $FF; Stroke: Boolean = True; StrokeColor: TColor = clBlack; StrokeAlpha: Byte = $FF; StrokeWidth: Single = 1.0; LineCap: TPdfLineCap = lcDefault; LineJoin: TPdfLineJoin = ljDefault; BlendMode: TPdfBlendMode = bmDefault)Create a new path object at an initial position
CreateXObjectFromPageWraps a page from another TPdf as a reusable Form XObject handle that can be stamped into this document any number of times
CreationDateOriginal creation timestamp from the document Info dictionary
CreatorName of the originating authoring application stored in the Info dictionary
property CrossReferenceTableValid: BooleanReports whether the loaded document has an intact cross-reference table
DeleteAnnotationRemoves the annotation at the given index on the current page
function DeleteAttachment(Index: Integer): BooleanRemoves the embedded file attachment at the given index
procedure DeletePage(PageNumber: Integer)Removes the page at PageIndex from the document
DestinationReturns the TDestination record for the named destination at the specified zero-based index. Named destinations are the indirect targets defined under the document catalog Dests / Names tree as described in PDF section 12.3.2
DestinationByNameLooks up a /Names destination by string name and returns its target page / fit-type / coordinates
DestinationCountNumber of named destinations declared in the document
function DetectPageSkew(out Report: TPdfSkewReport): BooleanMeasures the tilt of the current page to about 0.1 degrees, with a confidence value
destructor Destroy; overrideReleases document handles, form state, cached fonts, streams, and timers before TPdf is destroyed
ExportXFDFSerialises form fields and annotations to UTF-8 XFDF while preserving nested field paths and absent versus explicitly empty values
function ExportXFDFToStream(Stream: TStream): IntegerWrites every form value and annotation of the document to a stream as XFDF
function ExtractAttachmentsToStreams(const Destinations: array of TStream; const Options: TPdfAttachmentBatchOptions; out Report: TPdfAttachmentBatchReport; const CancellationToken: IPdfCancellationToken = nil): BooleanWrites decoded attachments to caller-owned streams under count and byte budgets with cancellation and per-item results
TPdfAttachmentBatchOptions / TPdfAttachmentBatchReportBounded, single-pass attachment batch model for caller-owned metadata enumeration and payload extraction
ExtractThumbnail(PageNumber: Integer): TBitmapDecodes the embedded page thumbnail without switching or reloading the active page
function DeviceToPage(X, Y, Left, Top, Width, Height: Integer; Rotation: TRotation; out PageX, PageY: Double): BooleanConvert the screen coordinate of a point to page coordinate
property DocumentNative PDFium FPDF_DOCUMENT handle for direct low-level access
function DocumentReadableContent: TPdfContentFragmentsReturns semantic readable content fragments for screen-reader, text-to-speech, and accessibility workflows
function DocumentReadingUnits: TPdfReadingUnitsBuilds sentence-level TPdfReadingUnit records for the whole document readable-content stream
FileIdentifierRead-only flag — returns the document file identifier array for the requested identifier slot
property FileNamePath of the PDF to open; assigning while Active reloads from the new path
FindSearches for Pattern starting from PageNum (or the current page if -1) and returns the global character index of the first match
function FindFirst(const Text: WString; Options: TSearchOptions = []; StartIndex: Integer = 0; DirectionUp: Boolean = True): IntegerStart a search of the specified text. StartIndex is 0-based, -1 is for end of the page. DirectionUp parameter determines direction of this search operation
function FindNextAdvances the cursor of an in-progress Find session and returns the next matching character index
function FindPreviousReverses the Find cursor by one match
function CreateDocumentSearchCreates a lazy document-wide search that returns one match and its page-space rectangles per call
function FlattenAllPages(nFlag: Integer = FLAT_NORMALDISPLAY): BooleanConvenience wrapper that flattens every page in the document. Returns True when every page completes with FLATTEN_SUCCESS or FLATTEN_NOTHINGTODO. Recommended workflow: GenerateFormAppearances → FlattenAllPages → SaveAs
function FlattenPage(nFlag: Integer = FLAT_NORMALDISPLAY): IntegerFlattens annotations and form widgets on the current page into permanent (non-editable) page content. nFlag selects the flattening profile: FLAT_NORMALDISPLAY (0) for screen display or FLAT_PRINT (1) for printed output. Returns one of FLATTEN_SUCCESS, FLATTEN_NOTHINGTODO, or FLATTEN_FAIL. Call GenerateFormAppearances first when flattening filled-in form values
FlattenPageRotationBakes the current /Rotate of every page into the content stream, page boxes, and annotation rectangles, then resets /Rotate to 0 so the visual layout is preserved without relying on the rotation display hint
function FocusedFormFieldDetails: TPdfFormFieldInfoReturns TPdfFormFieldInfo for the current logical form field
function FocusedFormFieldIndex: IntegerWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusedFormFieldName: WStringReturns the current logical form field display name, preferring AlternateName and falling back to Name
function FocusedFormFieldText: WStringWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusedFormFieldTextDirection: TPdfFormTextDirectionReads the focused widget's in-memory text direction through the PDFium FORM_GetTextDirection export
function FocusedFormOptionSelected(Index: Integer): BooleanReports whether one option of the focused list or combo box is selected
function FocusedFormFieldValue: WStringReturns the current logical form field value by FocusedFormFieldIndex without depending on the interactive caret
function FocusFormField(Index: Integer): BooleanWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusNextFormField: IntegerWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusPreviousFormField: IntegerWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
FontAscentReturns the font's ascent (distance from the baseline to the highest ascender) of a page object's font, expressed in PDF points and scaled to a caller-supplied font size
FontBaseNameReturns the PostScript base name (the /BaseFont entry from the PDF font dictionary) of the font used by a page object, including any style suffix such as -Bold or ,Italic
FontDataRead-only indexed access to the raw bytes of the embedded font program (only populated when the font is embedded)
FontDescentReturns the font's descent (the distance from the baseline down to the lowest descender) of a page object's font, expressed in PDF points and scaled to a caller-supplied font size
FontFamilyNameReturns the typographic family name (e.g. Helvetica, Times New Roman, Noto Sans CJK SC) of the font used by a page object on the current page
property FontFlags[Index: Integer]: IntegerReturns the native PDF font descriptor flags, or -1 when the object has no font
FontHandleReturns the native FPDF_FONT handle of the font used by a page object. The handle gives advanced callers direct access to PDFium font APIs not wrapped by the component
FontIsEmbeddedIndicates whether the font used by a page object is embedded inside the PDF (True) or merely referenced and resolved at view time from the operating system (False)
FontItalicAngleRead-only indexed access to the italic angle of the font in degrees (negative for typical italic; 0 for upright)
FontSizeReturns the rendered font size, in PDF points, of an individual character on the current page. FontSize is an alias for CharacterFontSize retained for backward compatibility
FontWeightReturns the CSS-style weight (boldness) of the font used by a page object on the current page. Typical values are 400 for regular and 700 for bold
FormFieldIndexed property — returns one form field on the current page
FormFieldAtRead or write the value of the form field located at the given page coordinate
FormFieldCountNumber of form field widgets on the currently active page
FormFieldInfoFull record describing a form field at a given index on the active page
FormFieldInfoAtForm field record for the widget located at the given page coordinate
FormHostCallbacksComplete, FormSelectionRects, OnForm*Lifetime-safe native form pages plus host-controlled navigation, URI, cursor, value-change, and selection callbacks
function FormFieldTypeAtPoint(X, Y: Double; out FieldType: TPdfFormFieldType): BooleanUses native point hit testing to return the field type without creating an annotation handle
function FormFieldTabOrder: TPdfIntegerArrayWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
property FormFillInterface that lets your application supply forms-related callbacks (Beep, Invalidate, OutputDocFile, etc.)
FormHandleNative PDFium form-fill environment handle attached to the document
function DetachFormObjectChild(FormIndex, ChildIndex: Integer): FPDF_PAGEOBJECTRemoves a Form XObject child and transfers ownership of its native handle
function FormObjectChildren(Index: Integer): TPdfPageObjectInfosLists the page objects nested inside a Form XObject
function GetAnnotationFontColor(AnnotIndex: Integer; out Color: TColor): BooleanReads the text colour of a form-field widget annotation
function GetAttachmentStringValue(Index: Integer; const Key: WString): WStringReads one string entry from the file-specification dictionary of an attachment
function GetImageObjectRenderedBitmap(Index: Integer): TBitmapRenders an image object with its mask, colour conversion, and matrix applied
function GetObjectRenderedStrokePattern(Index: Integer): TBitmapRasterises the tiling pattern with which a path object is stroked into a caller-owned bitmap, or returns nil when there is none
property FormTypeTells you whether the document contains AcroForm fields, XFA, or no forms at all
procedure GenerateFormAppearancesRegenerates the /AP (appearance stream) for every form widget on every page by rendering each page through FPDF_FFLDraw. This is the recommended companion call to FormField[i] := value assignments — without it, form values may be visible only when the field has focus, and any subsequent flatten operation will silently lose the values. Call after all FormField[] assignments and before SaveAs / FlattenPage / FlattenAllPages
function GetPageBoxReads the rectangle of the named page box on the current page
function GetXfaConfig: TBytesRetrieves the raw XML bytes of the XFA config packet from the PDF document
function GetXfaDatasets: TBytesRetrieves the original XFA datasets XML bytes from the PDF document
function GetXfaFormPackets: TXfaPacketListSnapshots all embedded XFA packets in a TXfaPacketList collection
function GetXfaPacketByName(const Name: string): TBytesReturns the raw content bytes of the XFA packet identified by name
function GetXfaPacketContent(Index: Integer): TBytesReturns the raw content bytes of the XFA packet at the given zero-based index
function GetXfaPacketCount: IntegerReturns the number of XFA packets embedded in the document
function GetXfaPacketName(Index: Integer): stringReturns the name of the XFA packet at the given zero-based index
function GetXfaTemplate: TBytesRetrieves the raw XML bytes of the XFA template packet from the PDF document
GrantedPermissionsReturns owner-password permissions as a typed TPdfPermissions set
HasBookmarkChildrenReturns True when the given outline node has at least one child bookmark
HasFormFieldAtHit-test that returns True when a form field widget covers the given page coordinate
HasPermission(Permission: TPdfPermission): BooleanTests one owner-password permission without manual bit arithmetic
ImageIndexed property — returns one image page object on the current page (handle + bbox + bit depth + colour space)
ImageCountNumber of raster image XObjects on the currently active page
function ImportFDF(const FileName: string): IntegerApplies form field values from an FDF document; a TStream overload is also available
ImportXFDFApplies namespace-aware XFDF fields and annotations, including explicit empty values, mixed text and CDATA, and deeply nested field names
property IncrementalSaveActive: BooleanReports whether an incremental save session is currently open
procedure InsertClipPath(Left, Bottom, Right, Top: Single)Clips everything drawn on the current page to a rectangle in PDF page units
procedure InsertObjectAtIndex(StackIndex: Integer; PageObj: Pointer)Inserts a page object at a chosen depth in the drawing order instead of on top
class function InspectAvailability(AStream: TStream): TPdfAvailabilityReports linearisation, parse availability, and first page of a PDF stream without loading it
ImportNPagesToOneBuilds a brand-new TPdf whose pages are NumX×NumY composites of the source document's pages, suitable for N-up printing layouts
ImportPagesCopies one or more pages from another open TPdf into this document
ImportPagesByIndexImports a specific subset of pages from another TPdf by zero-based index, with control over the insertion point in the current document
function ImportPreferences(Pdf: TPdf): BooleanBit-set controlling how ImportPages copies content (resources, named destinations, comments, etc.)
function InsertFormObjectFromXObject(XObject: TPdfXObject): FPDF_PAGEOBJECTInserts ONE copy of the page wrapped by a TPdfXObject into the current page of this document, returning the FPDF_PAGEOBJECT so the caller can position / scale / rotate it
IsTaggedWhether the document declares a structure tree for accessibility
JavaScriptActionIndexed property — returns one document-level JavaScript action (name + Type + Source string)
JavaScriptActionCountNumber of document-level JavaScript actions stored in the PDF
JavaScriptActionsAll document-level JavaScript actions returned as a single dynamic array
KeywordsAuthor-supplied keyword list from the document Info dictionary
LanguageNatural language identifier declared in the document catalog
LineToAppends a straight line from the current point to (X, Y)
LinkAnnotationIndexed property — returns the explicit /Annot Subtype Link at the given index, including the target action or destination
LinkAnnotationCountNumber of /Link annotation entries on a specific page
function LinkAtPoint(X, Y: Double): BooleanHit-tests a page-space coordinate against native link annotations through FPDFLink_GetLinkAtPoint
procedure LoadCustomDocument(AStream: TStream; AOwnsStream: Boolean = False)Loads a PDF from any seekable TStream using PDFium's on-demand block reader, so multi-GB documents and remote / database-backed sources do not need an up-front in-memory copy
TPdfRandomAccessStoreStores seekable content under a memory ceiling, spills to private temporary storage, and supports cursor-independent ReadAt and WriteAt calls
function TextIndexToCharacterIndex(Index: Integer): IntegerMaps an offset in the extracted text back to the character that produced it
function TextObjectGlyphOutline(Index, GlyphIndex: Integer; FontSize: Single): TPdfPathSegmentsReads the vector outline of one glyph, normalised so that one em is 1.0
function TextObjectGlyphWidth(Index, GlyphIndex: Integer; FontSize: Single): SingleMeasures the native glyph advance at a requested font size
function TextObjectFontSize(Index: Integer): SingleReads the native font size of one text page object
procedure SetTextObjectFontSize(Index: Integer; FontSize: Single)Edits text-object font size without matrix scaling
procedure LoadDocumentOpens a PDF from a file, byte array, validated memory buffer, or non-nil memory stream
LastLoadReportReturns the latest load status, native recovery route, xref validity, bounded audit counters, and typed issues
SaveAsRepairedWrites a complete copy and verifies it through an isolated strict load before returning success
property MetaTextReturns one document Info dictionary value by tag name
MetadataReturns the standard title, author, subject, keywords, creator, producer, creation date, and modification date as one record snapshot
MergeFilesMerges file-backed source lists with bounded source handles, native page import batches, explicit policies, progress, cancellation, rollback, and a detailed report
ModifiedDateLast-modification timestamp recorded in the document Info dictionary
MovePagesReorders pages of this document in place by zero-based index, keeping the page count constant
MoveToStarts a new sub-path at the given page coordinate
ObjectBitmapIndexed property — returns one image page object as a renderable VCL TBitmap (lossy decoded from JPX/CCITT/etc.)
ObjectBoundsTight axis-aligned bounding rectangle of a single page object on the current page,
ObjectCountRead-only number of page objects (text, path, image, shading, form) at the current page
ObjectHandleRaw PDFium FPDF_PAGEOBJECT pointer for the specified page object,
ObjectTransparentIndicates whether a page object participates in PDF transparency — either through
ObjectTypeReturns the category of the page object at the specified index — text, path, image, shading, or form XObject. The classification matches the PDF content-stream operator that produced the object and lets callers iterate the page-object array with a single switch dispatch
function OptimizeImages(const Options: TPdfImageOptimizeOptions; out Report: TPdfImageOptimizeReport): BooleanDownsamples page image objects whose effective placement DPI exceeds a caller target through the native bitmap and FPDFImageObj_SetBitmap paths, then leaves the document ready for SaveAs
function GetFeatureInventory: TPdfFeatureInventoryScans every page once and returns a unified record of text, path, image, form XObject, and shading object counts alongside document-level facts
function GetObjectText(Index: Integer): WStringExtracts the text drawn by one text object
function GetObjectsByType(ObjType: TObjectType): TPdfIntegerArrayLists the indexes of every page object of one kind on the current page
function GetPageActionType(EventType: Integer): IntegerReports the PDFACTION_* type of the page open or close additional action, 0 when there is none
function GetPageActionURI(EventType: Integer): WStringReads the URI a page open or close action opens
function GetTextInReadingOrder(Order: TPdfReadingOrder): WStringExtracts page text in raw content order or sorted into physical reading order
function GetTextObjectRenderedBitmap(Index: Integer; Scale: Single): TBitmapRasterises one text object on its own at the requested scale
function GetTextRenderMode(Index: Integer): IntegerReads the FPDF_TEXTRENDERMODE_* mode of a text object, which is how invisible OCR text is told from visible text
function GetWidgetAdditionalActionJavaScript(AnnotIndex, EventType: Integer): WStringReads the keystroke, format, validate, or calculate script of a form-field widget
function AuditActiveContent: TPdfActiveContentAuditReturns a snapshot of JavaScript action count, embedded files, signatures, XFA form type, and permissions without executing any script or action
property OnFormFieldEnterFired when the form-fill engine gains focus on a form field
property OnFormFieldExitFired when the form-fill engine loses focus on a form field
property OnJavaScriptResponseFired when PDF-embedded JavaScript actions request user interaction
property OnPageChangeFired when Pdf.Page is assigned to a different page index
property OnUnsupportedFeatureFired when the document uses a PDF feature that PDFium does not implement (e.g. XFA full forms, 3D annotations, multimedia)
property OnXfaGotoUrlFired when navigating link URLs inside dynamic XFA forms
property OnXfaUriActionFired when link URI actions trigger inside dynamic XFA contexts
function PadesCryptoAvailable: BooleanIndicates whether the signature cryptographical backend is available on the system
PageNative PDFium page handle for the currently active page
function PageUsesOverprint: BooleanQueries exact page overprint use when the optional print-output extension supports detection
function PathInfo(Index: Integer): TPdfPathInfoReads fill mode, stroke flag, and segment geometry of a path object
property PageBounds[Box: TPdfPageBox]: TPdfRectanglePage-level property — the rectangle for the requested page box (MediaBox/CropBox/BleedBox/TrimBox/ArtBox)
property PageBox[Box: TPdfPageBox]: TPdfRectanglePage-level property — reads or writes a specific page-box rectangle on the current page
property PageCount: IntegerPage-level property — total number of pages in the open document
property PageMetrics[PageNumber: Integer]: TPdfPageMetricsCached dimensions, rotation, label, transparency, and standard page boxes for any page
property CacheBudgetBytes: Int64Sets the unified retained-cache byte ceiling for one TPdf instance
property CacheGovernor: TPdfCacheGovernorReturns the owned shared governor for per-kind queries and application-cache coordination
property CacheGovernorStatistics: TPdfCacheGovernorStatisticsReturns current, peak, pinned, eviction, touch, and rejection telemetry
property LifecycleActionPolicy: TPdfLifecycleActionPolicySelects disabled, explicit-only, or compatible automatic document and page lifecycle action execution
property PageSceneCacheCapacity: IntegerMaximum number of parsed inactive page scenes retained for indexed rendering
property PageSceneCacheCount: IntegerCurrent number of reusable parsed page scenes
PageHeightHeight of the active page in PDF user-space units (points = 1/72 inch)
function PageObjectClipPath(Index: Integer): TPdfClipPathReads the clip path that limits where one page object may paint
function PageObjectInfo(Index: Integer): TPdfPageObjectInfoReads every editable attribute of one page object in a single record
function PageObjectMarkedContentID(Index: Integer): IntegerReads the /MCID that links a page object to the structure tree, -1 when untagged
function PageObjectMarks(Index: Integer): TPdfContentMarksReads the marked-content tags and typed property lists attached to a page object
property PageLabel: WStringPage-level property — returns the user-visible page label (such as "iv" or "A-3") rather than the zero-based index
property PageMode: TPageModePage-level property — the document /PageMode hint (Outlines, Thumbs, FullScreen, ...)
property PageNumber: IntegerRead/write 1-based current page index with bounds checking and rollback-safe native page replacement
property PageRotation: TRotationPage-level property — rotation applied to the current page when rendering (ro0 / ro90 / ro180 / ro270)
function PageToDevice(PageX, PageY: Double; Left, Top, Width, Height: Integer; Rotation: TRotation; out X, Y: Integer): BooleanConvert the page coordinate of a point to screen coordinate
property PageWidth: DoublePage-level property — width of the current page in points (1 pt = 1/72 inch)
function PageWordBoxes: TPdfWordBoxesReturns TPdfWordBox records for words on the current TPdf page with character ranges and page-space rectangles
function ExecuteDocumentLifecycleAction(Action: TPdfDocumentLifecycleAction; out ErrorMessage: string): BooleanRuns one native document lifecycle action and reports policy, environment, or callback failures without propagating exceptions
function ExecutePageLifecycleAction(PageNumber: Integer; Action: TPdfPageLifecycleAction; out ErrorMessage: string): BooleanRuns a page open or close action without changing the active page and releases temporary native page state deterministically
TPdfDocumentLifecycleAction / TPdfPageLifecycleActionDocument and page lifecycle action policy and execution model covering the disabled, explicit-only, and compatible automatic modes
property PasswordDecryption password assigned before Active := True
PdfAConformanceRead-only PDF/A conformance level of the currently open document, without needing to call ValidatePdfA explicitly
PdfEConformanceRead-only PDF/E conformance level of the currently open document, without needing to call ValidatePdfE explicitly
PdfRConformanceRead-only PDF/R conformance level of the currently open document, without needing to call ValidatePdfR explicitly
PdfUaConformanceRead-only PDF/UA conformance level of the currently open document, without needing to call ValidatePdfUa explicitly
PdfVersionRead-only flag — the PDF specification version of the open document (e.g. pv14, pv17, pv20)
PdfVTConformanceRead-only PDF/VT conformance level of the currently open document, without needing to call ValidatePdfVT explicitly
PdfXConformanceRead-only PDF/X conformance level of the currently open document, without needing to call ValidatePdfX explicitly
function PerformNamedAction(const ActionName: string): BooleanCarries out a named action; NextPage, PrevPage, FirstPage, and LastPage move PageNumber with clamping
property PermissionsReturns the owner-password permission bits as decoded from the /Encrypt dictionary
PrintCopiesEmbedded suggested number of copies the PDF's author would like the print dialog
PrintPageRangesDecoded list of one-based page ranges the PDF's author would like the print
PrintPaperHandlingDecoded value of the document's /ViewerPreferences /Duplex hint —
PrintScalingDecoded value of the document's /ViewerPreferences /PrintScaling
ProducerName of the PDF library or converter that produced the file
function ReadXmpPacket: TPdfXmpPacketReads the XMP metadata packet as a parsed object the caller owns
function InspectPdfAMetadata: TPdfAMetadataReportReturns typed equivalence evidence for all eight ISO 19005-1 Info-to-XMP mappings
function InspectPdfUaLanguageCoverage: TPdfUaLanguageCoverageReportReports bounded natural-language evidence using marked-content, structure-ancestor, and catalog language inheritance
function InspectPdfUaUnicodeCoverage: TPdfUaUnicodeCoverageReportReports object-scoped direct Unicode and ActualText extraction coverage in one native text-page pass
function ReadAttachmentMetadata(MaxAttachments: Integer = 10000): TPdfAttachmentMetadataArrayCaptures attachment metadata and decoded sizes in one bounded native enumeration without loading payload bytes
function ReadStructureElements(PageNumber; Options; out Status): TPdfStructureElementsMaterialises an iterative structure-tree snapshot under caller-selected depth, element, attribute, and time budgets
ReadableContentReturns semantic readable content fragments for screen-reader, text-to-speech, and accessibility workflows
function ReadablePageContent(PageNumber: Integer): TPdfReadableContentReturns semantic readable content fragments for screen-reader, text-to-speech, and accessibility workflows
function ReadingUnits: TPdfReadingUnitsBuilds sentence-level TPdfReadingUnit records from the current page readable-content stream for assistive listen-reading workflows
RectangleReturns one text bounding rectangle from the current page text layout
procedure RefreshAppearance(AnnotIndex: Integer)Forces PDFium to regenerate the appearance stream of one annotation
procedure RemoveAnnotationObject(Index, ObjectIndex: Integer)Deletes one page object from an ink or stamp annotation
function RectangleCount(StartIndex: Integer = 0; Count: Integer = MaxInt): IntegerCount number of rectangular areas occupied by a segment of texts. Function automatically merges small character boxes into bigger one if those characters are on the same line and use same font settings
procedure ReloadPageReloads the currently selected page from the PDFium engine, refreshing the page object cache
procedure RemoveObject(Index: Integer; DestroyObject: Boolean = True)Removes the specified page object from the current page. When DestroyObject is True, the removed object is released after removal. The page content stream is regenerated automatically
procedure RemovePageObjectMark(Index, MarkIndex: Integer)Removes one marked-content entry from a page object
procedure RemovePageObjectMarkParam(Index, MarkIndex: Integer; const Key: WString)Removes one property from an existing mark without replacing it
procedure RenderPage(DeviceContext: HDC; Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = [])Render contents of a page to a device (screen, bitmap, or printer)
function RenderPageByIndex(PageNumber, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TBitmapRenders any page without changing PageNumber and reuses its parsed PDFium scene across output sizes
procedure RenderPageSkia(Canvas: FPDF_SKIA_CANVAS; Width, Height: Integer; DrawFormOverlay: Boolean = True)Renders the current page and optional form overlay to a caller-owned SkCanvas
procedure RenderPageSkiaByIndex(Canvas: FPDF_SKIA_CANVAS; PageNumber, Width, Height: Integer; DrawFormOverlay: Boolean = True)Renders any page to Skia through the parsed-page scene cache without changing the active page
function RenderPageWithMatrix(Width, Height: Integer; const Matrix: FS_MATRIX; const Clip: TPdfRectangle; Options: TRenderOptions = []; Color: TColor = clWhite): TBitmapRenders through an arbitrary transform with a destination-space clip rectangle
function RenderSpotPlate(PlateIndex, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TBitmapRenders one exact native print plate when the optional ABI exposes the operation
function RenderOverprintPreview(Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TBitmapRenders exact native overprint preview when the optional ABI exposes the operation
function RenderPageBanded(Width, Height, BandHeight: Integer; BandCallback: TPdfBandCallback; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): IntegerRenders the page in horizontal bands so a large page never needs a full-size bitmap
function RenderPageBandedToEncoder(Width, Height, BandHeight: Integer; Encoder: TPdfBandedImageEncoder; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TPdfBandedImageReportDelivers sequential native-clipped bands to a caller-owned encoder and reports progress and peak band memory
function RenderPageBandedToStream(Stream: TStream; Width, Height: Integer; const StreamOptions: TPdfBandedImageStreamOptions; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TPdfBandedImageReportStreams PNG or TIFF rows directly from page bands without retaining full-page pixels
RenderPageProgressiveCancellable variant of RenderPage that drives PDFium's progressive rendering loop and polls an IPdfCancellationToken between iterations so long high-DPI renders can abort mid-page instead of blocking until completion
function RenderPageProgressiveWithColorScheme(Bitmap: TBitmap; Left, Top, Width, Height: Integer; const AToken: IPdfCancellationToken; const ColorScheme: TPdfColorScheme; Rotation: TRotation = ro0; Options: TRenderOptions = []; Background: TColor = clWhite): TPdfProgressiveStatusCancellable progressive render that overrides path and text colours for low-vision reading
function RenderPagesParallel(const PageNumbers: array of Integer; const Options: TPdfParallelRenderOptions; const CancellationToken: IPdfCancellationToken = nil): TPdfParallelRenderReportCaptures the current document once into bounded storage and renders requested pages through isolated worker-owned PDFium documents sharing memory, a read-only file mapping, or native random access
function RenderPageThumbnail(PageIndex, MaxWidth, MaxHeight: Integer; Rotation: TRotation; Options: TRenderOptions; Background: TColor; const ColorScheme: TPdfColorScheme): TBitmapRenders any one-based page into a revision-cached caller-owned bitmap with full render-key control
function RenderTile(Left, Top, Width, Height, PageWidth, PageHeight: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TBitmapRender rectangular area of a page to a new bitmap. Returned bitmap has to be manually released
function SpotPlates: TPdfSpotPlateInfosReturns exact native spot-plate indices and UTF-8 names when the optional ABI exposes enumeration
InspectOptionalContentEnumerates optional-content groups, configurations, usage metadata, radio groups, OCMD expressions, and effective PDFium rendering state
function IsAnnotationSubtypeSupported(Subtype: TPdfAnnotationSubtype): BooleanReports whether the loaded PDFium module can create the annotation subtype
function IsAnnotationObjectSubtypeSupported(Subtype: TPdfAnnotationSubtype): BooleanReports whether PDFium can extract and edit appearance objects for the annotation subtype
function SaveAs(Stream: TStream; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown): BooleanSaves the copy of PDF document to the specified stream. If PdfVersion is pv13 through pv17, the saved output is normalised and validated for that target version, including existing catalog /Version overrides in incremental output. The validator covers the full PDF 1.1–1.7 / ISO 32000-1 feature timeline: filters (FlateDecode, JBIG2Decode, JPXDecode), object & xref streams, transparency (SMask, ca/CA, blend modes), Tagged PDF (StructTreeRoot, MarkInfo), colour spaces (ICCBased, DeviceN), page boxes (BleedBox/TrimBox/ArtBox), output intents, optional content, AcroForm, CID/Type 0 and OpenType fonts, AES & AES-256 encryption (CFM AESV2/AESV3), all version-restricted annotation subtypes (Widget, Sound, Movie, FreeText, Line, Square, Circle, Highlight, Underline, StrikeOut, Stamp, Ink, Popup, FileAttachment, TrapNet, Squiggly, PrinterMark, Polygon, PolyLine, Caret, Screen, Watermark, 3D, Redact), version-restricted action types (SubmitForm, ResetForm, ImportData, Hide, Named, JavaScript, Trans, SetState, Rendition, GoToE, GoTo3DView), and catalog entries (Perms, Legal, Collection, Requirements, NeedsRendering). Anything that exceeds the chosen target version raises EPdfError. If the document has no existing OpenAction and the target version supports it, the saved PDF opens on the first page with Fit Height zoom. Trial builds apply the trial watermark during save
function SaveAsLinearized(Stream: TStream; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown): BooleanWrites a full-rewrite Fast Web View PDF with first-page grouping, two classic xref sections, and compressed Annex F hints when beneficial
function SaveAsLinearized(const FileName: string; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown): BooleanAtomically writes Fast Web View output to a file after completing and validating a sibling temporary file
function SaveAsObjectStream(Stream: TStream; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown; MaxObjectsPerStream: Integer = 100; MaxDecodedBytesPerStream: Integer = 65536): BooleanReorders active objects for page locality, packs eligible values into bounded ObjStm groups, and writes complete type-2 xref entries
function SaveAsObjectStream(const FileName: string; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown; MaxObjectsPerStream: Integer = 100; MaxDecodedBytesPerStream: Integer = 65536): BooleanAtomically writes PDF 1.5+ object-stream output after completing a sibling temporary file
function SaveAsNormalizedContent(Stream: TStream; out Report: TPdfContentNormalizeReport; const Options: TPdfContentNormalizeOptions; SaveOption: TSaveOption = saNoIncremental; PdfVersion: TPdfVersion = pvUnknown): BooleanNormalises each logical page content sequence and coalesces safe /Contents arrays into one stream
function SaveAsNormalizedContent(const FileName: string; out Report: TPdfContentNormalizeReport; const Options: TPdfContentNormalizeOptions; SaveOption: TSaveOption = saNoIncremental; PdfVersion: TPdfVersion = pvUnknown): BooleanAtomically replaces a file after normalised content and a complete classic xref are written
SaveAsPageLabelledWrites a full PDF copy whose catalog /PageLabels number tree is replaced with the supplied ranges, applying decimal, roman, and letter numbering styles per ISO 32000-1 §12.4.2
SaveAsOptionalContentConfiguredWrites and strictly verifies a copy with caller-selected optional-content group visibility for one configuration and usage
function SaveAsReachable(Stream: TStream; out Report: TPdfPruneReport; AllowSignedDocument: Boolean = False): BooleanSweeps unreachable objects and rewrites the document as one classic revision preserving object numbers
function SaveAsReachable(const FileName: string; out Report: TPdfPruneReport; AllowSignedDocument: Boolean = False): BooleanAtomically replaces a file after a pruned single-revision rewrite
function SaveAsDeduplicated(Stream: TStream; out Report: TPdfDedupReport; AllowSignedDocument: Boolean = False): BooleanSweeps unreachable objects and rewrites references so duplicate fonts, images, and form XObjects share one representative
function SaveAsDeduplicated(const FileName: string; out Report: TPdfDedupReport; AllowSignedDocument: Boolean = False): BooleanAtomically replaces a file after a deduplicated single-revision rewrite
function SaveAsFlateRecompressed(Stream: TStream; const Options: TPdfFlateRecompressOptions; out Report: TPdfFlateRecompressReport; AllowSignedDocument: Boolean = False): BooleanRe-encodes eligible FlateDecode streams at maximum compression when the measured saving clears a caller threshold
function SaveAsFlateRecompressed(const FileName: string; const Options: TPdfFlateRecompressOptions; out Report: TPdfFlateRecompressReport; AllowSignedDocument: Boolean = False): BooleanAtomically replaces a file after a Flate-recompressed rewrite
function SaveAsInlineImagesExternalised(Stream: TStream; const Options: TPdfInlineImageExternaliseOptions; out Report: TPdfInlineImageExternaliseReport; AllowSignedDocument: Boolean = False): BooleanExtracts BI/ID/EI inline images into reusable XObjects, expands abbreviations, and replaces inline blocks with Do operators
function SaveAsInlineImagesExternalised(const FileName: string; const Options: TPdfInlineImageExternaliseOptions; out Report: TPdfInlineImageExternaliseReport; AllowSignedDocument: Boolean = False): BooleanAtomically replaces a file after inline-image externalisation
function SaveAsReproducible(Stream: TStream; out Report: TPdfReproducibleReport; AllowSignedDocument: Boolean = False): BooleanStrips non-deterministic timestamps and /ID so two saves of the same document are byte-identical
function SaveAsReproducible(const FileName: string; out Report: TPdfReproducibleReport; AllowSignedDocument: Boolean = False): BooleanAtomically replaces a file after a reproducible rewrite
function ExportObjectGraph(Stream: TStream; const Options: TPdfObjectGraphInspectOptions; out Report: TPdfObjectGraphReport): BooleanExports active indirect values as budgeted typed JSON and reports explicit truncation
function SaveAsObjectGraphPatched(Stream: TStream; const Operations: TPdfObjectPatchOperations; out Report: TPdfObjectGraphReport; AllowSignedDocument: Boolean = False): BooleanAppends a validated dictionary-only patch revision and strict-loads it before copying to the destination
function SaveAsObjectGraphPatched(const FileName: string; const Operations: TPdfObjectPatchOperations; out Report: TPdfObjectGraphReport; AllowSignedDocument: Boolean = False): BooleanAtomically replaces a file after a successful object-graph patch transaction
function SaveAsRedacted(Stream: TStream; const Options: TPdfRedactionOptions; out Report: TPdfRedactionReport): BooleanApplies /Redact annotations to an isolated snapshot, removes intersecting top-level page objects, paints opaque replacements, and emits a clean single-revision stream
function SaveAsRedacted(const FileName: string; const Options: TPdfRedactionOptions; out Report: TPdfRedactionReport): BooleanAtomically replaces a file after the redaction and sanitisation pipeline succeeds
SaveAsSanitisedProduces a clean single-revision copy that strips active content and catalog /AF, then prunes unreachable objects so orphaned JavaScript, action, and attachment bodies disappear from the file body
BeginIncrementalSave / CommitIncrementalSave / EndIncrementalSaveDirty-object incremental save session: capture a stable baseline once, append byte-preserving revisions after the exact previous output, and release the session when done
procedure BeginIncrementalSave(AllowSignedDocument: Boolean = False)Captures the stable baseline and exact encrypted or unencrypted source prefix for a dirty-object revision session
function CommitIncrementalSave(Stream: TStream; out Info: TPdfIncrementalCommitInfo): BooleanAppends changed or new indirect objects, inherits existing encryption, and independently validates the result
function CommitIncrementalSave(const FileName: string; out Info: TPdfIncrementalCommitInfo): BooleanDurably flushes and reopens a side file before atomic replacement and restores session state after any failure
procedure EndIncrementalSaveReleases the session baseline and accumulated output
function ExportFDF(const FileName: string): IntegerWrites form field values as FDF (ISO 32000-1 12.7.11); a TStream overload is also available
function SaveAsEncrypted(const FileName: string; const Options: TPdfEncryptOptions): BooleanSaves the active PDF with AESV3-CBC or ISO/TS 32003 AESV4-GCM encryption
function SaveAsEncryptedToStream(Stream: TStream; const Options: TPdfEncryptOptions): BooleanWrites the encrypted PDF output into any seekable TStream without staging through disk
function PreparePadesRemoteSignature(Prepared: TStream; const Options: TPadesRemoteSignOptions; out Request: TPadesRemoteSigningRequest): BooleanCreates a constrained approval or certification field plus the detached-signature digest, exact ByteRange, coordinates, and prepared-PDF fingerprint needed for remote signing
class function CompletePadesRemoteSignature(Prepared, Dest: TStream; const Request: TPadesRemoteSigningRequest; const CmsDer: TBytes): BooleanRejects a modified or reused session and fills the reserved signature slot only when the detached CMS is bound to the prepared document digest
class procedure SavePadesRemoteSigningRequest(Stream: TStream; const Request: TPadesRemoteSigningRequest)Writes the fixed versioned remote-signing request format to a stream
property SecurityHandlerRevision: IntegerRevision of the standard security handler, or a negative value for an unencrypted document
function SetAnnotationFontColor(AnnotIndex: Integer; Color: TColor): BooleanOverrides the text colour of a form-field widget annotation
procedure SetAttachmentStringValue(Index: Integer; const Key, Value: WString)Writes one string entry into the file-specification dictionary of an attachment
class procedure SetDeterministicTime(FixedEpoch: Int64)Freezes the clock PDFium stamps into output so saved documents are byte-reproducible
class function LoadPadesRemoteSigningRequest(Stream: TStream): TPadesRemoteSigningRequestReads and validates the fixed versioned remote-signing request format
function RenewPadesArchiveTimestamp(const FileName: string; const Options: TPadesArchiveTimestampOptions; out Report: TPadesArchiveTimestampReport): BooleanAppends an archival Document Time-stamp to the original loaded PAdES bytes and writes an atomically staged file
function RenewPadesArchiveTimestampToStream(Stream: TStream; const Options: TPadesArchiveTimestampOptions; out Report: TPadesArchiveTimestampReport): BooleanAppends an archival Document Time-stamp and writes the validated B-LTA chain to a stream
class procedure RestoreActualTimeReturns PDFium to the system clock after a deterministic-time session
function SaveAsPadesDss(const FileName: string; const Options: TPadesDssOptions): BooleanSaves the active PDF to a file with deduplicated PAdES DSS material, signature-specific VRI dictionaries, and the source xref representation
function SaveAsPadesDssToStream(Stream: TStream; const Options: TPadesDssOptions): BooleanSaves the active PDF to a stream with deduplicated PAdES DSS material, signature-specific VRI dictionaries, and the source xref representation
SaveAsPdfASaves the current document as a PDF/A-1b conformant file by post-processing the base PDF with an incremental update that injects an XMP metadata stream, an sRGB ICC OutputIntent, and an updated document catalog
function SaveAsPdfAToStream(Stream: TStream; const Options: TPdfASaveOptions): BooleanIn-memory variant of SaveAsPdfA — writes the PDF/A-1b output into any TStream without staging through disk
SaveAsPdfESaves the current document as a PDF/E-1 conformant file by post-processing the base PDF with an incremental update that injects PDF/E-1 file-format markers (ISO 24517-1:2008)
function SaveAsPdfEToStream(Stream: TStream; const Options: TPdfESaveOptions): BooleanIn-memory variant of SaveAsPdfE — writes the PDF/E-1 output into any TStream without staging through disk
SaveAsPdfRSaves the current document as a PDF/R-1 conformant file (ISO 23504-1:2020, the raster image transport and storage subset of PDF used for scanned documents)
function SaveAsPdfRToStream(Stream: TStream; const Options: TPdfRSaveOptions): BooleanIn-memory variant of SaveAsPdfR — writes PDF/R-1 output into any TStream without staging through disk
SaveAsPdfUaSaves PDF/UA-1 by default or PDF/UA-2 with TPdfUaSaveOptions.PdfUa2, including the required XMP identification and effective PDF version
function SaveAsPdfUaToStream(Stream: TStream; const Options: TPdfUaSaveOptions): BooleanIn-memory PDF/UA-1 and PDF/UA-2 output without staging through disk
SaveAsPdfVTSaves the current document as a single-file PDF/VT-1 conformant file (ISO 16612-2:2010, the variable and transactional printing PDF subset)
function SaveAsPdfVTToStream(Stream: TStream; const Options: TPdfVTSaveOptions): BooleanIn-memory variant of SaveAsPdfVT — writes PDF/VT output into any TStream without staging through disk
SaveAsPdfXSaves the current document as a PDF/X-1a:2001, PDF/X-3:2002, or PDF/X-4 conformant file by post-processing the base PDF with an incremental update that injects PDF/X file-format markers (ISO 15930 family)
function SaveAsPdfXToStream(Stream: TStream; const Options: TPdfXSaveOptions): BooleanIn-memory variant of SaveAsPdfX — writes PDF/X output into any TStream without staging through disk
function SaveAsWithAssociateFiles(const FileName: string; const Options: TAssocFilesOptions): BooleanSaves the active PDF to a file path while injecting associated files into the catalog or pages conforming to ISO 32000-2 §7.11.4
function SaveAsWithAssociateFilesToStream(Stream: TStream; const Options: TAssocFilesOptions): BooleanWrites the PDF output with injected associated files into any seekable TStream without staging through disk
function SaveAsWithXmpPacket(Stream: TStream; Packet: TPdfXmpPacket; AllowSignedDocument: Boolean = False): BooleanSaves the document with a replacement XMP metadata packet
function NormalizePdfAMetadata(Stream: TStream; AllowSignedDocument: Boolean = False): BooleanRepairs mismatched mapped XMP properties and saves the normalised document
procedure SetFormFieldFlags(Index: Integer; const Flags: TPdfFormFieldFlags)Sets AcroForm field flags for the form field at the specified annotation index on the current page
procedure SetFormFieldFlagsAt(X, Y: Single; const Flags: TPdfFormFieldFlags)Sets the Flags bit field on the form field at the given coordinates
function SetFocusedFormFieldText(const Value: WString): BooleanSets the value of the current logical form field by FocusedFormFieldIndex without depending on the interactive caret
function SetFocusedFormFieldTextDirection(Direction: TPdfFormTextDirection): BooleanChanges the focused widget's in-memory text direction; the value is not persisted on save
function SetFocusedFormOptionSelected(Index: Integer; Selected: Boolean): BooleanSelects or clears one option of the focused list or combo box
procedure SetPageBox(Box: TPdfPageBox; const Rectangle: TPdfRectangle)Writes a new rectangle for the named page box (MediaBox / CropBox / BleedBox / TrimBox / ArtBox) on the current page
procedure SetPageObjectMarkParam(Index, MarkIndex: Integer; const Param: TPdfContentMarkParam)Upserts one typed property on an existing mark while preserving its identity and unrelated properties
SetTextAdds a text page object at the given page coordinate
procedure SetTextPositions(ObjectIndex: Integer; const Positions: TPdfSingleArray)Sets per-character positions for the specified text object. The first character position is implied as 0; Positions[0] sets the second character position, Positions[1] sets the third, and so on. Values are in points and relative to the text object origin
StampPagesFromPdfStamps a source page as a positioned, scaled, optionally rotated Form XObject overlay or underlay across one or more target pages
SignatureIndexed property — returns one digital-signature record (signer, reason, contact, byte range)
SignatureCountNumber of digital signature fields embedded in the document
property Signatures: TPdfSignaturesCopies all native signature records into one lifetime-safe snapshot
function SignPades(const FileName: string; const Options: TPadesSignOptions): BooleanAppends an approval or certification PAdES signature with optional seed-value, certificate, FieldMDP, and DocMDP constraints while preserving existing form and permission entries
function SignPadesToStream(Stream: TStream; const Options: TPadesSignOptions): BooleanWrites a constrained PAdES signature update with a registered Widget field, 64-bit ByteRange processing, and the source xref representation
function SignPadesWithPdfA(const FileName: string; const Options: TPadesSignOptions; PdfAOptions: TPdfASaveOptions): BooleanSaves a signed PAdES PDF document complying with PDF/A archive standards
StructureElementsIndexed property — returns the children of a logical structure tree element (StructTree)
SubjectReturns the value of the /Subject entry from the PDF document information dictionary
function Text(StartIndex: Integer = 0; Count: Integer = MaxInt): WStringExtract text string from the page. StartIndex and Count parameters determine characters to be extracted. StartIndex parameter is 0-based
function TextInRectangle(Left, Top, Right, Bottom: Double): WStringExtract text within a rectangular boundary on the page
TextPageNative PDFium text-page handle for the currently active page
function ThumbnailDecodedData: TBytesReads the embedded page thumbnail with its stream filters decoded
property ThumbnailCacheMaxEntries: IntegerMaximum retained embedded and rendered thumbnail entries, default 64
property ThumbnailCacheMaxBytes: Int64Maximum estimated pixel bytes retained by the thumbnail LRU, default 64 MiB
property ThumbnailCacheStatistics: TPdfThumbnailCacheStatisticsReports occupancy, stored bytes, hits, misses, and evictions
property ThumbnailRevision: Int64Monotonic content revision used by thumbnail consumers to discard stale local previews
function ThumbnailRawData: TBytesReads the embedded page thumbnail as stored, with its filters still applied
property ThumbnailReturns the raw bytes of the /Thumb entry for the current page (optional precomputed preview, typically a 64x64 raster)
TitleReturns the value of the /Title entry from the PDF document information dictionary
property TrailerEnds: TPdfCardinalArrayByte offsets where each trailer of the document ends, one per revision
procedure TransformPageAnnotations(const Matrix: FS_MATRIX)Applies a transform matrix to every annotation on the current page
procedure TransformPageContent(const Matrix: FS_MATRIX; const Clip: TPdfRectangle)Applies a transform matrix to every content object on the current page, with a clip rectangle
procedure TransformPageObject(Index: Integer; const Matrix: FS_MATRIX)Multiplies the transform matrix of one page object, moving, scaling, rotating, or skewing it
procedure TransformPageObjectClipPath(Index: Integer; const Matrix: FS_MATRIX)Transforms only the clip geometry associated with one page object
TransparentWhether the currently active page contains transparent content
procedure UpdateAnnotationObject(AnnotIndex: Integer; PageObj: Pointer)Tells an annotation that one of its page objects has been modified
procedure UpdatePageObject(Index: Integer; const Value: TPdfPageObjectInfo; Changes: TPdfPageObjectChanges)Writes back only the page-object attributes named by the change set
procedure UpdatePageCommits in-memory edits made through CreateAnnotation, AddImage, AddText, SetFormFieldFlagsAt, etc. to the underlying PDFium page
property UserPermissionsReturns the user-password permission bits (a subset of Permissions)
UserGrantedPermissionsReturns user-password permissions as a typed TPdfPermissions set
UserHasPermission(Permission: TPdfPermission): BooleanTests one user-password permission without manual bit arithmetic
function ValidatePades: TPadesValidationResultValidates unique signature-profile entries and the exact Contents exclusion span directly in the original source bytes without resaving the PDF
function ValidatePadesTrust(const Options: TPadesTrustValidationOptions): TPadesValidationResultVerifies exact original ByteRange data, signer trust, optional revocation evidence, and RFC 3161 timestamp tokens
function ValidatePadesTrustAsync(const Options: TPadesTrustValidationOptions; const Reply: TPadesTrustValidationReply): BooleanCaptures the original source and dispatches cancellable staged trust validation to a worker thread
function ValidatePdfMac(const Password: AnsiString): TPdfMacValidationResultVerifies a standalone PDF MAC using the exact original source bytes and supplied password
function ValidatePdfA: TPdfAValidationResultValidates PDF/A markers, content facts, and exact ISO 19005-1 Info-to-XMP value equivalence
function ValidatePdfE: TPdfEValidationResultInspects the currently open PDF for PDF/E-1 compliance markers and returns a structured result with the detected conformance level plus the set of specific issues found
ValidatePdfRValidates PDF/R-1 file markers, metadata, encryption profile, raster-only page content, strip geometry, colour, effective resolution, and compression parameters
function ValidatePdfUa: TPdfUaValidationResultValidates PDF/UA-1 and PDF/UA-2 identification, shared accessibility rules, and profile-specific PDF 2.0 requirements
function ValidatePdfVT: TPdfVTValidationResultInspects the currently open PDF for PDF/VT compliance markers and returns a structured result with the detected conformance level plus the set of issues found
function ValidatePdfX: TPdfXValidationResultInspects the currently open PDF for PDF/X compliance markers and returns a structured result with the detected conformance level plus the set of specific issues found
function VisitStructureElements(PageNumber; Options; Visitor; out Status): IntegerStreams structure element snapshots to a method callback without materialising a page array
ViewerPreferenceIndexed property — returns the integer value of a /ViewerPreferences key (NumCopies, PrintScaling, etc.)
WebLinkURL and bounding rectangles for an auto-detected web link on a page
WebLinkCountNumber of auto-detected web URLs identified by scanning a page's text
property XFAReturns the XFA XML packet embedded in the document (PDF/A 2.0 deprecated the format, but Acrobat-generated forms still use it)
property XfaFormPackets: TXfaPacketListSnapshots all embedded XFA packets exposed through the XFA runtime as a TXfaPacketList collection
property XfaRuntimeAvailable: BooleanIndicates whether the XFA runtime is available for the loaded document
property XfaStaticReadable: BooleanIndicates whether the static XFA packet can be read without the XFA runtime
function LinkZOrderAtPoint(X, Y: Double): IntegerReturns the frontmost link annotation z-order at page coordinates, or -1 when no link is hit
function FormFieldZOrderAtPoint(X, Y: Double): IntegerReturns the frontmost form field z-order at page coordinates, or -1 when no field is hit
function TryGetAnnotationFileAttachment(AnnotIndex: Integer; out Attachment: TPdfAnnotationAttachment; MaxBytes: Cardinal = 67108864): BooleanCopies bounded file-attachment metadata and payload from an annotation into an owned record
function GetLinkedAnnotationIndex(AnnotIndex: Integer; Relationship: TPdfAnnotationRelationship): IntegerResolves the Popup or IRT related annotation index with dangling-reference protection
function GetLinkedAnnotationChain(AnnotIndex: Integer; Relationship: TPdfAnnotationRelationship; MaxDepth: Integer = 64): TPdfIntegerArrayWalks a Popup or IRT relationship chain with cycle and depth protection
function GetAnnotationDictionaryValue(AnnotIndex: Integer; const Key: WString): TPdfDictionaryValueReads one typed value from an annotation dictionary entry
function GetAttachmentDictionaryValue(Index: Integer; const Key: WString): TPdfDictionaryValueReads one typed value from an embedded-file attachment dictionary entry
procedure SetFocusableAnnotationSubtypes(const Subtypes: array of TPdfAnnotationSubtype)Restricts which annotation subtypes may receive keyboard focus through the form handle
function GetFocusableAnnotationSubtypes: TPdfAnnotationSubtypesReturns the annotation subtypes currently eligible for keyboard focus
procedure ClearFormSelectionRectsClears the cached form selection rectangles reported through OnFormSelectionRect

TPdfView Component

TPdfView is a scrollable visual control for displaying and interacting with PDF documents. It requires a Pdf: TPdf reference

Published Properties (Design-Time)

PropertyTypeDefaultDescription
AboutstringComponent version information
ActiveBooleanFalseActivate/deactivate the viewer
CurrentCharIndexInteger0Application-selected character index retained for compatibility
DisplayModeTPdfDisplayModedmSingleContinuousPage display mode (dmSingleContinuous, dmTwoPageContinuous, dmTwoPageContinuousWithCover)
OptionsTRenderOptions[reLcd]Rendering options (LCD text, annotations, greyscale, etc.)
PageShadowSizeInteger0Optional drop-shadow size in pixels; negative values clamp to 0
PageShadowColorTColorclGrayDrop-shadow fill colour used when PageShadowSize > 0
PageBorderColorTColorclBlackOne-pixel page border colour
SmoothScrollBooleanFalseAnimates line/page scrollbar commands in timer-driven segments; thumb tracking remains immediate
LinkOptionsTPdfViewLinkOptions[loAutoGoto, loAutoOpenURI]Controls automatic goto, URI, launch, and embedded-goto behaviour after link click events
AsyncRenderingBooleanFalseShows the loading overlay when enabled; the application still owns worker dispatch
LoadingTextstringLoading...Text drawn in the AsyncRendering overlay; an empty string suppresses the overlay
LoadingColorTColorclYellowBackground colour for the AsyncRendering overlay
NightDuotoneInkTColor$0000C8FFInk colour used by the reNightDuotone low-vision render option
NightDuotonePaperTColorclBlackPaper colour used by the reNightDuotone low-vision render option
ReadingHighlightColorTColorclSkyBlueControls the broader reading highlight overlay colour
ReadingWordColorTColor$0000A5FFControls the overlay colour used for the current word-level reading cursor
ReadingWordFollowBooleanTrueControls whether TPdfView scrolls the current spoken word into view whilst tracking reading
PageNumberInteger1Current page number (1-based)
PdfTPdfnilReference to the TPdf component
RotationTRotationro0Display rotation (ro0, ro90, ro180, ro270)
ZoomDouble1.0Zoom level (1.0 = 100%)

TPdfView-Specific Public Properties

PropertyTypeDescription
ActualSizeZoom[PageNumber]DoubleZoom value to display the page at its actual size
property AllowFormEvents: BooleanGates the mouse, keyboard, and focus events the viewer forwards to the form-fill layer; page load and close are never gated
CanvasTCanvasCanvas for custom drawing on the viewer
CharacterAngle[Index]SingleCharacter rotation angle in radians
CharacterCountIntegerNumber of characters on the current viewer page
CharacterFontSize[Index]DoubleFont size of the character at index; FontSize[Index] remains as a compatible alias
CharacterFontWeight[Index]IntegerFont weight of the character at index
CharacterOrigin[Index]TPointCharacter origin in viewer device coordinates
CharacterRectangle[Index]TRectCharacter bounds in viewer device coordinates
FontAscent[Index; FontSize]SingleAscent of the font used by the text object at index
FontBaseName[Index]WStringBase font name for the text object at index
FontData[Index]TBytesRaw font data for the text object at index
FontDescent[Index; FontSize]SingleDescent of the font used by the text object at index
FontFamilyName[Index]WStringFont family name for the text object at index
FontHandle[Index]FPDF_FONTLow-level PDFium font handle for the text object at index
FontIsEmbedded[Index]BooleanTrue if the text object's font is embedded in the PDF
FontItalicAngle[Index]IntegerItalic angle of the text object's font
FontWeight[Index]IntegerFont weight of the text object's font
PageHeightZoom[PageNumber]DoubleZoom value to fit the page height in the viewer
PageWidthZoom[PageNumber]DoubleZoom value to fit the page width in the viewer
PageZoom[PageNumber]DoubleZoom value to fit the entire page in the viewer
StructureElementsTPdfStructureElementsFlattened logical structure elements for the current viewer page
WindowHandleHWNDWindow handle of the viewer control

TPdfView-Specific Methods

function AddSearchTextHighlight(const Text: WString; MatchCase: Boolean = False; MatchWholeWord: Boolean = False): IntegerHighlights every match of the text on the current page and returns the number of hits
MethodDescription
CharacterIndexAtPos(X, Y: Integer; ToleranceX, ToleranceY: Double): IntegerResolve the character near a viewer device-coordinate point; returns -1 when no character is nearby
DeviceToPage(X, Y: Integer; out PageX, PageY: Double): BooleanConvert viewer device coordinates to page coordinates
DeviceToPage(X, Y: Integer; var PageNumber: Integer; var PageX, PageY: Double): BooleanConvert viewer device coordinates to page coordinates with page detection
DeviceToPage(Rectangle: TRect): TPdfRectangleConvert a viewer device rectangle to a page rectangle
PageToDevice(PageX, PageY: Double; out X, Y: Integer): BooleanConvert page coordinates to viewer device coordinates
PageToDevice(Rectangle: TPdfRectangle): TRectConvert a page rectangle to a viewer device rectangle
LinkAnnotationAtPos(X, Y: Integer): IntegerGet link annotation index at screen position
LinkAnnotationAtPos(X, Y: Integer; out PageNumber: Integer): IntegerGet link annotation index with page number
WebLinkAtPos(X, Y: Integer): IntegerGet web link index at screen position
WebLinkAtPos(X, Y: Integer; out PageNumber: Integer): IntegerGet web link index with page number
PaintSelection(SelectionStart, SelectionEnd: Integer; Mask: TColor)Paint text selection highlight
function PasteFormTextFromClipboard: BooleanPastes clipboard text into the focused form field
FocusedFormFieldValue: WStringReturns the current logical form field value by FocusedFormFieldIndex without depending on the interactive caret
function FocusedFormOptionSelected(Index: Integer): BooleanReports whether one option of the focused list or combo box is selected
FocusedFormFieldName: WStringReturns the current logical form field display name, preferring AlternateName and falling back to Name
FocusedFormFieldDetails: TPdfFormFieldInfoReturns TPdfFormFieldInfo for the current logical form field
ReadingUnits: TPdfReadingUnitsReturn sentence-level reading units for assistive listen-reading and semantic navigation
PageWordBoxes: TPdfWordBoxesReturn word boxes with FTextPage ranges and page-space rectangles for word-by-word highlighting
SetReadingWord(const Word: TPdfWordBox)Highlights one TPdfWordBox as the current spoken word on TPdfView
ClearReadingWordClears the current word-level reading cursor overlay on TPdfView
function CopySelectedFormTextToClipboard: BooleanCopies the selected text of the focused form field to the clipboard
function CutSelectedFormTextToClipboard: BooleanCuts the selected text of the focused form field to the clipboard
TrackReadingWordAt(PageNumber, CharIndex: Integer): IntegerMaps a page character offset to the containing TPdfWordBox, highlights it, and returns the word index
RemoveObject(Index: Integer; DestroyObject: Boolean = True)Remove a page object from the current page, regenerate page content, and repaint the viewer
function SelectLineAt(Page, CharIndex: Integer): BooleanSelects the whole text line containing the given character index
function SetFocusedFormOptionSelected(Index: Integer; Selected: Boolean): BooleanSelects or clears one option of the focused list or combo box
GenerateFormAppearancesRegenerates /AP appearance streams via the associated TPdf component (see TPdf.GenerateFormAppearances)
FlattenPage(nFlag: Integer = FLAT_NORMALDISPLAY): IntegerFlattens annotations and form widgets on the current page into static content
SetFormFieldFlags(Index: Integer; const Flags: TPdfFormFieldFlags)Set AcroForm field flags by current-page annotation index
SetFormFieldFlagsAt(X, Y: Integer; const Flags: TPdfFormFieldFlags)Set AcroForm field flags at viewer control coordinates
function ReplaceFormTextAndKeepSelection(const Text: WString): BooleanReplaces focused form field text through FORM_ReplaceAndKeepSelection whilst keeping selection state
function FormFieldZOrderAt(X, Y: Integer): IntegerReturns the frontmost form field z-order at client coordinates, or -1 when none is hit
function LinkZOrderAt(X, Y: Integer): IntegerReturns the frontmost link annotation z-order at client coordinates, or -1 when none is hit

VCL Inherited and Other Properties & Methods

APIDescription
property About: stringDocuments the About member published by TPdfView
ActiveActivates or deactivates the viewer, opening the bound PDF document and rendering the selected page
property ActualSizeZoom[PageNumber: Integer]: DoubleRead-only zoom factor that displays the page at its true physical size on the host screen
procedure AddImage(const FileName: string; X, Y, Width, Height: Integer); overloadAdds an image to the page currently displayed by TPdfView, converting a viewer client-coordinate rectangle into PDF page coordinates
function AddJpegImage(JpegImage: TStream; X, Y, Width, Height: Integer): BooleanTPdfView wrapper that forwards to TPdf.AddJpegImage
procedure AddPicture(Picture: TPicture; X, Y: Integer); overloadTPdfView wrapper that forwards to TPdf.AddPicture
AlignControls how the PDF viewer is laid out inside its parent container
property AllowUserPageChange: BooleanAllows user input (mouse wheel, scroll bar drag, key bindings) to change the current page
property AllowUserTextSelection: BooleanGates user-input-driven text selection in the viewer
AnchorsSpecifies which edges of the viewer remain a fixed distance from the corresponding edges of its parent when the parent is resized
property Annotation[Index: Integer]: TPdfAnnotationTPdfView wrapper that forwards to TPdf.Annotation
property AnnotationCount: IntegerTPdfView wrapper that forwards to TPdf.AnnotationCount
property AsyncRendering: BooleanOpt-in flag that tells the view to draw a small "Loading..." overlay during long renders so applications using their own worker for off-thread rendering share a consistent visual affordance
property Bitmap[Index: Integer]: TBitmapTPdfView wrapper that forwards to TPdf.Bitmap
property BitmapCount: IntegerTPdfView wrapper that forwards to TPdf.BitmapCount
property Canvas: TCanvasDrawing canvas exposed by the control after a page is rendered
property ChangePageOnMouseScrolling: BooleanIn SinglePage mode, controls whether mouse-wheel scrolling at the page edge advances to the next page
property Character[Index: Integer]: WideCharTPdfView wrapper that forwards to TPdf.Character
property CharacterAngle[Index: Integer]: SingleTPdfView wrapper that forwards to TPdf.CharacterAngle
property CharacterCount: IntegerTPdfView wrapper that forwards to TPdf.CharacterCount
property CharacterFontSize[Index: Integer]: DoubleTPdfView wrapper that forwards to TPdf.CharacterFontSize
property CharacterFontWeight[Index: Integer]: IntegerTPdfView wrapper that forwards to TPdf.CharacterFontWeight
property CharacterGenerated[Index: Integer]: BooleanTPdfView wrapper that forwards to TPdf.CharacterGenerated
function CharacterIndexAtPos(X, Y: Integer; ToleranceX, ToleranceY: Double): IntegerReturns the character index in the current page nearest to the screen pixel (X, Y), or -1 if no character is close enough
property CharacterIsHyphen[Index: Integer]: BooleanTPdfView wrapper that forwards to TPdf.CharacterIsHyphen
property CharacterMapError[Index: Integer]: BooleanTPdfView wrapper that forwards to TPdf.CharacterMapError
property CharacterOrigin[Index: Integer]: TPointTPdfView wrapper that forwards to TPdf.CharacterOrigin
property CharacterRectangle[Index: Integer]: TRectTPdfView wrapper that forwards to TPdf.CharacterRectangle
property Charcode[Index: Integer]: WideCharTPdfView wrapper that forwards to TPdf.Charcode
procedure ClearFormFieldFocusWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
procedure ClearHighlightTPdfView wrapper that forwards to TPdfView.ClearHighlight
procedure ClearReadingHighlightControls the TPdfView reading-highlight overlay used by synchronised text-to-speech playback
procedure ClearReadingWordClears the current word-level reading cursor overlay on TPdfView
procedure ClearSelectionClears the current text selection and invalidates the view
ColorSets the background colour drawn between the page rectangles and around the document edges
ConstraintsDefines the minimum and maximum width and height the PDF viewer is allowed to reach when its parent is resized
function CopySelectionToClipboard: BooleanCopies selected Unicode text using the Windows or native LCL system clipboard
constructor Create(AOwner: TComponent); overrideCreates the TPdfView control and initialises rendering, scrolling, selection, and form interaction state
procedure CreateAnnotation(const Annotation: TPdfAnnotation)TPdfView wrapper that forwards to TPdf.CreateAnnotation
property CurrentCharIndex: IntegerRead-only zero-based character index under the current mouse cursor (or last hit-tested point)
procedure DeleteAnnotation(Index: Integer)TPdfView wrapper that forwards to TPdf.DeleteAnnotation
destructor Destroy; overrideReleases viewer resources, rendering buffers, and document subscriptions before TPdfView is destroyed
function DeviceToPage(X, Y: Integer; out PageX, PageY: Double): Boolean; overloadConverts a screen pixel (X, Y) inside the view to a PDF user-space point on the current page
property DisplayMode: TPdfDisplayModeLayout mode: single page, continuous, two-page, two-page continuous, with or without cover
property DragCursorDocuments the DragCursor member published by TPdfView
property DragKindDocuments the DragKind member published by TPdfView
property DragModeDocuments the DragMode member published by TPdfView
EnabledControls whether the PDF viewer accepts user input from the mouse and keyboard
property Find: FPDF_SCHHANDLETPdfView wrapper that forwards to TPdf.Find
function FindFirst(const Text: WString; Options: TSearchOptions= []; StartIndex: Integer= 0; DirectionUp: Boolean= True): IntegerStart a search of the specified text. StartIndex is 0-based, -1 is for end of the page. DirectionUp parameter determines the direction of this search operation
function FindNext: IntegerTPdfView wrapper that forwards to TPdf.FindNext
function FindPrevious: IntegerTPdfView wrapper that forwards to TPdf.FindPrevious
property FitMode: TPdfFitModeControls how the current page sits inside the viewer's client area; re-applied automatically on Resize and when PageNumber changes so long documents with mixed page sizes stay framed
function FlattenPage(nFlag: Integer = FLAT_NORMALDISPLAY): IntegerTPdfView wrapper that forwards to TPdf.FlattenPage
function FocusFormField(Index: Integer): BooleanWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusNextFormField: IntegerWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusPreviousFormField: IntegerWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusedFormFieldDetails: TPdfFormFieldInfoReturns TPdfFormFieldInfo for the current logical form field
function FocusedFormFieldIndex: IntegerWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusedFormFieldName: WStringReturns the current logical form field display name, preferring AlternateName and falling back to Name
function FocusedFormFieldText: WStringWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FocusedFormFieldTextDirection: TPdfFormTextDirectionReads the in-memory text direction of the widget focused in the viewer
function FocusedFormFieldValue: WStringReturns the current logical form field value by FocusedFormFieldIndex without depending on the interactive caret
property FontAscent[Index: Integer; FontSize: Single]: SingleTPdfView wrapper that forwards to TPdf.FontAscent
property FontBaseName[Index: Integer]: WStringTPdfView wrapper that forwards to TPdf.FontBaseName
property FontData[Index: Integer]: TBytesTPdfView wrapper that forwards to TPdf.FontData
property FontDescent[Index: Integer; FontSize: Single]: SingleTPdfView wrapper that forwards to TPdf.FontDescent
property FontFamilyName[Index: Integer]: WStringTPdfView wrapper that forwards to TPdf.FontFamilyName
property FontFlags[Index: Integer]: IntegerTPdfView wrapper that forwards to TPdf.FontFlags
property FontHandle[Index: Integer]: FPDF_FONTTPdfView wrapper that forwards to TPdf.FontHandle
property FontIsEmbedded[Index: Integer]: BooleanTPdfView wrapper that forwards to TPdf.FontIsEmbedded
property FontItalicAngle[Index: Integer]: IntegerTPdfView wrapper that forwards to TPdf.FontItalicAngle
property FontSize[Index: Integer]: DoubleTPdfView wrapper that forwards to TPdf.FontSize
property FontWeight[Index: Integer]: IntegerTPdfView wrapper that forwards to TPdf.FontWeight
function FormCanRedo: BooleanReports whether the focused AcroForm widget has at least one undone edit to redo
function FormCanUndo: BooleanReports whether the focused AcroForm widget has at least one edit to undo
property FormField[Index: Integer]: WStringTPdfView wrapper that forwards to TPdf.FormField
property FormFieldAt[X, Y: Integer]: WStringTPdfView wrapper that forwards to TPdf.FormFieldAt
property FormFieldCount: IntegerTPdfView wrapper that forwards to TPdf.FormFieldCount
property FormFieldInfo[Index: Integer]: TPdfFormFieldInfoTPdfView wrapper that forwards to TPdf.FormFieldInfo
property FormFieldInfoAt[X, Y: Integer]: TPdfFormFieldInfoTPdfView wrapper that forwards to TPdf.FormFieldInfoAt
function FormFieldTypeAt(X, Y: Integer; out FieldType: TPdfFormFieldType): BooleanConverts view pixels to page coordinates and performs native field-type hit testing
function FormFieldTabOrder: TPdfIntegerArrayWorks with the current-page AcroForm logical focus cursor for keyboard, speech, and accessibility workflows
function FormRedo: BooleanRedoes the most recently undone edit on the focused AcroForm widget, driving PDFium's per-widget redo history
function FormUndo: BooleanUndoes the most recent edit on the focused AcroForm widget, driving PDFium's per-widget undo history
procedure GenerateFormAppearancesTPdfView wrapper that forwards to TPdf.GenerateFormAppearances
function GetSelectedFormText: WStringReturns the text currently selected inside the focused AcroForm widget on the view's active page
property HasFormFieldAt[X, Y: Integer]: BooleanTPdfView wrapper that forwards to TPdf.HasFormFieldAt
function HasSelection: BooleanReturns whether any text is currently selected in the viewer
property HighlightColor: TColorColour of the rectangle painted over each match returned by HighlightSearchText. Defaults to clYellow; published so applications can theme the highlight
function HighlightSearchText(const Text: WString; MatchCase: Boolean= False; MatchWholeWord: Boolean= False): IntegerTPdfView wrapper that forwards to TPdfView.HighlightSearchText
property Image[Index: Integer]: TPdfImageTPdfView wrapper that forwards to TPdf.Image
property ImageCount: IntegerTPdfView wrapper that forwards to TPdf.ImageCount
property LinkAnnotation[PageNumber, Index: Integer]: TLinkAnnotationTPdfView wrapper that forwards to TPdf.LinkAnnotation
function LinkAnnotationAtPos(X, Y: Integer; out PageNumber: Integer): Integer; overloadReturns the link-annotation index at the screen pixel (X, Y), or -1
property LinkAnnotationCount[PageNumber: Integer]: IntegerTPdfView wrapper that forwards to TPdf.LinkAnnotationCount
property LinkOptions: TPdfViewLinkOptionsPublished set that controls which of PDFium's four link action types the view follows automatically when the user clicks the link
LoadingColorFill colour of the “loading” placeholder drawn whilst a page is still being rendered
LoadingTextText shown in the centre of the page whilst asynchronous rendering is still in progress
property NightDuotoneInk: TColorControls the ink colour used by the reNightDuotone low-vision render option
property NightDuotonePaper: TColorControls the paper colour used by the reNightDuotone low-vision render option
property ObjectBitmap[Index: Integer]: TBitmapTPdfView wrapper that forwards to TPdf.ObjectBitmap
property ObjectBounds[Index: Integer]: TPdfRectangleTPdfView wrapper that forwards to TPdf.ObjectBounds
property ObjectCount: IntegerTPdfView wrapper that forwards to TPdf.ObjectCount
property ObjectHandle[Index: Integer]: PointerTPdfView wrapper that forwards to TPdf.ObjectHandle
property ObjectTransparent[Index: Integer]: BooleanTPdfView wrapper that forwards to TPdf.ObjectTransparent
property ObjectType[Index: Integer]: TObjectTypeTPdfView wrapper that forwards to TPdf.ObjectType
property Options: TRenderOptionsSet of rendering hints and TPdfView post-render low-vision options
property Page: FPDF_PAGETPdfView wrapper that forwards to TPdf.Page
property PageBorderColor: TColorColour of the 1-pixel border drawn around each page rectangle
property PageBounds: TPdfRectangleTPdfView wrapper that forwards to TPdf.PageBounds
property PageColor: TColorBackground colour painted under the rendered PDF page, decoupled from the surrounding control's Color. Default is clWhite so PDF pages stay paper-white even when the host control's Color is themed dark
property PageCount: IntegerTPdfView wrapper that forwards to TPdf.PageCount
property PageHeight: DoubleTPdfView wrapper that forwards to TPdf.PageHeight
property PageHeightZoom[PageNumber: Integer]: DoubleRead-only zoom factor that fits the page height into the view
property PageLabel: WStringTPdfView wrapper that forwards to TPdf.PageLabel
property PageNumber: IntegerTPdfView wrapper that forwards to TPdf.PageNumber
property PageRotation: TRotationTPdfView wrapper that forwards to TPdf.PageRotation
PageShadowColorFill colour of the drop shadow painted beneath each page rectangle
property PageShadowSize: IntegerWidth (in pixels) of the soft shadow drawn around each page in continuous modes
function PageToDevice(PageX, PageY: Double; out X, Y: Integer): Boolean; overloadInverse of DeviceToPage: converts a PDF user-space point to a screen pixel inside the view
property PageWidth: DoubleTPdfView wrapper that forwards to TPdf.PageWidth
property PageWidthZoom[PageNumber: Integer]: DoubleRead-only zoom factor that fits the page width into the view
function PageWordBoxes: TPdfWordBoxesReturns TPdfWordBox records for words on the current TPdfView page with character ranges and page-space rectangles
property PageZoom[PageNumber: Integer]: DoubleRead-only zoom required to fit the current page into the view at the current DisplayMode
procedure PaintSelection(SelectionStart, SelectionEnd: Integer; Mask: TColor)TPdfView wrapper that forwards to TPdfView.PaintSelection
property ParentShowHintDocuments the ParentShowHint member published by TPdfView
property Pdf: TPdfReferences the TPdf component whose document is rendered by the viewer
PopupMenuAssociates a TPopupMenu with the PDF viewer so that right-clicking on a page presents a context menu
ReadableContentReturns semantic readable content fragments for screen-reader, text-to-speech, and accessibility workflows
property ReadingHighlightColor: TColorControls the TPdfView reading-highlight overlay used by synchronised text-to-speech playback
function ReadingUnits: TPdfReadingUnitsBuilds sentence-level TPdfReadingUnit records from the current TPdfView page
property ReadingWordColor: TColorControls the overlay colour used for the current word-level reading cursor
property ReadingWordFollow: BooleanControls whether TPdfView scrolls the current spoken word into view whilst tracking reading
property Rectangle[Index: Integer]: TRectTPdfView wrapper that forwards to TPdf.Rectangle
function RectangleCount(StartIndex: Integer = 0; Count: Integer = MaxInt): IntegerTPdfView wrapper that forwards to TPdf.RectangleCount
procedure ReloadPageTPdfView wrapper that forwards to TPdf.ReloadPage
procedure RemoveObject(Index: Integer; DestroyObject: Boolean = True)TPdfView wrapper that forwards to TPdf.RemoveObject
procedure RenderPage(DeviceContext: HDC; Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = [])Render contents of a page to a device (screen, bitmap, or printer)
function RenderTile(Left, Top, Width, Height, PageWidth, PageHeight: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []): TBitmapRender a rectangular area of a page to a new bitmap. The returned bitmap has to be released manually
property Rotation: TRotationVisual rotation applied to the rendered page (ro0 / ro90 / ro180 / ro270)
procedure SelectAllSelects every character on the page(s) currently displayed by the viewer
function SelectAllFormText: BooleanSelects every character inside the focused AcroForm widget on the view's active page (the equivalent of Ctrl+A inside the widget)
function SelectTextRange(Page, StartIndex, Count: Integer): BooleanReads or writes the TPdfView programmatic text-selection model without requiring user mouse input
function SelectWordBox(const Word: TPdfWordBox): BooleanSelects the text range represented by one TPdfWordBox on the current TPdfView page
function SelectWordSpan(const Words: TPdfWordBoxes; StartIndex, EndIndex: Integer): BooleanSelects a same-page span of TPdfWordBox records as one TPdfView text selection
function SelectedText: WStringReturns the currently selected text as a wide string
function SelectionCharCount: IntegerReturns the total number of characters currently selected
property SelectionColor: TColorFill colour for the user-drag text selection overlay
function SelectionRanges: TPdfUserSelectionRangesReads or writes the TPdfView programmatic text-selection model without requiring user mouse input
function SelectionRectangles: TPdfRectanglesReads or writes the TPdfView programmatic text-selection model without requiring user mouse input
procedure SetFormFieldFlags(Index: Integer; const Flags: TPdfFormFieldFlags)TPdfView wrapper that forwards to TPdf.SetFormFieldFlags
procedure SetFormFieldFlagsAt(X, Y: Integer; const Flags: TPdfFormFieldFlags)TPdfView wrapper that forwards to TPdf.SetFormFieldFlagsAt
function SetFocusedFormFieldTextDirection(Direction: TPdfFormTextDirection): BooleanChanges the focused widget's in-memory text direction and repaints the page scene
procedure SetReadingHighlight(const Rects: TPdfRectangles; PageNumber: Integer)Controls the TPdfView reading-highlight overlay used by synchronised text-to-speech playback
procedure SetReadingWord(const Word: TPdfWordBox)Highlights one TPdfWordBox as the current spoken word on TPdfView
function SetSelection(const Ranges: TPdfUserSelectionRanges): BooleanReads or writes the TPdfView programmatic text-selection model without requiring user mouse input
ShowHintEnables or disables the hint balloon shown when the mouse hovers over the PDF viewer
property SmoothScroll: BooleanEnables timer-driven segmented animation for line/page scrollbar commands. Thumb tracking remains immediate
property StructureElements: TPdfStructureElementsTPdfView wrapper that forwards to TPdf.StructureElements
TabOrderDefines the position of the PDF viewer in the parent's tab cycle
TabStopIndicates whether the user can give focus to the PDF viewer by pressing the Tab key
function Text(StartIndex: Integer = 0; Count: Integer = MaxInt): WStringTPdfView wrapper that forwards to TPdf.Text
function TextInRectangle(Left, Top, Right, Bottom: Integer): WString; overloadTPdfView wrapper that forwards to TPdf.TextInRectangle
property TextPage: FPDF_TEXTPAGETPdfView wrapper that forwards to TPdf.TextPage
property Thumbnail: TBitmapTPdfView wrapper that forwards to TPdf.Thumbnail
property TouchDocuments the Touch member published by TPdfView
function TrackReadingWordAt(PageNumber, CharIndex: Integer): IntegerMaps a page character offset to the containing TPdfWordBox, highlights it, and returns the word index
property Transparent: BooleanTPdfView wrapper that forwards to TPdf.Transparent
procedure UpdatePageTPdfView wrapper that forwards to TPdf.UpdatePage
VisibleShows or hides the PDF viewer
property WebLink[PageNumber, Index: Integer]: TWebLinkTPdfView wrapper that forwards to TPdf.WebLink
function WebLinkAtPos(X, Y: Integer; out PageNumber: Integer): Integer; overloadReturns the web-link index at the screen pixel (X, Y)
property WebLinkCount[PageNumber: Integer]: IntegerTPdfView wrapper that forwards to TPdf.WebLinkCount
property WindowHandle: HWNDThe control's native window or widget handle, interpreted for the chosen platform and widget set
property Zoom: DoubleZoom factor where 1.0 = 100% (one PDF point = 1 screen pixel at 72 DPI)

TPdfView Events

EventTypeDescription
OnPageChangeTNotifyEventFired when the displayed page changes during scrolling
OnPageNumberChangedTNotifyEventFired when the PageNumber property is modified
OnAnnotationLinkClickTPdfViewAnnotationLinkClickEventFired before an annotation-link automatic action; set Handled to suppress the default action
OnWebLinkClickTPdfViewWebLinkClickEventFired before an auto-detected web-link automatic action; set Handled to suppress ShellExecute
OnPaintTNotifyEventFired during custom painting operations
property OnAnnotationLinkClick: TPdfViewAnnotationLinkClickEventFired when the user clicks a /Annot Subtype Link that is not auto-handled by LinkOptions
property OnCanResizeDocuments the OnCanResize event published by TPdfView
OnClickOccurs when the user clicks (left mouse button) inside the viewer
property OnConstrainedResizeDocuments the OnConstrainedResize event published by TPdfView
property OnContextPopupDocuments the OnContextPopup event published by TPdfView
OnDblClickOccurs when the user double-clicks (left mouse button) inside the viewer
property OnDragDropDocuments the OnDragDrop event published by TPdfView
property OnDragOverDocuments the OnDragOver event published by TPdfView
property OnEndDockDocuments the OnEndDock event published by TPdfView
property OnEndDragDocuments the OnEndDrag event published by TPdfView
property OnEnterDocuments the OnEnter event published by TPdfView
property OnExitDocuments the OnExit event published by TPdfView
property OnFormFieldFocusChange: TPdfFormFieldFocusEventFires when TPdfView moves or clears the logical AcroForm field focus cursor
property OnGestureDocuments the OnGesture event published by TPdfView
property OnKeyDown: TKeyEventFired when a key is pressed whilst the control has focus
property OnKeyPress: TKeyPressEventFired for each character generated by the keyboard
property OnKeyUp: TKeyEventOccurs when a key is released whilst the viewer control has focus
property OnMouseActivateDocuments the OnMouseActivate event published by TPdfView
property OnMouseDown: TMouseEventFired when the user presses a mouse button over the view
property OnMouseEnterDocuments the OnMouseEnter event published by TPdfView
property OnMouseLeaveDocuments the OnMouseLeave event published by TPdfView
property OnMouseMove: TMouseMoveEventFired whenever the mouse moves over the view
property OnMouseUp: TMouseEventFired when the user releases a mouse button
property OnMouseWheel: TMouseWheelEventFired when the wheel is rotated over the view
property OnMouseWheelDownDocuments the OnMouseWheelDown event published by TPdfView
property OnMouseWheelUpDocuments the OnMouseWheelUp event published by TPdfView
property OnPageChange: TNotifyEventFired when the current page changes for any reason
property OnPageNumberChanged: TNotifyEventFired when the visible page number changes due to scrolling
property OnPaint: TNotifyEventFired after the view has finished painting the current page
property OnResize: TNotifyEventFired whenever the control's client area changes size
property OnSelectionChange: TNotifyEventFires when the materialised text selection ranges actually change
property OnStartDockDocuments the OnStartDock event published by TPdfView
property OnStartDragDocuments the OnStartDrag event published by TPdfView
property OnWebLinkClick: TPdfViewWebLinkClickEventFired when the user clicks a text-detected web URL that is not auto-handled by LinkOptions

TPdfDocumentSearch Class

Lazy forward or backward document-wide text search that retains native PDFium handles for its current page only

Method

MethodDescription
NextReturns one TPdfDocumentSearchResult with page, character range, text, and page-space rectangles

Properties

MemberTypeDescription
CurrentPageIntegerOne-based page currently being searched
DirectionTPdfDocumentSearchDirectionForward or backward traversal
FinishedBooleanWhether no further result can be returned
CancelledBooleanWhether a cancellation token ended the search
MatchCountUInt64Number of results already returned

TPdfProgressiveDocument Class

TPdfProgressiveDocument derives from TPdf and keeps PDFium's native availability session alive whilst a remote or growing random-access stream receives requested byte ranges

Methods

MethodDescription
BeginProgressiveLoadStart a logical-size random-access session with an optional initial contiguous prefix
CheckDocumentAvailabilityAsk PDFium whether document metadata is ready and return merged download hints
OpenProgressiveDocumentOpen the native linearised document or the completed non-linearised custom stream
CheckFormAvailabilityGate form-fill initialisation and return any additional byte ranges
LoadAvailablePageGate and activate one one-based page once the required bytes have arrived
CancelProgressiveLoadRelease all progressive state in dependency order

Properties and events

MemberTypeDescription
ProgressiveLoadingBooleanWhether the native availability session is alive
LogicalFileSizeUInt64Final PDF content length
AvailableByteCountUInt64Monotonic readable prefix length
LinearizationTPdfLinearizationNative linearisation verdict
FirstAvailablePageNumberIntegerOne-based first available page
OnDataAvailableTPdfDataAvailableEventSparse range-cache availability callback
RangeRequestsTPdfRangeRequestSchedulerOwned prioritised scheduler populated from native availability hints

TPdfRangeRequestScheduler Class

Thread-safe transport-neutral scheduler for coalescing, prioritising, splitting, retrying, cancelling, and accounting for sparse PDF byte-range requests

Core workflow

MethodDescription
EnqueueHintsAdd missing native byte ranges and pre-empt overlapping lower-priority transfers
TryDequeueMove the highest-priority request into the in-flight set
CompleteRequestCommit a full or partial transport response once its bytes are stored
FailRequestRetry or abandon a failed transport attempt under MaxRetryCount
MarkAvailableRecord external bytes and cancel duplicate pending or active work
CancelInvalidate the generation and notify the host about active transport requests

TPdfStreamInspector Class

Read-only bounded inventory and extraction of arbitrary physical PDF stream objects from the FPdfStreamInspect unit

Core workflow

MemberDescription
CreateInspect a byte array or seekable stream whilst preserving the caller's stream position
CopyRawDataCopy a complete encoded payload or a validated raw byte window to a destination stream
DecodeDataApply supported general filters in declaration order and report any remaining native-codec boundary
InfosReturn object offsets, lengths, filter metadata, DecodeParms, and native access classification

TPdfReadingSession Component

TPdfReadingSession is a TTS-neutral read-aloud state machine that coordinates TPdfSpokenText chunks, host speech-engine callbacks, and TPdfView word-cursor highlighting

Methods

MethodDescription
Create(AOwner: TComponent)Initialise an idle session with default estimated speech pacing
LoadSpoken(const Chunks: TPdfSpokenTexts)Stop current playback and copy the chunks to speak in order
PlayStart playback from the first loaded chunk
PlayFrom(ChunkIndex: Integer)Start playback from a zero-based chunk index
PauseMove from pssSpeaking to pssPaused and raise OnPauseRequest
ResumeResume paused playback or re-speak the current chunk when ResumeRestartsChunk is enabled
StopCancel playback, reset chunk and word cursors, and clear attached TPdfView word highlighting
FeedSpokenPosition(SpokenOffset: Integer)Map a speech-engine offset back to a PDF page character and move the TPdfView word cursor
Tick(SpeechStillBusy: Boolean; ElapsedMs: Cardinal = 0)Advance to the next chunk, finish playback, or estimate the current word whilst speech is still busy

Properties

PropertyTypeDescription
StateTPdfReadingSessionStateCurrent state: pssIdle, pssSpeaking, or pssPaused
ChunkCountIntegerNumber of loaded spoken chunks
CurrentChunkIntegerZero-based active chunk index, or -1 when no chunk is active
CurrentWordIntegerZero-based active word index inside the current chunk, or -1 when unknown
ViewTPdfViewViewer that receives word cursor updates
EstimatePacingBooleanUse elapsed time to estimate word position for speech engines with no word-position signal
EstimatedWordsPerMinuteIntegerSpeech rate used by estimated pacing, default 175
ResumeRestartsChunkBooleanMake Resume re-speak the current chunk for engines where pause cancels queued speech

Events

EventTypeDescription
OnSpeakTPdfReadingSpeakEventRaised when the host should speak a chunk
OnCancelRequestTNotifyEventRaised when the host should cancel speech
OnPauseRequestTNotifyEventRaised when the host should pause speech
OnResumeRequestTNotifyEventRaised when the host should resume speech without restarting the chunk
OnChunkChangeTPdfReadingChunkEventRaised when the active chunk changes
OnWordChangeTPdfReadingWordEventRaised when the active word changes
OnFinishedTNotifyEventRaised after the last chunk finishes

TPdfThumbnailView Component

TPdfThumbnailView is a scrollable side-panel control from the FPdfThumbnail unit. It links to a TPdf component and renders one page thumbnail per row for page navigation

Published Properties

PropertyTypeDefaultDescription
PdfTPdfnilDocument component used for thumbnail rendering
CurrentPageIndexInteger0One-based selected page index; 0 means no page is selected
ThumbnailWidthInteger120Target thumbnail width, clamped to 48..800
ThumbnailHeightInteger160Target thumbnail height, clamped to 48..800
TextColorTColorclBlackPage-number caption colour
HoverColorTColorclMoneyGreenRow highlight colour under the hovered thumbnail
SelectionColorTColorclHighlightRow highlight colour for CurrentPageIndex
BorderColorTColorclGrayThumbnail border colour

Events

EventTypeDescription
OnPageClickTPdfThumbnailClickEventFired when the user left-clicks a thumbnail row; APageIndex is one-based

Data Types and Enumerations

Core Types

TypeDefinition
WStringWide string type for Unicode text
TPdfIntegerArrayDynamic array of Integer values
TPdfSingleArrayDynamic array of Single values used for text object character positions
TPdfPrintPageRangeRecord: StartPage, EndPage: Integer
TPdfPrintPageRangesDynamic array of one-based print page ranges
TPdfPointRecord: X, Y: Double
TPdfRectangleRecord: Left, Top, Right, Bottom: Double
TPdfDocumentSearchDirectiondsdForward, dsdBackward
TPdfDocumentSearchResultStores a one-based page, native character range, matched text, and page-space rectangles
TPdfReadingUnitStores one spoken reading unit with text, semantic kind, page, highlight rectangles, source indexes, alternate-text state, and language
TPdfReadingUnitsDynamic array of TPdfReadingUnit records
TPdfWordBoxStores one word, its FTextPage character range, its page-space rectangle, and its one-based page number
TPdfWordBoxesDynamic array of TPdfWordBox records
TPdfSpokenSpanMaps one run of speech-engine text back to a source page character range
TPdfSpokenSpansDynamic array of TPdfSpokenSpan records
TPdfSpokenTextSpeech text plus span mappings back to PDF page text
TPdfSpokenTextsDynamic array of TPdfSpokenText chunks
TPdfReadingSessionStatepssIdle, pssSpeaking, pssPaused
TPdfReadingSpeakEventCallback signature for TPdfReadingSession.OnSpeak
TPdfReadingChunkEventCallback signature for TPdfReadingSession.OnChunkChange
TPdfReadingWordEventCallback signature for TPdfReadingSession.OnWordChange
TPdfStreamAdapterClass that exposes a seekable TStream as PDFium FPDF_FILEACCESS callbacks
TPdfRandomAccessStoreThread-safe seekable stream with bounded memory, secure temporary-file spill, positioned I/O, transfer, flush, and storage diagnostics
TPdfStorageBackendpsbMemory, psbTemporaryFile
TPdfXObjectLifetime wrapper for reusable Form XObject handles created by CreateXObjectFromPage
TPdfFileIdentifierTypefidPermanent, fidChanging
TPdfPageBoxpbMedia, pbCrop, pbBleed, pbTrim, pbArt
TPdfJavaScriptActionRecord: Name, Script: WString
TPdfJavaScriptActionsDynamic array of TPdfJavaScriptAction records
TPdfVersionpvUnknown, pv10, pv11, pv12, pv13, pv14, pv15, pv16, pv17; explicit SaveAs targets from pv13 through pv17 are normalised and validated against the selected PDF version
TPdfVersionInfoRecord containing separate header, catalogue, effective core and Adobe developer-extension version facts from unit FPdfCompress
TRotationro0, ro90, ro180, ro270
TSaveOptionsaNone, saIncremental, saNoIncremental, saRemoveSecurity
TObjectTypeotUnknown, otText, otPath, otImage, otShading, otForm
TPageModepmNone, pmOutline, pmThumbs, pmFullScreen, pmOptionalContentGroup, pmAttachments, pmUnknown
TPdfActionacUnsupported, acGoto, acGotoRemote, acUri, acLaunch
TPdfPrintModeprEmf, prTextOnly, prPostScript2, prPostScript3, prPostScript2PassThrough, prPostScript3PassThrough, prEmfImageMasks, prPostScript3Type42, prPostScript3Type42PassThrough
TPdfDisplayModedmSingleContinuous, dmTwoPageContinuous, dmTwoPageContinuousWithCover
TPdfViewLinkOptionloAutoGoto, loAutoOpenURI, loAutoLaunch, loAutoEmbeddedGoto
TPdfViewLinkOptionsSet of TPdfViewLinkOption values

Search and Render Options

TypeValues
TSearchOptionseCaseSensitive, seWholeWord, seConsecutive
TSearchOptionsSet of TSearchOption
TRenderOptionreAnnotations, reLcd, reNoNativeText, reGrayscale, reDebugInfo, reNoCatchException, reLimitCache, reHalftone, rePrinting, reReverseByteOrder, reNoSmoothText, reNoSmoothImage, reNoSmoothPath, reInvert, reNightDuotone
TRenderOptionsSet of TRenderOption

Drawing Types

TypeValues
TPdfFillModefmNone, fmAlternate, fmWinding
TPdfLineCaplcDefault, lcButt, lcRound, lcProjectingSquare
TPdfLineJoinljDefault, ljMiter, ljRound, ljBevel
TPdfPathSegmentTypepstUnknown, pstLineTo, pstBezierTo, pstMoveTo
TPdfOverlayPlacementopTopLeft, opTopCenter, opTopRight, opMiddleLeft, opCenter, opMiddleRight, opBottomLeft, opBottomCenter, opBottomRight, opStretch, opCustom
TPdfBlendModebmDefault, bmMultiply, bmScreen, bmOverlay, bmDarken, bmLighten, bmColorDodge, bmColorBurn, bmHardLight, bmSoftLight, bmDifference, bmExclusion, bmHue, bmSaturation, bmColor, bmLuminosity

Annotation Types

TypeDescription
TPdfAnnotationSubtypeAnnotation subtypes: Text, Link, FreeText, Line, Square, Circle, Polygon, PolyLine, Highlight, Underline, Squiggly, StrikeOut, Stamp, Caret, Ink, Popup, FileAttachment, Sound, Movie, Widget, Screen, PrinterMark, TrapNet, Watermark, 3D, RichMedia, XFAWidget, Redact
TPdfAnnotationFlagFlags: afInvisible, afHidden, afPrint, afNoZoom, afNoRotate, afNoView, afReadOnly, afLocked, afToggleNoView
TPdfAnnotationRecord containing subtype, flags, colours, text, rectangle, and all markup quadrilateral sets through AttachmentPointSets

Form Types

TypeDescription
TPdfFormTypeftUnknown, ftNone, ftAcroForm, ftXfaFull, ftXfaForeground
TPdfFormFieldTypefiUnknown, fiPushButton, fiCheckBox, fiRadioButton, fiComboBox, fiListBox, fiTextField, fiSignature
TPdfFormFieldFlagffReadOnly, ffRequired, ffNoExport, ffMultiline, ffChoiceCombo, ffChoiceEdit, ffPassword, ffChoiceMultiSelect
TPdfFormFieldInfoRecord containing FieldType, Flags, Name, Value, AlternateName, and other properties

PAdES Archive Timestamp Types

TypeDescription
TPadesArchiveTimestampOptionsTSA URL, nonce, token capacity, optional DSS refresh flag, complete replacement DSS material, and Default
TPadesArchiveTimestampReportSource and result PAdES levels, prior and result Document Time-stamp counts, source and result byte lengths, DSS update state, generation time, policy OID, and returned nonce

PAdES Signature Algorithm Types

TypeDescription
TPadesSignatureAlgorithmFamilypsafUnknown, psafRsa, psafEcdsa, psafEd25519, or psafEd448
TPadesSignatureAlgorithmInfoCMS digest and signature OIDs, X.509 public-key and named-curve OIDs, parameter presence and SHAKE output length, family, and independent policy status

PAdES Revision Analysis Types

TypeDescription
TPadesRevisionAnalysisStatusprasNotChecked, prasNoLaterChanges, prasAllowed, prasDisallowed, prasSuspicious, or prasIndeterminate
TPadesRevisionChangeKindClassifies xref, signature, validation material, form field, annotation, page content, document structure, metadata, active content, deleted, compressed, or unknown changes
TPadesRevisionObjectChangeReports the revision, object and generation numbers, source offset or object-stream number and index, classification, decision, authority, and redefinition state
TPadesSignatureRevisionAnalysisReports one signature's covered revision, DocMDP and FieldMDP policy, later revisions, risks, status, and object changes
TPadesRevisionAnalysisReportAggregates source status, revision and signature counts, risks, status, per-signature analyses, and parser errors

PAdES Evidence Report Types

TypeDescription
TPadesEvidenceReportOptionsTrust settings plus source-byte, signature, revision-change, validation-material, stored-byte, and VRI budgets
TPadesValidationMaterialEvidenceIdentifies one stored DSS certificate, OCSP response, or CRL by object number, stored length, kind, and SHA-256
TPadesVriEvidenceMaps one VRI key and dictionary object to its certificate, OCSP, and CRL object references
TPadesSignatureEvidenceCorrelates PDFium facts, ByteRange, content and VRI hashes, CMS policy, validation status, trust-path hashes, DSS/VRI coverage, and revision decisions for one signature
TPadesEvidenceReportAggregates validation, revision, DSS, PDFium, truncation, and per-signature evidence with ToJson and ToCsv exports

Image Codec, Document Difference, and Imposition Types

Type or functionDescription
TPdfImageCodecpicKeepOriginal, picJpeg, picJpx, picCcittGroup4, or picFlate
TPdfImageCodecsSet of permitted TPdfImageCodec values
TPdfImageCodecCandidateImage facts and measured encoded byte lengths used for codec selection
TPdfImageCodecDecisionSelected codec, original and selected byte counts, saving, and replacement decision
SelectPdfImageCodecSelects the smallest eligible measured encoding without replacing the original below the requested saving
TPdfDocumentDiffOptionsRendered dimensions, colour tolerance, text and geometry gates, page budget, and Default
TPdfPageDifferenceOne page's text, geometry, rotation, pixel-count, and changed-bounds evidence
TPdfPageDifferencesDynamic array of TPdfPageDifference records
TPdfDocumentDiffReportAggregate equivalence result, page counts, changed pages, pixels, truncation, and detailed differences
TPdfImpositionModepimNUp or pimBooklet
TPdfImpositionOptionsOutput size, grid, binding, gutter, bleed, creep, reverse-sheet option, and Default
TPdfImpositionSlotSheet, side, slot, source page, creep, and usable bounds for one imposed placement
TPdfImpositionSlotsDynamic array of TPdfImpositionSlot records
TPdfImpositionPlanSource and padded counts, sheet and side counts, output grid and geometry, and ordered slots
TPdfImpositionExecutionReportNative import, imported page, unique source, blank slot, XObject template, form object, content generation, output page, and native N-up execution facts
TPdfContentMarkSnapshotsDynamic array of caller-owned immutable content-mark snapshots
TPdfPageObjectSnapshotsDynamic array of caller-owned immutable page-object snapshots
BuildPdfImpositionPlanBuilds and validates an N-up or booklet slot plan without opening or changing a document

Record Types

TypeFields
TBookmarkHandle, Title, PageNumber, Destination, DescendantCount, IsOpen, Action, ActionPageNumber, ActionDestination, ActionPath, HasColor, Color, Style
TDestinationHandle, Name, PageNumber, ViewMode, ViewParameterCount, ViewParameters, HasX, X, HasY, Y, HasZoom, Zoom
TPdfDocumentMetadataTitle, Author, Subject, Keywords, Creator, Producer, CreationDate, ModifiedDate
TPdfBatchMergeSourceFileName, PageRange, Password, and the FromFile constructor
TPdfBatchMergeOptionsErrorPolicy, FormPolicy, OutlinePolicy, ResourcePolicy, PageChunkSize, InsertAt, CreateDestination, CopyViewerPreferences, RollbackOnCancelOrFailure, CancellationToken, OnProgress, and Default
TPdfBatchMergeReportTerminal status, source and page counters, native import metrics, peak open sources, policy detections, destination and viewer-preference state, error text, and issues
TLinkAnnotationHandle, Rectangle, PageNumber, Action, ActionPageNumber, ActionPath, Points
TWebLinkUrl: WString, Rectangles: TPdfRectangles
TPdfImageWidth: Integer, Height: Integer, Data: TBytes
TPdfSignatureContent: TBytes, Encoding: WString, Reason: WString, Time: WString, Permission: Integer
TPdfFormSelectionRectPageNumber: Integer, Bounds: TPdfRectangle
TPdfStructureElementHierarchy, text alternatives, MCIDs, table/list attributes, namespace and namespace role mapping, references, associated files, annotation descriptions, widget ownership, labels, and appearance facts
TPdfStructureReadOptionsMaximum depth, elements, attribute values, deadline, and attribute inclusion controls for iterative structure traversal
TPdfStructureReadStatusVisited counters plus completed, depth, element, attribute, deadline, and visitor-stop outcomes
TPdfUaNamespaceKindpunkMissing, punkPdf17, punkPdf20, punkMathMl, punkAria, punkDpub, punkCustom

Navigation and permission types

TypeValues
TPdfDestinationViewModedvmUnknown, dvmXYZ, dvmFit, dvmFitHorizontal, dvmFitVertical, dvmFitRectangle, dvmFitBoundingBox, dvmFitBoundingBoxHorizontal, dvmFitBoundingBoxVertical
TPdfPermissionpermPrint, permModify, permCopy, permAnnotate, permFillForms, permAccessibility, permAssemble, permPrintHighQuality
TPdfPermissionsSet of TPdfPermission values

Document Loading, Saving and Stream Types

TypeValues
TPdfLoadModeplmCompatible, plmStrict, plmRecovery — selects how much repair a load may perform
TPdfLoadStatusplsNotAttempted, plsLoaded, plsLoadedWithRecovery, plsRejected, plsFailed
TPdfLoadRecoveryRouteplrrNone, plrrNativeCrossReference, plrrNativeCrossReferenceRebuild
TPdfContentNormalizeStatuspcnsNotStarted, pcnsCompleted, and the bounded-failure reasons pcnsInputLimitExceeded, pcnsOutputLimitExceeded, pcnsTokenLimitExceeded, pcnsMalformedToken, pcnsUnresolvedInlineImage, pcnsUnbalancedState, pcnsUnsupportedFilter, pcnsEncryptedDocument, pcnsSignedDocument, pcnsDocumentRewriteFailed
TPdfObjectPatchOperationKindpopSet, popRemove — operation kind used by SaveAsObjectGraphPatched
TPdfObjectPatchValueRecord: Kind, BooleanValue, IntegerValue, RealValue, TextValue, ReferenceObjectNumber, ReferenceGeneration
TPdfOptionalContentStateocsUnspecified, ocsOn, ocsOff
TPdfStreamDecodeLevelpsdlRaw, psdlGeneral, psdlFull
TPdfStreamNativeAccesspsnaNone, psnaImageObject, psnaEmbeddedFile
TPdfStreamReadStatuspsrsCompleted, psrsPartiallyDecoded, plus bounded-read refusals such as psrsInvalidIndex, psrsSourceLimitExceeded, psrsExpansionRatioExceeded, psrsUnsupportedFilter, psrsEncrypted, psrsMalformed
TPdfAFRelationshipafSource, afData, afAlternative, afSupplement, afUnspecified, afEncryptedPayload, afFormData, afTemplate — associated-file relationship of ISO 32000-2 7.11.4
TDpmTargetdptRoot, dptLeaf — where PDF/VT document part metadata is attached
TPdfXmpNamespaceRecord: Prefix, Uri — one namespace of a TPdfXmpPacket
TPdfAMetadataValuesRecord containing PDFium-decoded mapped Info values and an explicit key-presence set
TPdfAMetadataComparisonRecord containing one mapped field, its equivalence state, and both compared values
TPdfAMetadataReportRecord containing XMP availability, parse status, per-field comparisons, mismatch fields, and IsEquivalent
TPdfLoadIssueRecord: Code, Severity, Offset, ObjectNumber, RevisionIndex, MessageText — one finding of the bounded cross-reference audit
TPdfLoadIssueCodeAudit finding codes, from plicHeaderMissing and plicStartXrefInvalid through plicXrefEntryConflict, plicNativeCrossReferenceRebuild, plicStrictModeRejected, and plicRepairVerificationFailure
TPdfLoadIssueSeverityplisInformation, plisWarning, plisError
TPdfObjectPatchValueKindpovNull, povBoolean, povInteger, povReal, povName, povTextString, povReference
TPdfStreamFilterInfoRecord: filter Name and Kind plus the decode parameters Predictor, Colors, BitsPerComponent, Columns, EarlyChange
TPdfOptionalContentGroupRecord describing one OCG: object number and generation, Name, Intents, view / print / export states, page-element subtype, language, user type and names, optional zoom range, EffectiveVisible, Locked, and radio-group index
TPdfOptionalContentConfigurationRecord describing one OCG configuration: name, creator, BaseState, intents, on / off / locked / order group lists, radio groups, and whether automatic state is present
TPdfOptionalContentMembershipRecord describing one OCMD: referenced groups, Policy, visibility expression, and EffectiveVisible
TPdfOptionalContentMembershipPolicyocmpAnyOn, ocmpAllOn, ocmpAnyOff, ocmpAllOff, ocmpUnknown
TPdfOptionalContentBaseStateocbsOn, ocbsOff, ocbsUnchanged
TPdfOptionalContentRadioGroupRecord: the group object numbers that behave as one radio button set
TPdfOptionalContentStateChangeRecord: GroupObjectNumber and the Visible state to write
TPdfXmpValueRecord: Kind (pxvkText, pxvkUri, pxvkResource), Text, Language, Qualifiers, RawXml
EPdfXmpErrorException raised for malformed XMP input
TXfdfNameValuePairRecord: Name, Value — one generic entry of an XFDF document
TPdfDpmEntryRecord: Name, Value, IsNestedDict — one PDF/VT document part metadata entry
TPdfVT2sValidationIssueFindings of PDF/VT-2s MIME stream validation, such as vtmviNotMultipart, vtmviMissingStreamVersion, vtmviMissingBoundary, vtmviNoInlinePdf, and vtmviInlinePdfNotPdfVT

Text, Font and OCR Types

TypeValues
TPdfCidFontEmbeddingModepcfemFull, pcfemSubsetPreferred, pcfemSubsetRequired
TPdfSystemFontRequestRecord: FaceName, Weight, Italic, Charset, PitchFamily — font request handed to a system font provider
TPdfSystemFontDataRecord: FaceName, FontData, Charset, TTCIndex — font bytes returned by a system font provider
TPdfShapedGlyphRecord: GlyphID, Advance, OffsetX, OffsetY, ClusterStart, ClusterLength
TPdfTextShaperAbstract class with a single Shape method; implement it to plug an external shaping engine into AddShapedText
TPdfTableDetectionModeptdmRuled, ptdmWhitespace
TPdfTableContinuationptcNone, ptcStart, ptcMiddle, ptcEnd — position of a page grid within a table continuation chain
TPdfOcrImageRecord: PageNumber, Width, Height, Stride, Dpi, PixelFormat, Pixels — page raster handed to an OCR provider
TPdfOcrQuadRecord: TopLeft, TopRight, BottomRight, BottomLeft, with FromRectangle
TPdfOcrPointRecord: X, Y in page units
TPdfOcrPixelFormatpopfBgra32 — pixel layout handed to an OCR provider
TPdfOcrPageStatuspopsPending, popsCompleted, popsSkippedExistingText, popsCancelled, popsFailed
TPdfOcrPageReportRecord: page number, Status, image size, and detected / inserted / rejected word counts with an error message
TPdfShapedRunRecord: source text range, visual position and width, BidiLevel, IsRightToLeft, and the shaped Glyphs
TPdfReflowNodeRecord: node Kind, parent index, depth, page, text, bounds, language, reading-order source, heading level, table row / column geometry, header flag, and confidence
TPdfReflowNodeKindprnkPage, prnkParagraph, prnkHeading, prnkList, prnkListItem, prnkFigure, prnkCaption, prnkTable, prnkTableRow, prnkTableCell, prnkOther
TPdfSearchHighlightRangeRecord: StartIndex, Count — one highlighted character range
TPdfUserSelectionRangeRecord: one-based Page, StartIndex into that page text, and Count
TPdfSelectionPointRecord: one-based Page and CharIndex; a non-positive page or -1 index means no selection
EPdfTextShapingErrorException raised when text shaping fails

Layout Builder Types

TypeValues
TPdfLayoutItemOne item of a layout flow; Kind selects text, spacer, rule, image, page XObject, page break, cached node, link, or semantic node
TPdfLayoutItemKindpliText, pliSpacer, pliRule, pliImage, pliPageXObject, pliPageBreak, pliCachedNode, pliLink, pliSemanticNode
TPdfLayoutTextStyleRecord: font name and size, colour and alpha, line height, alignment, legacy keep-together, long-word breaking, and space before / after, with a Default constructor
TPdfLayoutConstraintsRecord: keep-together, keep-with-next, page-break-before / after, widow and orphan line limits, with a preserving Default constructor
TPdfLayoutPageSettingsRecord: page size and four margins plus header and footer heights, with A4 and Letter constructors
TPdfLayoutSemanticRoleplsrArtifact, plsrParagraph, plsrHeading1 through plsrHeading6, plsrList, plsrListItem, plsrListLabel, plsrListBody, plsrTable, plsrTableRow, plsrTableHeader, plsrTableData, plsrFigure, plsrCaption, plsrLink, plsrSection, plsrDivision
TPdfLayoutTableScopepltsNone, pltsRow, pltsColumn, pltsBoth
TPdfLayoutListNumberingplnNone, plnDisc, plnCircle, plnSquare, plnDecimal, plnUpperRoman, plnLowerRoman, plnUpperAlpha, plnLowerAlpha
TPdfLayoutAlignmentplaLeft, plaCenter, plaRight
TPdfLayoutCommandKindplcText, plcRule, plcImage, plcPageXObject, plcCachedNode, plcLink
TPdfLayoutCommandRecord: one resolved drawing command with kind, page number, bounds, text and font, colour and alpha, alignment, thickness, file name or URI, source, semantic element index, marked-content id, and annotation index
TPdfLayoutRectRecord: Left, Top, Width, Height in layout units
TPdfLayoutSemanticElementRecord: the Semantics of one structure element and its ParentElementIndex
EPdfLayoutErrorException raised for invalid layout input

PAdES Types

TypeValues
TPadesSeedValueConstraintpsvcFilter, psvcSubFilter, psvcVersion, psvcReasons, psvcLegalAttestation, psvcAddRevocationInfo, psvcDigestMethod
TPadesSeedValueConstraintsSet of required signature seed-value entries represented by TPadesSeedValueConstraint
TPadesSignatureFieldOptionsRecord: field name, required seed values, allowed reasons and legal attestations, acceptable certificates, certificate requirement, FieldMDP lock action and field names, and DocMDP certification permission
TPadesLevelplUnknown, plNone, plB_B, plB_T, plB_LT, plB_LTA — EN 319 142-1 conformance levels
TPadesCryptoStatuspcsNotChecked, pcsValid, pcsInvalid, pcsUnsupported, pcsIndeterminate
TPadesValidationSourceStatuspvssUnavailable, pvssOriginalBytes, pvssIncomplete
TPadesTrustNetworkPolicyptnpOffline, ptnpOnline
TPadesTrustValidationAsyncStatusptvasSuccess, ptvasCancelled, ptvasFailure — outcome reported by ValidatePadesTrustAsync
TPadesRevisionDecisionprdAllowed, prdDisallowed, prdSuspicious, prdIndeterminate
TPadesFieldMdpActionpfmaNone, pfmaAll, pfmaInclude, pfmaExclude, pfmaUnknown
TWinCmsVerifyStatuswcvsUnavailable, wcvsValid, wcvsInvalid, wcvsUnsupported, wcvsIndeterminate — result of Windows CMS verification
TPdfMacValidationStatuspmvsValid, pmvsNotPresent, pmvsInvalid, pmvsUnsupported
TPadesSignatureValidationRecord: per-signature status for byte range, CMS signature, algorithm policy, signing certificate, chain trust, revocation, and the timestamp equivalents, plus native error codes and algorithm information
TPadesValidationIssueFindings raised against EN 319 142-1 and ISO 32000-1 12.8, including duplicate required keys, invalid Filter or Type values, exact Contents exclusion, certificate, revocation, and timestamp requirements
TPadesTrustValidationStageptvsStarting, ptvsReadingSource, ptvsParsingSignatures, ptvsCryptographicIntegrity, ptvsCertificateChain, ptvsAiaRetrieval, ptvsOcspRetrieval, ptvsCrlRetrieval, ptvsTimestampToken, ptvsCompleted
TPadesTrustValidationProgressRecord: current Stage, signature index and count, and completion percentage
TPadesRevisionRiskRisks reported per revision, such as prrMalformedRevisionChain, prrSignatureObjectRedefined, prrPageContentChanged, prrActiveContentAdded, and prrResourceLimitExceeded
TPadesDssMaterialRecord: DerBytes of one certificate, CRL, or OCSP response added to the document security store
TWinCmsVerifyOptionsRecord: OnlineRetrieval, CheckRevocation, UrlRetrievalTimeoutMs, and an OnCheckpoint callback, with a Default constructor
TWinCmsVerifyStagewcvstCryptographicSignature, wcvstChainBuild, wcvstOnlineRetrieval, wcvstRevocationCheck

Batch, Validation and Form Types

TypeValues
TPdfBatchMergeErrorPolicybmepStop, bmepSkip
TPdfBatchMergeFormPolicybmfpPreserveNative, bmfpFlatten, bmfpReject
TPdfBatchMergeOutlinePolicybmopDiscard, bmopReject
TPdfBatchMergeResourcePolicybmrpSourceScoped, bmrpChunked
TPdfBatchMergeStatusbmrsCompleted, bmrsCompletedWithErrors, bmrsCancelled, bmrsFailed
TPdfPagePlanOperationppoDelete, ppoMove, ppoInsert
TPdfPagePlanDecisionppdAllow, ppdReview, ppdReject
TPdfValidationPredicateKindpvpkIssueAbsent, pvpkStandardPass, pvpkCustom
TPdfValidationRunRecord: rule results with passed / failed / skipped / error counts, objects visited, evidence bytes, peak reserved memory, elapsed milliseconds, and IsComplete / IsCompliant
TPdfBatchValidationStatuspbvsComplete, pbvsPartial, pbvsCancelled, pbvsFailed
TPdfInkGestureRecord: Points array describing one ink stroke
TPdfFormFillInfoPacked record pairing the PDFium FPDF_FORMFILLINFO callback block with its owning TPdf; used internally by the form-fill bridge
TPdfBatchMergeIssueRecord: SourceIndex, FileName, MessageText for one source that failed or was skipped
TPdfBatchMergeProgressRecord: Stage, source index and count, file name, and imported source / page / native call counts
TPdfBatchMergeProgressStagebmpsStarted, bmpsOpeningSource, bmpsImportingPages, bmpsSourceCompleted, bmpsSourceFailed, bmpsRollingBack, bmpsCompleted, bmpsCancelled, bmpsFailed
TPdfBatchValidationItemRecord: file name, Status, preflight report, validation run, error message, and elapsed milliseconds
TPdfBatchValidationItemStatuspbvisPending, pbvisPass, pbvisFail, pbvisCancelled, pbvisError
TPdfValidationRuleResultRecord: rule id, profile, clause, category, severity, Status, evidence, fix hint, and elapsed milliseconds
TPdfValidationRuleStatuspvrrsPass, pvrrsFail, pvrrsSkipped, pvrrsError
TPdfValidationRunStatuspvrsComplete, pvrsFastFailed, pvrsBudgetExceeded, pvrsCancelled, pvrsError
TPdfARepairStepRecord: ordered repair action with category, issue code, evidence, dependency, Safety, and flags for full rewrite, signature invalidation, and blocked state
TPdfARepairCategoryparcSecurity, parcFonts, parcColour, parcAttachments, parcStructure, parcMetadata, parcOther
TPdfARepairSafetyparsAutomatic, parsReviewRequired, parsManual
TPdfXProductionIssueRecord: issue Kind, severity, page number, object index, and evidence from PDF/X production checks
TPdfXProductionIssueKindpxpikOutputIntent, pxpikPageBox, pxpikFont, pxpikColourant, pxpikTransparency, pxpikOverprint, pxpikSeparation, pxpikImageResolution
TPdfXProductionPageRecord: per-page box presence, object counts, transparency flag, and minimum effective DPI
TPdfRPageFactsRecord: PDF/R page facts — media and image geometry, object counts, pixel size, resolution, bit depth, colour space, and filters
TPdfPagePlanImpactppiBookmarks, ppiNamedDestinations, ppiPageLabels, ppiFormFields, ppiStructureTree, ppiSignatures, ppiImportedFeaturesUnknown

Parallel Rendering and Print Output Types

TypeValues
TPdfParallelRenderOptionsRecord: DPI, worker, per-page pixel and total output budgets, rotation, native render options, and background colour
TPdfBandedImageFormatpbifCustom, pbifPng, pbifTiff
TPdfBandedImageStreamOptionsRecord: format, band height, PNG compression level, and maximum encoded output bytes; initialise with Default
TPdfBandedImageReportRecord: format, dimensions, rendered and encoded band counts, encoded rows, peak band bytes, output bytes, and completion state
TPdfBandedImageEncoderAbstract caller codec contract with BeginImage, sequential WriteBand, EndImage, and optional byte telemetry
TPdfParallelModuleIdentityRecord containing the private module FileName, native InitializationAddress and Unloaded handle-release result; the platform may retain the image mapping
TPdfParallelModuleIdentitiesArray of TPdfParallelModuleIdentity records kept for the render operation's isolated workers
TPdfParallelRenderReportRecord containing ordered results, worker and status counts, retained output bytes, elapsed time, source size, peak source memory, storage backend, shared backing kind and Modules identity diagnostics
TPdfParallelPageResultRecord: page number, pixel size and Stride, PixelFormat, top-down Pixels, Status, error message, and elapsed milliseconds
TPdfParallelPixelFormatpppfBgra, pppfRgba
TPdfParallelRenderStatuspprsPending, pprsSucceeded, pprsCancelled, pprsFailed
TPdfParallelSourceBackingKindppsbNone, ppsbSharedMemory, ppsbMemoryMappedFile, ppsbRandomAccessStore
TPdfSpotPlateInfoRecord: zero-based Index and separation Name reported by SpotPlates

FPdfAsync Helper Unit

TypeDescription
IPdfCancellationTokenRead-only cancellation token with IsCancelled, ThrowIfCancelled, and RegisterCallback
IPdfCancellationTokenSourceOwner-side cancellation source exposing Token and Cancel
TPdfCancellationTokenSourceDefault implementation; use TPdfCancellationTokenSource.New
EPdfOperationCancelledException raised by ThrowIfCancelled after cancellation
TPdfFutureStatuspfsSuccess, pfsCancelled, pfsFailure
TPdfFutureResult<T>Result envelope with Value, Status, ErrorMessage, and IsSuccess / IsCancelled / IsFailure helpers
TPdfFuture<T>.RunFire-and-forget background worker helper that queues a reply back to the main thread
PdfNoCancellationTokenShared token that never cancels

FPdfMeasure Helper Unit

MemberDescription
TPdf.MeasureTextReturns text width and height in PDF user units for the selected font and size
TPdf.MeasureTextWidthReturns only the text width in PDF user units
TPdf.WrapTextPreserves explicit line breaks and optionally splits oversized tokens at Unicode scalar boundaries

FPdfMatrix Helper Unit

MemberDescription
TPdfMatrix.CreateCreates an identity matrix, an explicit six-value matrix, or a copy from FS_MATRIX
NewTranslation / NewScale / NewRotation / NewSkewCreate common transforms without a separate mutation step
NewRectMapping / TryCreateRectMappingCreate stretch, contain, or cover mappings between normalised rectangles
ResetReset to the identity
SetElements / Assign / CloneReplace, copy, or independently duplicate matrix state
Determinant / IsFinite / IsIdentity / IsInvertibleInspect numerical validity and invertibility without changing the matrix
IsTranslationOnly / IsAxisAligned / NearlyEqualsClassify transform shape and compare values using a tolerance
GetTranslation / SetTranslation / ClearTranslationRead or update translation independently of the linear component
TryDecomposeExtract translation, signed scale, clockwise rotation, shear, determinant, and reflection state
MultiplyPost-multiply by another TPdfMatrix or six FS_MATRIX values
PreMultiply / PreTranslate / PreScale / PreRotate / PreSkewPrepend local-input-space operations before the current transform
Translate / Scale / Rotate / SkewCompose common PDF-space transforms
HorizontalFlip / VerticalFlip / CentralFlipCompose axis flips
RotateAt / ScaleAt / SkewAt / *FlipAtAppend operations around a pivot that remains fixed
MapRectToRectAppend a stretch, contain, or cover rectangle mapping
Invert / TryInvert / TryGetInverse / InverseCopyInvert mutably or obtain a non-mutating inverse with explicit singular-matrix handling
TransformPoint / TransformVector / InverseTransformPointMap positions, direction vectors, or inverse positions without temporary matrix objects
TransformQuad / TransformRectMap PDF quadrilaterals or normalised rectangle bounds through the transform
TransformPoints / TransformRectsMap dynamic arrays with one result allocation or use in-place variants without an output allocation
TryTransformBounds / TransformBoundsAccumulate transformed point bounds in one pass without an intermediate array
a, b, c, d, e, fRead-only matrix element properties
HandleRaw FS_MATRIX value for PDFium APIs

PDFium Helper Classes

ClassDescription
TPdfCacheGovernor / TPdfCacheParticipantCoordinates retained memory through one thread-safe global LRU byte budget
TPdfStreamAdapterWraps a seekable Pascal TStream as FPDF_FILEACCESS for custom document loading
TPdfXObjectOwns a reusable FPDF_XOBJECT created from another PDF page
TTileKey / TPdfTileCacheKeys rendered tiles by revision and keeps a bounded LRU bitmap cache
Supporting declarationsPublic aliases, callback records, safety limits, highlight constants, and optional print-output ABI declarations

Global Functions

FunctionDescription
BuildToUnicodeCMap(const Glyphs: array of Word; const Text: WString): AnsiStringBuilds a reusable ToUnicode CMap for CID Type 2 text
NormalizePageViewRect(...): BooleanOrders and clips two page-space corners to visible page bounds
AttachmentDescriptionFeaturesAvailable: BooleanReports whether attachment description exports are available
AttachmentRelationshipFeaturesAvailable: BooleanReports whether the loaded DLL provides the /AFRelationship reader
BezierControlPointFeaturesAvailable: BooleanReports whether the loaded DLL exposes exact native cubic Bézier control-point readback
BookmarkStyleFeaturesAvailable: BooleanReports whether the loaded DLL provides the bookmark text-style reader
StrokePatternRenderingFeaturesAvailable: BooleanReports whether the loaded DLL can rasterise a path object's stroke tiling pattern
ReadPdfVersionInfo(Source: TStream; out Info: TPdfVersionInfo; out ErrorText: string): BooleanReads header, catalogue override, effective core version and Adobe developer-extension level without collapsing them into one value
AppendPdfSparseUpdate(Source, Dest: TStream; const Revision: TPdfSparseRevisionInfo; const Objects: TPdfSparseUpdateObjects; const TrailerExtra: AnsiString; const BeforeStartXref: AnsiString = ''): BooleanStreams one sparse revision onto a saved PDF: source bytes verbatim, caller-supplied object bodies, and a single incremental xref/trailer block chained through /Prev
Loaded: BooleanReturns True if the selected PDFium library is loaded
LoadLibraryManually loads the PDFium library
UnloadLibraryUnloads the PDFium library
ConfigureSystemFontCacheGovernor(Governor: TPdfCacheGovernor)Places process-wide retained system-font results under a caller-owned shared byte budget
ConfigureSystemFontProvider(const Provider: IPdfSystemFontProvider; const Policy: TPdfSystemFontPolicy)Installs an application-controlled native system-font mapper before PDFium loads
ClearSystemFontProviderRemoves the configured mapper after PDFium unloads
GetSystemFontProviderStatistics: TPdfSystemFontStatisticsReturns mapping, cache, fallback, callback, and live-handle counters
DecodeDate(const Value: string; out DateTime: TDateTime; out DateTimeOffset: Integer): BooleanParses a PDF date string to TDateTime and UTC offset
SetPdfPrintMode(PrintMode: TPdfPrintMode): BooleanSelects the PDFium Windows printing output mode for subsequent print rendering
SetPdfPrintPaperHandlingDevMode(var DevMode: TDeviceMode; PrintPaperHandling: TPrintPaperHandling): BooleanMaps a PDF viewer-preference duplex hint into Windows DEVMODE.dmDuplex
V8FeaturesAvailable: BooleanReturns True when the loaded DLL exposes the PDFium V8 helper exports
XfaBStrHelpersAvailable: BooleanReturns True when the loaded DLL exposes the XFA FPDF_BSTR helper exports
XfaFeaturesAvailable: BooleanReturns True when the loaded PDFium build exposes the XFA feature exports
GetRecommendedV8Flags: stringReturns PDFium recommended V8 command-line flags, or an empty string when the loaded DLL does not expose them
PdfBufferLooksXfa(Data: PByte; Size: Integer): BooleanScans a raw PDF byte buffer for XFA markers without loading pdfium.dll
PdfFileLooksXfa(const FileName: string): BooleanScans a PDF file on disk for XFA markers without loading pdfium.dll
ValidatePdfUaStructureElements(const Elements: TPdfStructureElements; Conformance: TPdfUaConformance = puc1): TPdfUaValidationIssuesValidates flattened structure data with PDF/UA-1 or PDF/UA-2 heading semantics without loading pdfium.dll
IsPdfUaLanguageTagValid, ResolvePdfUaEffectiveLanguageValidate a language tag and resolve marked-content, nearest structure-ancestor, then catalogue language precedence
ClassifyPdfUaNamespace(const NamespaceUri: WString): TPdfUaNamespaceKindClassifies missing, PDF 1.7, PDF 2.0, MathML, and custom structure namespaces
ValidatePdfUa2StructureElements(const Elements: TPdfStructureElements): TPdfUaValidationIssuesRuns every namespace-aware PDF/UA-2 semantic structure rule
PdfUa2StructureHasIssue(const Elements: TPdfStructureElements; Issue: TPdfUaValidationIssue): BooleanC++Builder-safe single-issue query that avoids returning a Pascal set by value
ValidatePdfUa2NamespaceSemantics, ValidatePdfUa2Containment, ValidatePdfUa2TableGridRun focused namespace, parent-child, and bounded table-grid validation
ValidatePdfUa2AnnotationSemantics, ValidatePdfUa2FormulaSemantics, ValidatePdfUa2AssociatedFileSemantics, ValidatePdfUa2DocumentSemanticsRun focused annotation/form, Formula/MathML, associated-file ownership and reading order, and document/list/TOC/caption validation
ValidatePdfUaPageContentTagging(const Objects: TPdfPageContentMarkInfos; const Elements: TPdfStructureElements): TPdfUaValidationIssuesValidates real-content tagging and prevents Artifact objects from being claimed by the structure tree
ValidatePdfUaRoleMapUsage(const Elements: TPdfStructureElements; const RoleMapKeys, RoleMapVals: TPdfUaNameArray): TPdfUaValidationIssuesValidates RoleMap key/value pairs resolution to standard ISO 32000-1 types
ClassifyStructType(const TypeName: WString; out HeadingLevel: Integer): TPdfContentFragmentKindClassifies a structure element type name into a TPdfContentFragmentKind and optional heading level
FormFieldTabOrderForPage(FormHandle: FPDF_FORMHANDLE; Page: FPDF_PAGE): TPdfIntegerArrayReturns page widget annotation indexes in form tab order
FocusedFormFieldTextForPage(FormHandle: FPDF_FORMHANDLE; Page: FPDF_PAGE): WStringReturns focused widget text for one form handle and page
NormalizePageViewRect(X1, Y1, X2, Y2, PageWidth, PageHeight: Double; out Left, Top, Right, Bottom: Double): BooleanNormalises two mapped page-space corners into the page-clamped visible rectangle; False when nothing of the page is visible
NextFormFieldIndexForPage(FormHandle: FPDF_FORMHANDLE; Page: FPDF_PAGE; CurrentIndex: Integer; GoForward: Boolean): IntegerFinds the next or previous widget annotation index in page tab order
ClearFocusedFormField(FormHandle: FPDF_FORMHANDLE): BooleanClears the current focused form widget for a PDFium form handle
ComputeSpreadPages(DisplayMode: TPdfDisplayMode; PageNumber, PageCount: Integer; out LeftPageNo, RightPageNo: Integer)Computes left and right page numbers for two-page display modes
BuildReadingUnits(const Fragments: TPdfContentFragments): TPdfReadingUnitsConverts readable content fragments into sentence-level reading units
NextReadingUnitOfKind(const Units: TPdfReadingUnits; CurrentIndex: Integer; Kind: TPdfContentFragmentKind; GoForward: Boolean): IntegerFinds the next or previous reading unit of the requested semantic kind
BuildWordBoxes(const PageText: WString): TPdfWordBoxesSplits page text into TPdfWordBox records
WordBoxIndexAtCharIndex(const Words: TPdfWordBoxes; CharIndex: Integer): IntegerMaps a page character index to a word-box index
SpokenTextAppend(var Spoken: TPdfSpokenText; const SpokenPart: WString; Page, StartIndex: Integer; SourceCount: Integer = -1)Appends one mapped spoken-text run to a speech chunk
BuildSpokenTextFromWords(const Words: TPdfWordBoxes; FirstWord, LastWord: Integer): TPdfSpokenTextBuilds a spoken-text chunk from a word-box range
SpokenToPageChar(const Spoken: TPdfSpokenText; SpokenOffset: Integer; out Page, CharIndex: Integer): BooleanTranslates a spoken-text offset back to a page character index
EstimateSpokenWordIndex(const Words: TPdfWordBoxes; ElapsedMs: Cardinal; WordsPerMinute: Integer): IntegerEstimates current word index for engines that report no word-position signal
FPDF_RenderPageSkiaLow-level PDFium binding for rendering page content to an external SkCanvas
FPDF_FFLDrawSkiaLow-level PDFium binding for drawing form fields and popup annotations to an external SkCanvas
PointsToInches(Points: Double): DoubleConverts PDF points to inches
PointsToPixels(Points, PixelsPerInch: Double): DoubleConverts PDF points to pixels
PixelsToInches(Pixels, PixelsPerInch: Double): DoubleConverts pixels to inches
PixelsToPoints(Pixels, PixelsPerInch: Double): DoubleConverts pixels to PDF points
GetApplicationPath: stringReturns the executable directory used as the first PDFium DLL search root
IsWin64: BooleanReturns True when the current process targets Win64
BuildDllName(UseV8: Boolean): stringReturns pdfium.dll or pdfium.v8.dll for the requested V8 mode
FindDllInPath(const DllName, SearchPath: string): stringFinds a named PDFium DLL in one directory
FindDllInDllsTree(const DllName, StartPath, SubDir: string): stringSearches DLLs\Win32 or DLLs\Win64 folders below a start path
LoadPDFiumDll: stringHonours an explicit LibraryName path in either engine mode, otherwise resolves the runtime using the component search policy
ConfigurePdfLibrary(const Configuration: TPdfLibraryConfiguration)Applies DLL selection, V8, and sandbox configuration before the first library load
GetPdfLibraryConfiguration: TPdfLibraryConfigurationReturns a copy of the current effective library configuration
PdfLibraryConfigurationSealed: BooleanReturns True once the library has loaded and the configuration can no longer change
PdfNativeRendererType(Preference: TPdfRendererPreference; SkiaBuild: Boolean): FPDF_RENDERER_TYPEReturns the native renderer a preference selects for an AGG-only or Skia-enabled PDFium build, keeping the build default for prpDefault
PdfLibraryConfigurationSupportError(const Configuration: TPdfLibraryConfiguration; SkiaBuild, FontationsBuild: Boolean): stringReturns why a renderer or font backend cannot be used with a PDFium build; LoadLibrary applies the same check and raises EPdfError rather than letting native initialisation stop the process
PdfDefaultTtfMapCount: NativeUIntReturns the number of entries in the native default TrueType font substitution map
TryGetPdfDefaultTtfMapEntry(Index: NativeUInt; out Entry: TPdfDefaultTtfMapEntry): BooleanCopies one default font substitution map entry by index
IsXfaFormField(FieldType: Integer): Boolean (FPdfXfa)Tests whether a form field type code belongs to the XFA field range

Global Variables

VariableTypeDefaultDescription
LibraryNamestring'pdfium.dll'An explicit path selects the runtime in either engine mode; a bare name selects the standard runtime when EnableV8Engine is False
EnableV8EngineBooleanFalseSet to True before loading to select pdfium.v8.dll from the matching Win32 or Win64 DLLs folder

Common Usage Patterns

PDF Viewer Implementation

procedure TMainForm.OpenPDF(const FileName: string);
begin
  Pdf.FileName := FileName;
  Pdf.Active := True;
  PdfView.Pdf := Pdf;
  PdfView.Active := True;
  StatusBar1.SimpleText := Format('Loaded: %s (%d pages)',
    [ExtractFileName(FileName), Pdf.PageCount]);
end;

Create PDF with Compression

Pdf.CreateDocument;
Pdf.Compressed := True;
Pdf.Active := True;
Pdf.AddPage(0, 595, 842);
Pdf.AddText('Hello World!', 'Arial', 24, 100, 700, clBlack, $FF, 0.0);
Pdf.SaveAs('output.pdf');
Pdf.Active := False;

Text Extraction

Pdf.FileName := 'document.pdf';
Pdf.Active := True;
for I := 1 to Pdf.PageCount do
begin
  Pdf.PageNumber := I;
  Memo1.Lines.Add(Format('--- Page %d ---', [I]));
  Memo1.Lines.Add(Pdf.Text);
end;
Pdf.Active := False;

Form Field Processing

Pdf.FileName := 'form.pdf';
Pdf.Active := True;
Pdf.PageNumber := 1;
for I := 0 to Pdf.FormFieldCount - 1 do
begin
  FieldInfo := Pdf.FormFieldInfo[I];
  case FieldInfo.FieldType of
    fiTextField:
      Pdf.FormField[I] := 'New Value';
    fiCheckBox:
      Pdf.FormField[I] := 'Yes';
  end;
end;
Pdf.SaveAs('filled_form.pdf');
Pdf.Active := False;

Flatten a Filled Form

// Bake form values into permanent (non-editable) page content
Pdf.FileName := 'form.pdf';
Pdf.Active := True;
Pdf.FormField[0] := 'John Smith';
Pdf.FormField[1] := 'Yes';
Pdf.GenerateFormAppearances;          // step 1: refresh /AP from /V
Pdf.FlattenAllPages(FLAT_NORMALDISPLAY); // step 2: flatten all pages
Pdf.SaveAs('flattened.pdf');           // step 3: save
Pdf.Active := False;