ApplyPAdESLongTermArchiveValidationToStream

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-LTA in one call, writing the result to a stream instead of a file; the B-LT upgrade and the appended /DocTimeStamp signature behave exactly like ApplyPAdESLongTermArchiveValidation

Syntax

Delphi

Function TPDFlib.ApplyPAdESLongTermArchiveValidationToStream(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 into one revision
OutputStreamThe stream that receives the B-LTA PDF
OptionsA PADES_LTV_* bit mask; 0 selects PADES_LTV_DEFAULT

Return values

1The promotion succeeded
2The input file could not be read
3The B-LT stage failed; GetPAdESLTVError returns the reason
4No TSA is configured or the TSA refused the request
10The output could not be written
11The document time-stamp could not be applied

See also

ApplyPAdESLongTermArchiveValidation, ApplyPAdESLongTermValidationToStream