New to Telerik Document Processing? Start a free 30-day trial

Multiple Digital Signatures

Updated on Nov 27, 2026
Minimum VersionQ2 2025

Use PdfStreamSigner in RadPdfProcessing to add digital signatures through incremental PDF revisions. It also embeds long-term validation evidence and renews document timestamps without rewriting earlier signed bytes.

When adding multiple signatures, export the document after each signature before importing it back again.

The following table lists the constructor and operations for signing and long-term evidence:

MethodDescription
PdfStreamSigner(Stream outputStream)Creates a new instance of the PdfStreamSigner and specifies the output stream where the signed document is written.
SignDocument(Stream originalStream, SignatureField signatureField, int pageIndex, TimeSpan? timeout)Adds a digital signature to the PDF document.
EmbedValidationInformation(Stream originalStream)Embeds certificate and revocation evidence through an incremental DSS update. Introduced in Q4 2026.
RenewDocumentTimestamp(Stream originalStream, TimeStampServer timeStampServer, DigestAlgorithmType digestAlgorithm = DigestAlgorithmType.Sha256)Refreshes evidence and appends an RFC 3161 document timestamp. Introduced in Q4 2026.

Starting with Q1 2026, the PdfStreamSigner supports the TimeStamp server. The SignatureField used for signing the document preserves all of its SignatureSettings including the TimeStampServer.

To create a PAdES signature, configure signatureField.Signature.Settings according to the baseline profile requirements before SignDocument().

The following example shows how to insert multiple digital signatures into a PDF document using the PdfStreamSigner:

In .NET Standard, use Telerik.Documents.Primitives.Rect instead of System.Windows.Rect.

PdfProcessing Multiple Digital Signatures Demo

C#
public void AddMultipleDigitalSignatures()
{
    string certificateFilePath = "certificate.pfx";
    string certificateFilePassword = "password";

    // Define the certificate which will be used for the signing.
    X509Certificate2 certificate = new X509Certificate2(certificateFilePath, certificateFilePassword);

    // Create the first signature field.
    SignatureField signature1Field = this.CreateSignatureField(
        "SampleSignature1",
        certificate,
        new Point(50, 50),
        20,
        new Rect(200, 200, 100, 100)
    );

    string inputDocument = "input.pdf";
    string oneSignatureDocument = "oneSignatureDocument.pdf";

    File.Delete(oneSignatureDocument);

    using (FileStream inputStream = File.OpenRead(inputDocument))
    {
        using (FileStream outputStream = new FileStream(oneSignatureDocument, FileMode.OpenOrCreate))
        {
            PdfStreamSigner signer = new PdfStreamSigner(outputStream);
            signer.SignDocument(inputStream, signature1Field, pageIndex: 0, timeout: null);
        }
    }

    // Create the second signature field.
    SignatureField signature2Field = this.CreateSignatureField(
        "SampleSignature2",
        certificate,
        new Point(50, 50),
        20,
        new Rect(500, 200, 100, 100)
    );

    string twoSignatureDocument = "twoSignatureDocument.pdf";

    using (FileStream inputStream = File.OpenRead(oneSignatureDocument))
    {
        using (FileStream outputStream = new FileStream(twoSignatureDocument, FileMode.OpenOrCreate))
        {
            PdfStreamSigner signer = new PdfStreamSigner(outputStream);
            signer.SignDocument(inputStream, signature2Field, pageIndex: 0, timeout: null);
        }
    }
}

private SignatureField CreateSignatureField(string signatureName, X509Certificate2 certificate, Point circleCenter, double circleRadius, Rect widgetRect)
{
    // This is the Form XObject element that represents the contents of the signature field.
    Form signatureForm = new Form();
    signatureForm.FormSource = new FormSource();
    signatureForm.FormSource.Size = new Size(120, 120);

    // We will use the editor to fill the Form XObject.
    FixedContentEditor formEditor = new FixedContentEditor(signatureForm.FormSource);
    formEditor.DrawCircle(circleCenter, circleRadius);
    formEditor.DrawText(signatureName);

    // The Signature object is added to a signature field, so we can add a visualization to it.
    SignatureField signatureField = new SignatureField(signatureName);
    signatureField.Signature = new Telerik.Documents.Fixed.Model.DigitalSignatures.Signature(certificate);

    // The widget contains the Form XObject and defines the appearance of the signature field.
    SignatureWidget signatureWidget = signatureField.Widgets.AddWidget();
    signatureWidget.Rect = widgetRect;
    signatureWidget.Border = new AnnotationBorder(100, AnnotationBorderStyle.Solid, null);
    signatureWidget.Content.NormalContentSource = signatureForm.FormSource;

    return signatureField;
}

