DEV Community

Cover image for eSigning - Barcode signature
Atir Tahir
Atir Tahir

Posted on

eSigning - Barcode signature

In this post, we'll explore an eSigning API that allows to add barcode signature(s) within a document.
Supported Barcode Types

  • Codabar
  • Code128
  • Code39Standard
  • Interleaved2of5
  • DutchKIX
  • DotCode
  • EAN8

Please have a look at this full list of supported barcode types.
To specify different options for Barcode signature, GroupDocs.Signature API provides BarcodeSignOptions class.
So, basically you have to specify Encode type and text. Please have a look at the following code snippet:

using (Signature signature = new Signature("sample.pdf"))
    BarcodeSignOptions options = new BarcodeSignOptions("JohnSmith")
        // setup Barcode encoding type
        EncodeType = BarcodeTypes.Code128,
        // set signature position
        Left = 100,
        Top = 100
    signature.Sign("SampleSigned.pdf", options);
Enter fullscreen mode Exit fullscreen mode

This is how output will look like and you can get the encoded information just by scanning the Barcode.
Alt Text

Top comments (0)