Analyze SignResult result to check newly created signatures if needed.
This example shows how to specify different Image signature options. See SignResult
Signaturesignature=newSignature(sample.xlsx);ImageSignOptionsoptions=newImageSignOptions("sample.jpg");// set signature position
options.setLeft(100);options.setTop(100);// set signature rectangle
options.setWidth(100);options.setHeight(30);// set signature alignment
// when VerticalAlignment is set the Top coordinate will be ignored.
// Use Margin properties Top, Bottom to provide vertical offset
options.setVerticalAlignment(VerticalAlignment.Top);// when HorizontalAlignment is set the Left coordinate will be ignored.
// Use Margin properties Left, Right to provide horizontal offset
options.setHorizontalAlignment(HorizontalAlignment.Right);Paddingpadding=newPadding();padding.setRight(20);padding.setTop(20);options.setMargin(padding);// set rotation
options.setRotationAngle(45);//setup signature border
Borderborder=newBorder();border.setColor(Color.GREEN);border.setDashStyle(DashStyle.DashLongDashDot);border.setWeight(5);border.setVisible(true);options.setBorder(border);// sign document to file
SignResultsignResult=signature.sign("sgnedSample.xlsx",options);// analyzing result
System.out.print("List of newly created signatures:");intnumber=1;for(BaseSignaturetemp:signResult.getSucceeded()){System.out.print("Signature #"+number+++": Type: "+temp.getSignatureType()+" Id:"+temp.getSignatureId()+",Location: "+temp.getLeft()+"x"+temp.getTop()+". Size: "+temp.getWidth()+"x"+temp.getHeight());}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
Along with full-featured .NET library we provide simple, but powerful free Apps. You are welcome to eSign PDF, Word, Excel, PowerPoint documents with free to use online GroupDocs Signature App.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.