AttachLibrary

Forms, interaction, data types, viewer interaction

TPDFlibFormSession.AttachLibrary

Replaces the TPDFlib instance a TPDFlibFormSession operates on

The call first resets all transient state, clearing focus, hover, press and edit state, and then stores the new reference

ALibrary already equals the attached instance The library remains caller-owned, has to outlive the session and may be

The library remains caller-owned, has to outlive the session and may be nil

Declaration

procedure AttachLibrary(ALibrary: TPDFlib);

Parameters

ALibraryNew library instance to attach, or nil

TPDFlibViewer.AttachLibrary

Closes any loaded document and attaches a caller-owned TPDFlib instance whose pages the viewer displays The viewer never owns the instance; the caller has to keep it alive for the whole attachment and may pass

nil to detach When the attached library already holds pages the viewer selects the library's current page, falling back to page 1, rebuilds the cached page metrics, repaints and signals

OnPageChange

Declaration

procedure TPDFlibViewer.AttachLibrary(ALib: TPDFlib);

Parameters

ALibLibrary instance whose pages are displayed, or nil to detach after the current document closed

See also

TPDFlibFormSession, TPDFlibViewer, HitTest, BeginEdit, DispatchInputEvent, ClearEditState, CloseDocument, Lib, LoadFromFile