property Password: string;
Decryption password assigned before Active := True; like FileName it can only be changed while the component is inactive
The password is kept until it is reassigned and is scrubbed from memory when the component is destroyed. A wrong password makes LoadDocument raise EPdfError, while Active := True leaves the component inactive and reports the failure in LastLoadReport
The password is passed to PDFium as UTF-8, which PDFium converts to Latin-1 for older security handlers when needed; Free Pascal builds convert from the string's own code page, so non-ASCII passwords work with or without the Lazarus UTF-8 string mode
Wraps the corresponding PDFium API and exposes it as a TPdf instance member so consumers do not have to manage FPDF_DOCUMENT handles directly
Pdf1.Active := False before changing Password; assigning Password while active raises EPdfErrorSaveAs to persistPDFium (LoadLibrary / UnloadLibrary / GetRecommendedV8Flags) can be called without a TPdf instance
Pdf1.Active := False;
Pdf1.Password := 'secret';
Pdf1.FileName := 'encrypted.pdf';
Pdf1.Active := True;