TimestampServer

Represents a class which contains the Timestamp Server details.

public class TimestampServer
Public Class TimestampServer

Inheritance: ObjectTimestampServer

Examples

This example shows how to create a signature and sign it with a certificate using timestamp server.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Forms
Imports ceTe.DynamicPDF.Text
    
Module MyModule
    
    Sub Main()
        'Create a PDF Document
        Dim document As Document = New Document
    
        'Create a Page
        Dim page As Page = New Page
    
        'Create a signature form field
        Dim signature As Signature = New Signature("SigField", 10, 10, 250, 100)
    
        ' Add signature field to the page
        page.Elements.Add(signature)
    
        ' Add the page to the document
        document.Pages.Add(page)
    
        'Create a Certificate from the file
        Dim certificate As Certificate = New Certificate("c:\MyPersonalCertificate.pfx", "CertificatePassword")
    
        'Create TimestampServer
        Dim timestampServer As TimestampServer = New TimestampServer("Url of the Timestamp Server")
    
        ' Sign the document referring the sign field
        document.Sign("SigField", certificate, timestampServer)
    
        ' Save the document
        document.Draw("C:\MySignedDocument.pdf")
    End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
      
class MyClass
{
    static void Main(string[] args)
    {
        // Create a PDF Document
        Document document = new Document();
      
        // Create a PDF Page
        Page page = new Page();
      
        // Create a signature form field
        Signature signature = new Signature("SigField", 10, 10, 250, 100);        
      
        // Add signature field to the page
        page.Elements.Add(signature);
      
        // Add the page to the document
        document.Pages.Add(page);
      
        // Create a Certificate from the file
        Certificate certificate = new Certificate(@"c:\MyPersonalCertificate.pfx", "CertificatePassword");
             
        // Create TimestampServer
        TimestampServer timestampServer = new TimestampServer("Url of the Timestamp Server");
     
        // Sign the document referring the sign field
        document.Sign("SigField", certificate, timestampServer);
      
        // Save the document
        document.Draw(@"C:\MySignedDocument.pdf");        
    }
}

Remarks

This class is not available for .NET standard.

Constructors

TimestampServer(String)Initializes a new instance of TimestampServer class.
TimestampServer(String, String, String)Initializes a new instance of TimestampServer class.

Properties

HashAlgorithmOidGet or Sets the oid of the hash algorithm to be used.
PasswordGets or Sets the Password to use for the connection.
TimeoutGets or Sets the Timeout for the connection.
UrlGets or Sets the Url of the TSA.
UserNameGets or Sets the UserName to use for the connection.

Methods

Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF

In this topic