Skip to content

Instantly share code, notes, and snippets.

How to Sign DOCX with Barcode Signature using C#. For more information, please follow link: https://kb.groupdocs.com/signature/net/sign-docx-with-barcode-signature-using-csharp/
using GroupDocs.Signature.Domain;
using GroupDocs.Signature.Options;
using GroupDocs.Signature;
namespace SignDOCXwithBarcodeSignatureUsingCSharp
{
internal class Program
{
static void Main(string[] args)
{
// Set License to avoid the limitations of Signature library
License lic = new License();
lic.SetLicense(@"GroupDocs.Signature.lic");
// load the source DOCX file
using (Signature signature = new Signature("input.docx"))
{
// Create Barcode options with predefined Barcode text
BarcodeSignOptions options = new BarcodeSignOptions("JohnSmith")
{
// Setup Barcode encoding type
EncodeType = BarcodeTypes.Code128,
// set signature position
Left = 50,
Top = 150,
Width = 200,
Height = 200
};
// Save the output DOCX file
signature.Sign("output.docx", options);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment