ApplyPAdESLongTermValidationToStream
Digital signatures
Requires the Enterprise edition — in Delphi, C++Builder and Lazarus code create the library as TPDFlibEnterprise (unit PDFlibEnterprise); this method is Pascal-only: it takes a Delphi stream object, which the C and Automation ABIs do not carry, so no DLL, ActiveX or Dylib build exports it; other editions keep the method, which returns 0 and sets LastErrorCode to 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)
Description
Promotes an already-signed PDF to PAdES-B-LT, writing the result to a stream
Syntax
Delphi
Function TPDFlib.ApplyPAdESLongTermValidationToStream(Const InputFile, Password, FieldName: WideString; OutputStream: TStream; Options: Integer): Integer; Virtual;Parameters
| InputFile | The signed PDF |
|---|---|
| Password | The password to open it, or an empty string |
| FieldName | A signature field to process, or an empty string to process every signature |
| OutputStream | The stream the augmented PDF is written to |
| Options | A PADES_LTV_* bit mask; 0 selects PADES_LTV_DEFAULT |
Options
PADES_LTV_WRITE_VRI (1) | Write a VRI entry for each signature |
|---|---|
PADES_LTV_FETCH_OCSP (2) | Ask each link's OCSP responder |
PADES_LTV_FETCH_CRL (4) | Fall back to the CRL when OCSP returned nothing |
PADES_LTV_FOLLOW_AIA (8) | Follow issuer addresses to complete the path |
PADES_LTV_SKIP_EXISTING (16) | Do not re-add material whose bytes are already staged |
PADES_LTV_SKIP_ROOT_REVOCATION (32) | Do not ask for a self-issued root's status |
PADES_LTV_DEFAULT (63) | All of the above; selected when Options is 0 |
Return values
| 1 | The promotion succeeded |
|---|---|
| 2 | The input file could not be read |
| 3 | The input PDF could not be parsed |
| 10 | The output could not be written |
| 11 | The document security store could not be added |
| 20 | No such signature field |
| 21 | No processed signature carried a readable certificate |
GetPAdESLTVError carries the reason for any value other than 1
Remarks
Identical to ApplyPAdESLongTermValidation except for where the result is written