GroupDocs.Signature for .NET is a comprehensive library that allows you to sign PDF, Word, Excel, JPG, and Presentation documents using various electronic signatures like text, image, barcode, QR code, metadata, form field, and digital signatures. With this API, you can also create, search, and verify electronic signatures for popular document formats, and customize your signing options to fit your needs.
$ dotnet add package GroupDocs.Signature
This on-premise .NET API lets your app end-users sign the electronic documents from a wide range of file formats. Supports several types of e-signing methods.
The following section lists the supported file formats for the barcode, image, QR-code, stamp, and text signature types:
Microsoft Word: DOC, DOCM, DOCX, DOT, DOTM, DOTX
Microsoft Excel: XLSX, XLS, XLSB, XLSM, XLTX, XLTM
Microsoft PowerPoint: PPTX, PPTM, PPT, PPSX, PPSM, PPS, POTX, POTM
OpenOffice: ODT, OTT, ODS, OTS, ODP, OTP
Image: BMP, DJVU, GIF, JPG, JPEG, PNG, SVG, TIF, TIFF, WEBP
CorelDraw: CDR, CMX
Photoshop: PSD
Metafile: WMF
Portable: PDF
Microsoft Word: DOC, DOCM, DOCX, DOT, DOTM, DOTX
Microsoft Excel: XLSX, XLS, XLSB, XLSM, XLTX, XLTM
OpenOffice: ODS, OTS
Portable: PDF
Microsoft Word: DOC, DOCM, DOCX, DOT, DOTM, DOTX
Microsoft Excel: XLSX, XLS, XLSB, XLSM, XLTX, XLTM
OpenOffice: ODS, OTS, ODP
Portable: PDF
Microsoft Word: DOC, DOCM, DOCX, DOT, DOTM, DOTX
Microsoft Excel: XLSX, XLS, XLSB, XLSM, XLTX, XLTM
Microsoft PowerPoint: PPTX, PPTM, PPT, PPSX, PPSM, PPS, POTX, POTM
OpenOffice: ODT, OTT, ODS, OTS, ODP, OTP
Image: JPG, JPEG, PNG, SVG, TIF, TIFF
Photoshop: PSD
Portable: PDF
GroupDocs.Signature for .NET does not require any external software or third-party tool to be installed. GroupDocs.Signature for .NET supports any 32-bit or 64-bit operating system where .NET or Mono framework is installed. The other details are as follows:
Microsoft Windows: Microsoft Windows Desktop (x86, x64) (XP & up), Microsoft Windows Server (x86, x64) (2000 & up), Windows Azure
Mac OS: Mac OS X
Linux: Linux (Ubuntu, OpenSUSE, CentOS and others)
Development Environments: Microsoft Visual Studio (2010 & up), Xamarin.Android, Xamarin.IOS, Xamarin.Mac, MonoDevelop 2.4 and later.
Supported Frameworks: GroupDocs.Conversion for .NET supports .NET and Mono frameworks.
Are you ready to give GroupDocs.Signature for .NET a try? Simply execute Install-Package GroupDocs.Signature from Package Manager Console in Visual Studio to fetch & reference GroupDocs.Signature assembly in your project. If you already have GroupDocs.Signature for .Net and want to upgrade it, please execute Update-Package GroupDocs.Signature to get the latest version.
Please check the GitHub Repository for other common usage scenarios.
The example below shows how to sign a PDF document with a digital e-signature using C# language. We can sign any other supported document format in the same way
using (Signature signature = new Signature("sample.pdf"))
{
// initialize digital option with certificate file path
DigitalSignOptions options = new DigitalSignOptions("certificate.pfx")
{
// set signature position
Left = 100,
Top = 100,
Password = "1234567890"
};
signature.Sign("signed.pdf", options);
}
The code snippet below demonstrates how to sign a PDF document with the QR code signature
using (Signature signature = new Signature("sample.pdf"))
{
// create QRCode option with predefined QRCode text
QrCodeSignOptions options = new QrCodeSignOptions("JohnSmith")
{
// setup QRCode encoding type
EncodeType = QrCodeTypes.QR,
// set signature position
Left = 100,
Top = 100
};
signature.Sign("signed.pdf", options);
}
This example shows how to verify Digital signature in the document
using (Signature signature = new Signature("sample.pdf"))
{
DigitalVerifyOptions options = new DigitalVerifyOptions("certificate.pfx")
{
Comments = "Test comment"
};
// verify document signatures
VerificationResult result = signature.Verify(options);
if (result.IsValid)
{
Console.WriteLine("\nDocument was verified successfully!");
}
else
{
Console.WriteLine("\nDocument failed verification process.");
}
}
This example shows how to search for Digital signature in the document and analyze digital signature certificate
using (Signature signature = new Signature("spreadsheet.xlsx"))
{
// search for signatures in document
List<DigitalSignature> signatures = signature.Search<DigitalSignature>(SignatureType.Digital);
Console.WriteLine("\nSource document contains following signatures.");
foreach (var digitalSignature in signatures)
{
Console.WriteLine("Digital signature found from {0} with validation flag {1}. Certificate SN {2}",
digitalSignature.SignTime, digitalSignature.IsValid, digitalSignature.Certificate?.SerialNumber);
}
}
This example shows how to delete Digital signature that was found using Search method
using (Signature signature = new Signature("signed.pdf"))
{
List<DigitalSignature> signatures =
signature.Search<DigitalSignature>(SignatureType.Digital);
if (signatures.Count > 0)
{
DigitalSignature digitalSignature = signatures[0];
bool result = signature.Delete(digitalSignature);
if (result)
{
Console.WriteLine(
$"Digital signature #{digitalSignature.Thumbprint} from " +
$"{digitalSignature.SignTime.ToShortDateString()} was deleted."
);
}
else
{
Console.WriteLine(
$"Signature was not deleted from the document! " +
$"Signature# {digitalSignature.Thumbprint} was not found!"
);
}
}
}
This example shows how to specify extra appearances
using (Signature signature = new Signature("sample.docx"))
{
DigitalSignOptions options = new DigitalSignOptions("certificate.pfx")
{
// certifiate password
Password = "1234567890",
// digital certificate details
Reason = "Sign",
Contact = "JohnSmith",
Location = "Office1",
// image as digital certificate appearance on document pages
ImageFilePath = imagePath,
//
AllPages = true,
Width = 80,
Height = 60,
VerticalAlignment = VerticalAlignment.Bottom,
HorizontalAlignment = HorizontalAlignment.Right,
Margin = new Padding() { Bottom = 10, Right = 10 },
// Setup signature line appearance.
// This appearance will add Signature Line on the first page.
// Could be useful for .xlsx files.
Appearance = new DigitalSignatureAppearance("John Smith", "Title", "jonny@test.com")
};
signature.Sign("signed.docx", options);
}
Document Singing | Digital Signature| Sign PDF | Sign DOCX | Sign XLSX | Sign Digitally| Digital Signature| esing| Cross Platform | Document Manipulation | High Performance | DotNet | API | Signature Verification | GroupDocs.Signature | Secure Signing | Document Security | Digital Certificate | X.509 Certificate | Batch Signing | Signature Management | Code Signing | Signature Workflow | Digital Signature API | Electronic Signature API | GroupDocs SDK | Document Integrity | Multi-format Signing