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

InputFileThe signed PDF
PasswordThe password to open it, or an empty string
FieldNameA signature field to process, or an empty string to process every signature
OutputStreamThe stream the augmented PDF is written to
OptionsA 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

1The promotion succeeded
2The input file could not be read
3The input PDF could not be parsed
10The output could not be written
11The document security store could not be added
20No such signature field
21No 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

See also

ApplyPAdESLongTermValidation