AddPublicKeyRecipientFromPFXA
Security and signatures
Requires the Enterprise edition. In Delphi, C++Builder and Lazarus code create the library as TPDFlibEnterprise (unit PDFlibEnterprise); the Enterprise DLL and ActiveX builds provide it unchanged. Other editions keep the method, which returns 0, an empty string or False and sets LastErrorCode to 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)
Description
ANSI variant of AddPublicKeyRecipientFromPFX
Accepts string parameters as ANSI text and otherwise behaves identically to the wide-string entry point
Syntax
DLL
int DLAddPublicKeyRecipientFromPFXA(int InstanceID, const char* PFXFileName, const char* PFXPassword, int UseMachineKeyset, int Permissions);Return values
| 1 | The recipient certificate was added |
|---|---|
| 0 | The PFX, password, permissions, or document state was invalid |
Remarks
The private key is used only to identify the leaf certificate while adding the recipient and is not embedded in the PDF
The DLL also exports DLAddPublicKeyRecipientFromPFXA for ANSI strings