ApplyPAdESLongTermArchiveValidationA
Digital 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
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to ApplyPAdESLongTermArchiveValidation and string arguments are interpreted using the current SetAnsiMode code page
Promotes an already-signed PDF to PAdES B-LTA in one call: the B-LT validation-material upgrade runs first, then a /DocTimeStamp signature with /SubFilter /ETSI.RFC3161 is appended whose token is fetched from the TSA configured with SetTimeStampServer, writing the result to a file
Syntax
Delphi
Function DLApplyPAdESLongTermArchiveValidationA(InstanceID: Integer; InputFile: PAnsiChar; Password: PAnsiChar; OutputFile: PAnsiChar; FieldName: PAnsiChar; Options: Integer): Integer;
DLL
int DLApplyPAdESLongTermArchiveValidationA(int InstanceID, const char* InputFile, const char* Password, const char* OutputFile, const char* FieldName, int Options);
Parameters
| InputFile | The signed PDF |
|---|---|
| Password | The password to open it, or an empty string |
| OutputFile | The B-LTA PDF to write |
| FieldName | A signature field to process, or an empty string to process every signature into one revision |
| Options | A PADES_LTV_* bit mask as documented for ApplyPAdESLongTermValidation; 0 selects PADES_LTV_DEFAULT |
Return values
| 1 | The promotion succeeded |
|---|---|
| 2 | The input file could not be read |
| 3 | The B-LT stage failed; GetPAdESLTVError returns the reason |
| 4 | No TSA is configured or the TSA refused the request; GetTimeStampError holds the TSA detail |
| 10 | The output could not be written |
| 11 | The document time-stamp could not be applied |
See also
ApplyPAdESLongTermValidation, SetTimeStampServer, SetPAdESSignatureTimeStampDigestAlgorithm