ApplyPAdESLongTermArchiveValidation

デジタル署名

Enterprise エディションが必要です。Delphi、C++Builder、Lazarus のコードでは、ライブラリを TPDFlibEnterprise(ユニット PDFlibEnterprise)として作成します。Enterprise 版の DLL および ActiveX ビルドでは、そのまま利用できます。他のエディションでもメソッド自体は残っており、0、空文字列、または False を返し、LastErrorCode に 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED) を設定します

説明

署名済み PDF を 1 回の呼び出しで PAdES B-LTA に引き上げます。まず B-LT の検証情報アップグレードを実行し、その後 SetTimeStampServer で設定した TSA からトークンを取得した /SubFilter /ETSI.RFC3161 の /DocTimeStamp 署名を追加して、結果をファイルに書き込みます

構文

Delphi

Function TPDFlib.ApplyPAdESLongTermArchiveValidation(Const InputFile, Password, OutputFile, FieldName: WideString; Options: Integer): Integer; Virtual;

ActiveX

Function PDFlib::ApplyPAdESLongTermArchiveValidation(InputFile As String, Password As String, OutputFile As String, FieldName As String, Options As Long) As Long

DLL

int DLApplyPAdESLongTermArchiveValidation(int InstanceID, const wchar_t* InputFile, const wchar_t* Password, const wchar_t* OutputFile, const wchar_t* FieldName, int Options);
int DLApplyPAdESLongTermArchiveValidationA(int InstanceID, const char* InputFile, const char* Password, const char* OutputFile, const char* FieldName, int Options);

パラメータ

InputFile署名済みの PDF
Password開くためのパスワード。不要なら空文字列
OutputFile書き出す B-LTA PDF
FieldName処理する署名フィールド。空文字列にすると全署名を 1 つのリビジョンにまとめて処理します
OptionsPADES_LTV_* のビットマスク。詳細は ApplyPAdESLongTermValidation に記載されています。0 は PADES_LTV_DEFAULT を選択します

戻り値

1引き上げに成功しました
2入力ファイルを読み込めませんでした
3B-LT 段階が失敗しました。GetPAdESLTVError が理由を返します
4TSA が設定されていないか、TSA が要求を拒否しました。GetTimeStampError に TSA の詳細が入ります
10出力を書き込めませんでした
11ドキュメントタイムスタンプを適用できませんでした

関連項目

ApplyPAdESLongTermValidation、SetTimeStampServer、SetPAdESSignatureTimeStampDigestAlgorithm