Multiple Digital Signing with PdfStreamSigner

Long-Term Evidence Operations

The following requirements apply to EmbedValidationInformation() and RenewDocumentTimestamp():

  • Use readable, seekable input and a distinct writable output stream.
  • Keep seekable output streams empty and positioned at zero.
  • Use unencrypted PDFs.

Renewal also requires a seekable output stream, at least one PDF page, and an input smaller than 2 GB. The operations authenticate signatures, timestamps, and evidence. Unsupported inputs, missing evidence, policy violations, or exceeded resource limits cause failure.

Embedding Validation Information

EmbedValidationInformation() adds a Document Security Store (DSS) update for already timestamped ETSI.CAdES.detached signatures. It processes all signed fields, including invisible signatures, and skips unsigned fields. It does not add missing signature timestamps or approval signatures.

The following example writes the update to a separate output PDF:

Example 1: Embed Validation Information

csharp
using System.IO;
using Telerik.Documents.Fixed.FormatProviders.Pdf.Streaming;

using (FileStream originalStream = File.OpenRead("timestamped.pdf"))
using (FileStream outputStream = File.OpenWrite("long-term.pdf"))
{
    outputStream.SetLength(0);
    Telerik.Documents.Fixed.FormatProviders.Pdf.Streaming.PdfStreamSigner signer =
        new PdfStreamSigner(outputStream);
    signer.EmbedValidationInformation(originalStream);
}

Configure evidence retrieval settings before the call if your certificate infrastructure needs private endpoints.

Renewing Document Timestamps

Renewal reuses authenticated applicable evidence and fetches missing evidence. Supply a trusted TimeStampServer. No approval signer's private key is required.

Use your timestamp server endpoint in the following example:

Example 2: Renew a Document Timestamp

csharp
using System;
using System.IO;
using Telerik.Documents.Fixed.FormatProviders.Pdf.Streaming;
using Telerik.Documents.Fixed.Model.DigitalSignatures;

using (FileStream originalStream = File.OpenRead("pades-lta.pdf"))
using (FileStream outputStream = File.OpenWrite("renewed.pdf"))
{
    outputStream.SetLength(0);
    PdfStreamSigner signer = new PdfStreamSigner(outputStream);
    Telerik.Documents.Fixed.Model.DigitalSignatures.TimeStampServer timeStampServer =
        new TimeStampServer("https://tsa.example.com", TimeSpan.FromSeconds(10));

    signer.RenewDocumentTimestamp(originalStream, timeStampServer);
}

Schedule renewals according to your retention and cryptographic policy. B-LTA does not guarantee indefinite validity.

Validation Information Settings

Configure Signature.Settings.ValidationInformationSettings for B-LT/B-LTA signatures and PdfStreamSigner.ValidationInformationSettings for the standalone operations. Both return a ValidationInformationSettings object.

Resource Limits

The following table lists the settings and their defaults:

PropertyDefaultDescription
AllowedHostsEmpty listExact hostnames or IP addresses allowed to use private network addresses.
RequestTimeout15 secondsMaximum duration of one evidence request.
OperationTimeout2 minutesMaximum duration of the complete evidence retrieval operation.
MaximumRequests32Maximum number of evidence requests.
MaximumTotalEvidenceBytes64 MiBMaximum combined size of downloaded certificates and revocation evidence.

Defaults are also upper limits. Use positive values no greater than the defaults.

Network Policy

Only B-LT/B-LTA signatures and standalone evidence operations collect long-term evidence. Ordinary signing and PDF import do not.

Requests use public endpoints unless their exact hostname or IP address appears in AllowedHosts. Entries cannot be URLs, wildcards, or hostname-and-port pairs. Requests do not follow redirects or use automatic credentials, cookies, or proxies.

HTTPS evidence retrieval requires the .NET 8 or later target assembly. The .NET Standard 2.0 and .NET Framework 4.6.2 assemblies reject HTTPS endpoints even on later runtimes.

HTTP endpoints remain supported, without HTTPS-to-HTTP downgrade. These settings do not control timestamp server requests.

See Also