NewPAdESDSSProcessFromString

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

AnsiString variant of NewPAdESDSSProcessFromFile, useful when the source PDF is already loaded in memory

Syntax

Delphi

Function TPDFlib.NewPAdESDSSProcessFromString(Const Source: AnsiString; Const Password: WideString): Integer; Virtual;

ActiveX

Function PDFlib::NewPAdESDSSProcessFromString(Source As Variant, Password As String) As Long

DLL

int DLNewPAdESDSSProcessFromString(int InstanceID, const char* Source, int SourceLength, const wchar_t* Password);
int DLNewPAdESDSSProcessFromStringA(int InstanceID, const char* Source, int SourceLength, const char* Password);

Parameters

SourceRaw PDF bytes packed in an AnsiString
PasswordOpen password if the PDF is encrypted

Return values

Returns the ID of the new DSS process that the AddPAdESDSS* and EndPAdESDSSProcessTo* functions operate on. Returns 0 when the process cannot be started; in editions without this feature the call returns 0 and LastErrorCode reports that the Enterprise edition is required.