OptionalcertificatesCertificates used to sign the document.
OptionalltvFlag to enable LTV (Long Term Validation) for the signature (Standalone only).
OptionalpadesPAdES level to use when creating the signature (Document Engine only). This parameter is ignored when the signatureType is cms. Defaults to b-lt.
OptionalprivatePrivate key used to sign the document.
OptionalsignatureSignature container type. Can be NutrientViewer.SignatureContainerType.raw or NutrientViewer.SignatureContainerType.pkcs7.
OptionaltimestampTimestamping authority information (Standalone only).
This object can be provided optionally as part of the
NutrientViewer.SignaturePreparationDatapassed as first argument when callinginstance.signDocument()and contains the certificates, private key and signature type for the SDK to use for signing the document using the Web Crypto API.certificatesmust be anArrayofArrayBuffer(DER-encoded) orstring(PEM-encoded) containing X.509 certificates.The SDK can sign the document using the Web SubtleCrypto API as long as the certificate chain and private key are provided here.
privatekeymust be astringthat contains the private key to sign (PEM-encoded). IfprivateKeyis not included,NutrientViewer.TwoStepSignatureCallbackneeds to be passed as second argument for theinstance.signDocument()call to perform the signing.If
certificatesis not provided, onlyNutrientViewer.SignatureType.CMScan be created.If
signatureTypeis not provided,NutrientViewer.SignatureType.CAdESwill be used by default as long ascertificatesis provided, and will default toNutrientViewer.SignatureType.CMSotherwise.If
timestampis provided, thesignatureTypemust beNutrientViewer.SignatureType.CAdES.