SetEncryptedPayloadFromString
Security and encryption
Description
Stores complete in-memory encrypted PDF bytes as the payload of the selected unencrypted PDF
Syntax
Delphi
Function TPDFlib.SetEncryptedPayloadFromString(Const FileBytes: AnsiString; Const Subtype, PayloadVersion: WideString): Integer;DLL
int DLSetEncryptedPayloadFromString(int InstanceID, const char* FileBytes, int FileLength, const wchar_t* Subtype, const wchar_t* PayloadVersion);Parameters
| FileBytes | Complete binary encrypted PDF data |
|---|---|
| FileLength | DLL byte length, including any embedded zero bytes |
| Subtype | PDF name identifying the encryption handler |
| PayloadVersion | Optional PDF name identifying the handler version |
Return values
| 1 | The payload was added |
|---|---|
| 0 | The input or wrapper state was invalid |
Remarks
The function stores bytes without decrypting or rewriting the payload and automatically raises the outer document to PDF 2.0
See also
SetEncryptedPayloadFromFile, GetEncryptedPayloadContentToString