GroupDocs.Signatureย provides withย SignOptionsย propertyย Extensions that expects list of different extensions classes. At this moment here are few of them
SpreadsheetPositionย that allows to specify for Spreadsheet documents signature position as Row and Column numbers
TextShadowย alternative extension for Text signature property
Here are the steps to add extensions to signature into document with GroupDocs.Signature:
Create new instance ofย Signatureย class and pass source document path as a constructor parameter.
Instantiate theย SignOptionsย object with all required additional options.
This example shows how to add Text signature to document.
using(Signaturesignature=newSignature("sample.pdf")){TextSignOptionsoptions=newTextSignOptions("John Smith"){// set signature positionLeft=100,Top=100,// set signature rectangleWidth=100,Height=30,// set signature alignment// when VerticalAlignment is set the Top coordinate will be ignored.// Use Margin properties Top, Bottom to provide vertical offsetVerticalAlignment=Domain.VerticalAlignment.Top,// when HorizontalAlignment is set the Left coordinate will be ignored.// Use Margin properties Left, Right to provide horizontal offsetHorizontalAlignment=Domain.HorizontalAlignment.Right,Margin=newPadding(){Top=20,Right=20},// adjust signature appearance// setup signature borderBorder=newBorder(){Color=Color.DarkGreen,DashStyle=DashStyle.DashLongDashDot,Transparency=0.5,Visible=true,Weight=2},// set text color and FontForeColor=Color.Red,Font=newSignatureFont{Size=12,FamilyName="Comic Sans MS"},// setup backgroundBackground=newBackground(){Color=Color.LimeGreen,Transparency=0.5,Brush=newLinearGradientBrush(Color.LimeGreen,Color.DarkGreen)},// set rotationRotationAngle=45,// set alternative signature implementation on document pageSignatureImplementation=TextSignatureImplementation.Image};// set up shadow options for textTextShadowshadow=newTextShadow();shadow.Color=Color.OrangeRed;shadow.Angle=135;shadow.Blur=5;shadow.Distance=4;shadow.Transparency=0.2;//add text shadow to signature extensionsoptions.Extensions.Add(shadow);// specify Spreadsheet position over extensionoptions.Extensions.Add(newSpreadsheetPosition(10,10));ย // sign document to filesignature.Sign("signed.pdf",options);}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in ourย GitHub examples: