Table of Contents

Method Add

Namespace
PdfSharp.Pdf.Signatures
Assembly
PdfSharp.dll

Add(PdfDocument, IEnumerable<byte[]>?, IEnumerable<byte[]>?, IEnumerable<byte[]>?)

Adds validation data to the document's DSS, creating the DSS if the document has none. Each item is DER-encoded: an X.509 certificate, an OCSP response (RFC 6960 OCSPResponse) or a CRL (RFC 5280 CertificateList). Items the DSS already holds are not added again.

public static int Add(PdfDocument document, IEnumerable<byte[]>? certificates = null, IEnumerable<byte[]>? ocspResponses = null, IEnumerable<byte[]>? crls = null)

Parameters

document PdfDocument
certificates IEnumerable<byte[]>
ocspResponses IEnumerable<byte[]>
crls IEnumerable<byte[]>

Returns

int

The number of items added.