Analyzeย SignResultย result to check newly created signatures if needed.
This example shows how to specify different Image signature options. Seeย SignResult
using(Signaturesignature=newSignature("sample.xlsx")){ImageSignOptionsoptions=newImageSignOptions("sample.jpg"){// 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},// set rotationRotationAngle=45,// setup image additional appearance as Brightness and BorderAppearance=newImageAppearance(){Brightness=0.9f},Border=newBorder(){Color=Color.DarkGreen,DashStyle=DashStyle.DashLongDashDot,Transparency=0.5,Visible=true,Weight=2}};// sign document to fileSignResultsignResult=signature.Sign("sgnedSample.xlsx",options);Console.WriteLine("List of newly created signatures:");intnumber=1;foreach(BaseSignaturetempinsignResult.Succeeded){Console.WriteLine($"Signature #{number++}: Type: {temp.SignatureType} Id:{temp.SignatureId}, Location: {temp.Left}x{temp.Top}. Size: {temp.Width}x{temp.Height}");}ย }
More resources
GitHub Examples
You may easily run the code above and see the feature in action in ourย GitHub examples: