Last active
July 7, 2023 08:29
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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