Skip to main content
A newer version of this page is available. .

TdxPDFCustomViewer.LoadFromFile(string) Method

Loads a PDF document from the specified file.

Declaration

procedure LoadFromFile(const AFileName: string);

Parameters

Name Type
AFileName string

Remarks

Call this procedure and pass the absolute or relative path to a PDF file as the AFileName parameter to load a document. If the document is protected with a password, a LoadFromFile procedure call invokes the “Enter Password“ dialog to prompt an end user to enter a user or owner password.

If the specified password is incorrect, the LoadFromFile procedure displays the dialog again until an end user enters the correct password or until the limit is reached. Handle the OnGetPassword dialog to specify the required password without end-user interaction. Refer to the following topic for detailed information on PDF document security settings: Password Protection

A successful LoadFromFile procedure call raises the OnDocumentLoaded event.

See Also