Skip to main content

TimestampServer

Version: 9.0

cete.dynamicpdf.timestampserver

TimestampServer​

Represents a class which contains the Timestamp Server details.

public class TimestampServer
Public Class TimestampServer

Inheritance: Object → TimestampServer

Examples​

This example shows how to create a signature and sign it with a certificate using timestamp server.

Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms

Module MyModule

Sub Main()

' Create a PDF Document
Dim MyDocument As Document = New Document

' Create a PDF Page
Dim MyPage As Page = New Page

' Create a signature form field
Dim MySignature As Signature = New Signature("SigField", 10, 10, 250, 100)

' Add signature field to the page
MyPage.Elements.Add(MySignature)

' Add the page to the document
MyDocument.Pages.Add(MyPage)

' Create a Certificate
Dim MyCertificate As Certificate = New Certificate("C:\PersonalCertificate.pfx", "CertificatePassword")

' Create a TimestampServer
Dim MyTimeStampServer as TimestampServer = New TimestampServer("Url of the Timestamp Server")

' Sign the document referring the sign field
MyDocument.Sign("SigField", MyCertificate, MyTimeStampServer)

' Save the document
MyDocument.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");
}
}

Constructors​

TimestampServer(String)​

Initializes a new instance of TimestampServer class.

public TimestampServer(string tsUrl)
Public Sub New (tsUrl As String)

Parameters​

Web Url of TSA.

TimestampServer(String, String, String)​

Initializes a new instance of TimestampServer class.

public TimestampServer(string tsUrl, string userName, string password)
Public Sub New (tsUrl As String, userName As String, password As String)

Parameters​

Web Url of TSA.

UserName to use for the connection.

Password to use for the connection.

Properties​

Password​

Gets or Sets the Password to use for the connection.

public string Password { get; set; }
Public Property Password As String

Property Value​

String

Timeout​

Gets or Sets the Timeout for the connection.

public int Timeout { get; set; }
Public Property Timeout As Int32

Property Value​

Int32

Url​

Gets or Sets the Url of the TSA.

public string Url { get; set; }
Public Property Url As String

Property Value​

String

UserName​

Gets or Sets the UserName to use for the connection.

public string UserName { get; set; }
Public Property UserName As String

Property Value​

String

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF