UNPKG

@adobe/pdfservices-node-sdk

Version:

The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.

70 lines 3.06 kB
"use strict"; /* * Copyright 2024 Adobe * All Rights Reserved. * * NOTICE: Adobe permits you to use, modify, and distribute this file in * accordance with the terms of the Adobe license agreement accompanying * it. If you have received this file from a source other than Adobe, * then your use, modification, or distribution of it requires the prior * written permission of Adobe. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PDFElectronicSealParams = void 0; const ValidationUtil_1 = require("../../../internal/util/ValidationUtil"); /** * Parameters for electronically seal PDFs using {@link PDFElectronicSealJob}. */ class PDFElectronicSealParams { /** * Constructs a new `PDFElectronicSealParams` instance. * * @param params - The parameters for constructing an instance of `PDFElectronicSealParams`. * @param [params.signatureFormat] - The signature format to be used for applying electronic seal. * Default value is {@link SignatureFormat#PKCS7 PKCS7}. * @param [params.documentLevelPermission] - The document level permissions for changes allowed after applying * electronic seal. Default value is {@link DocumentLevelPermission#FORM_FILLING FORM_FILLING}. * @param params.certificateCredentials - The certificate credentials to be used for applying the electronic seal. * Cannot be undefined. * @param [params.tsaOptions] - The TSA details to be used for timestamping as per * {@link https://www.ietf.org/rfc/rfc3161.txt RFC3161} standards. * @param params.sealFieldOptions - The field options to be used for applying the electronic seal. * Cannot be undefined. * @param [params.sealAppearanceOptions] - The appearance options to be used for applying the electronic seal. * Default value is `[NAME, LABELS]`. */ constructor(params) { ValidationUtil_1.ValidationUtil.validatePDFElectronicSealParams(params); this._signatureFormat = params.signatureFormat; this._documentLevelPermission = params.documentLevelPermission; this._certificateCredentials = params.certificateCredentials; this._tsaOptions = params.tsaOptions; this._fieldOptions = params.sealFieldOptions; this._appearanceOptions = params.sealAppearanceOptions; } /** * Returns the signature format to be used for applying electronic seal. * * @returns the signature format to be used for applying electronic seal. */ get signatureFormat() { return this._signatureFormat; } get documentLevelPermission() { return this._documentLevelPermission; } get certificateCredentials() { return this._certificateCredentials; } get tsaOptions() { return this._tsaOptions; } get fieldOptions() { return this._fieldOptions; } get appearanceOptions() { return this._appearanceOptions; } } exports.PDFElectronicSealParams = PDFElectronicSealParams; //# sourceMappingURL=PDFElectronicSealParams.js.map