PNG JPG BMP TIFF HTML
  Product Family

eSign HTML Formats in C#

Native and high performance HTML document electronic signature using server-side .NET APIs, without the use of any software like Microsoft or Open Office, Adobe PDF.

How to Digitally Sign HTML File Using C#

In order to electronically sign HTML file, we’ll use

Aspose.Words for .NET

API which is a feature-rich, powerful and easy to use digital signature API for C# platform. Open

NuGet

package manager, search for Aspose.Words and install. You may also use the following command from the Package Manager Console.

Command


PM> Install-Package Aspose.Words

Steps for e-Signing HTML Files in C#

A basic document digital signature using .NET API can be done with just few lines of code. One can add electronic signature as drawing, text and images to multiple files. Moreover, eSigned documents can be saved as PDF, JPEG, HTML, OpenOffice and other formats.

  • Load all the HTML files with full path.
  • Set the style of text like font, font size, color etc.
  • Set the Signature text.
  • Save HTML file, You will get the document with signature inserted.

System Requirements

Our APIs are supported on all major platforms and Operating Systems. Before executing the code below, please make sure that you have the following prerequisites on your system.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
  • Development environment like Microsoft Visual Studio
  • Aspose.Words for .NET DLL referenced in your project - Install from NuGet using the Download button above
 

e-Sign HTML Files - C#

var doc = new Document("My File.html");
var builder = new DocumentBuilder(doc);
builder.MoveToDocumentEnd();
Color color = Color.Black;
var font = builder.Font;
font.Size = 16;
font.Bold = true;
font.Color = color;
font.Name = "Arial";

var paragraph = builder.ParagraphFormat;
paragraph.Alignment = ParagraphAlignment.Right;
builder.Writeln("Signature Text");
doc.UpdatePageLayout();
doc.Save("Saved File.html", Aspose.Words.SaveFormat.html);   
 
  • .NET Words API can be used to load, view and convert Microsoft Word and OpenDocument Formats like DOC, DOCX, ODT to PDF, XPS, HTML and various other formats. You can also create new documents from scratch and save them in the supported formats. It is a standalone API that is suitable for server side and backend systems where high performance is required. It does not depend on any software like Microsoft or OpenOffice. ‎

    Online HTML eSignature Live Demos

    Other Supported Files for Electronic Signatures

    Using C#, One can also digitally sign many other formats including.

    DOC (Microsoft Word Binary Format)
    DOCX (Office 2007+ Words Document)
    DOT (Microsoft Word Template Files)
    DOTX (Microsoft Word Template File)
    ODT (OpenDocument Text File Format)
    OTT (OpenDocument Standard Format)
    RTF (Rich Text Format)
    TXT (Text Document)
    XHTML (XML Text Based Markup)