Sign document with Stamp signature - advanced
Leave feedback
On this page
GroupDocs.Signatureย providesย StampSIgnOptionsย classย with additional properties to specify different options for Stamp Signature. This signature type implements stamps with different implementation, forms, lines etc. Each Stamp option contains inner and outer lines. Inner lines represent vertical lines inside the stamp, when outer lines represent circles (or rectangles based on stamp type) around stamp with own text, border settings, background etc
Here are the steps to add Stamp signature into document with GroupDocs.Signature:
Create new instance ofย Signatureย class and pass source document path as a constructor parameter.
Instantiate theย StampSIgnOptionsย object according to your requirements and specify Text Signature options.
Analyzeย SignResultย result to check newly created signatures if needed.
This example shows how to add Stamp signature to document.ย Seeย SignResult
using(Signaturesignature=newSignature(filePath)){// setup options with text of signatureStampSignOptionssignOptions=newStampSignOptions(){Height=300,Width=300,VerticalAlignment=VerticalAlignment.Bottom,HorizontalAlignment=HorizontalAlignment.Right,Margin=newPadding(){Right=10,Bottom=10},Background=newBackground(){Color=Color.DarkOrange},BackgroundColorCropType=StampBackgroundCropType.OuterArea,ImageFilePath=@"center.jpg",BackgroundImageCropType=StampBackgroundCropType.InnerArea,AllPages=true};//add few outer round linessignOptions.OuterLines.Add(newStampLine(){Text="* European Union *",TextRepeatType=StampTextRepeatType.FullTextRepeat,Font=newSignatureFont(){Size=12},Height=22,TextBottomIntent=6,TextColor=Color.WhiteSmoke,BackgroundColor=Color.DarkSlateBlue});signOptions.OuterLines.Add(newStampLine(){Height=2,BackgroundColor=Color.White});signOptions.OuterLines.Add(newStampLine(){Text="* Entrepreneur *",TextRepeatType=StampTextRepeatType.FullTextRepeat,TextColor=Color.DarkSlateBlue,Font=newSignatureFont(){Size=15},Height=30,TextBottomIntent=8,InnerBorder=newBorderLine(){Color=Color.DarkSlateBlue,DashStyle=DashStyle.Dot},OuterBorder=newBorderLine(){Color=Color.DarkSlateBlue},});//Inner square linessignOptions.InnerLines.Add(newStampLine(){Text="John",TextColor=Color.MediumVioletRed,Font=newSignatureFont(){Size=20,Bold=true},Height=40,});signOptions.InnerLines.Add(newStampLine(){Text="Smith",TextColor=Color.MediumVioletRed,Font=newSignatureFont(){Size=20,Bold=true},Height=40});signOptions.InnerLines.Add(newStampLine(){Text="SSN 1230242424",TextColor=Color.MediumVioletRed,Font=newSignatureFont(){Size=12,Bold=true},Height=40,});// sign documentstringsignedPath=@"C:\GroupDocs\Output\Pdf_Documents_Stamp.pdf";signature.Sign(signedPath,signOptions);
More resources
GitHub Examples
You may easily run the code above and see the feature in action in ourย GitHub examples: