Method Sign
- Namespace
- DocWright.Signatures
- Assembly
- DocWright.Signatures.dll
Sign(byte[], Stream, IPdfSignatureProvider, PdfSigningOptions?)
Writes a signed copy of pdf to destination.
public static void Sign(byte[] pdf, Stream destination, IPdfSignatureProvider provider, PdfSigningOptions? options = null)
Parameters
pdfbyte[]The PDF to sign, as bytes. Not modified.
destinationStreamReceives the original bytes plus the signature update.
providerIPdfSignatureProviderThe host's CMS provider. DocWright never holds the key.
optionsPdfSigningOptionsSigning options, or null for the defaults.
Exceptions
- ArgumentNullException
A required argument is null.
- InvalidDocumentException
pdfis not a PDF this package can append to, or the produced signature does not fit the reserved space.