Call Sign method of Signature class instance and the instance of signature options (ImageSignOptions for example) to it.
Locate Signature Area with Stretch Mode
This example shows how to locate signature with stretch mode.
using(Signaturesignature=newSignature("sample.pdf")){// define several signature options of different types and settingsTextSignOptionstextOptions=newTextSignOptions("This is test message"){AllPages=true,VerticalAlignment=VerticalAlignment.Top,Margin=newPadding(50),Stretch=StretchMode.PageWidth};BarcodeSignOptionsbarcodeOptions=newBarcodeSignOptions("123456"){AllPages=true,EncodeType=BarcodeTypes.Code128,VerticalAlignment=VerticalAlignment.Bottom,Margin=newPadding(50),Stretch=StretchMode.PageWidth};ImageSignOptionsimageOptions=newImageSignOptions(){AllPages=true,Stretch=StretchMode.PageHeight,HorizontalAlignment=HorizontalAlignment.Right,ImageFilePath=Constants.ImageHandwrite};// define list of signature optionsList<SignOptions>listOptions=newList<SignOptions>();listOptions.Add(textOptions);listOptions.Add(barcodeOptions);listOptions.Add(imageOptions);// sign document to filesignature.Sign("signed.pdf",listOptions);}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples: