NewPAdESDSSProcessFromFile

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

Opens a previously signed PDF from disk to attach PAdES Document Security Store validation material via incremental update. Returns a process id that subsequent AddPAdESDSS* and EndPAdESDSSProcessTo* calls operate on

DSS augmentation is the canonical PAdES-B-LT step: take an already-signed PDF and bind certificate / CRL / OCSP evidence into the catalogue so the signature can be verified long after revocation services are gone or signing certificates expire (ETSI EN 319 142-1 v1.2.1 clause 5.4.2.2)

Syntax

Delphi

Function TPDFlib.NewPAdESDSSProcessFromFile(Const InputFile, Password: WideString): Integer; Virtual;

ActiveX

Function PDFlib::NewPAdESDSSProcessFromFile(InputFile As String, Password As String) As Long

DLL

int DLNewPAdESDSSProcessFromFile(int InstanceID, const wchar_t* InputFile, const wchar_t* Password);
int DLNewPAdESDSSProcessFromFileA(int InstanceID, const char* InputFile, const char* Password);

Parameters

InputFilePath of the source signed PDF to augment
PasswordOpen password if the PDF is encrypted, empty string otherwise

Return values

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