A barcode or bar code is a way of presenting data in a visual, machine-readable form. Generally speaking, barcode is an image of rectangular form that consists of parallel black lines and white spaces of different widths. Barcodes are used in various areas where quick identification is necessary - as part of the purchase process in retail stores, in warehouses to track inventory, and on invoices to assist in accounting, among many other uses.
Barcodes allow to store product related data like manufacturing and expiry dates, manufacturer name, country of the origin and product price. There are plenty of barcode types nowadays because different companies use different amount of number and bar combinations in their barcodes dependent on their needs. From document signature perspective Barcode may contain different characters (letters, digits or symbols) and have a various length and its size depending on the type and settings to keep signature information, title, subject or short encrypted data.
eSign document with Barcode signature
GroupDocs.Signature for Java supports wide range or Barcode types that can be used to create electronic signature within the documents. Please refer to BarcodeTypes description to get the full list of supported barcodes. To specify different options for Barcode signature GroupDocs.Signature for Java provides BarcodeSignOptions class. The main fields are:
getEncodeType - specifies Barcode type (AustralianPost, Codabar, EAN13, OPC, etc.);
Here are the steps to eSign document with Barcode signature using GroupDocs.Signature for .NET API:
Create new instance of Signature class and pass source document path as a constructor parameter.
Instantiate the BarcodeSignOptions object according to your requirements and specify Barcode type by setting setEncodeType from predefined supported types. Set setText property value.
This example shows how to sign PDF document with Barcode signature.
Signaturesignature=newSignature("sample.pdf");try{// setup options with text of signature
BarcodeSignOptionssignOptions=newBarcodeSignOptions("12345678");// setup Barcode encoding type
signOptions.setEncodeType(BarcodeTypes.Code128);// set signature position
signOptions.setLeft(100);signOptions.setTop(100);// sign document
signature.sign("SampleSigned.pdf",signOptions);}catch(Exceptione){thrownewGroupDocsSignatureException(e.getMessage());}
More resources
Advanced Usage Topics
To learn more about document eSign features, please refer to the advanced usage section.
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
Along with full-featured .NET library we provide simple, but powerful free Apps. You are welcome to eSign PDF, Word, Excel, PowerPoint documents with free to use online GroupDocs Signature App.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.