Aspose::Words::Drawing::SignatureLine class
Contents
[
Hide
]SignatureLine class
Provides access to signature line properties. To learn more, visit the Work with Digital Signatures documentation article.
class SignatureLine : public System::Object
Methods
Method | Description |
---|---|
get_AllowComments() | Gets or sets a value indicating that the signer can add comments in the Sign dialog. Default value for this property is false. |
get_DefaultInstructions() | Gets or sets a value indicating that default instructions is shown in the Sign dialog. Default value for this property is true. |
get_Email() | Gets or sets suggested signer’s e-mail address. Default value for this property is empty string. |
get_Id() | Gets or sets identifier for this signature line. This identifier can be associated with a digital signature, when signing document using DigitalSignatureUtil. This value must be unique and by default it is randomly generated new Guid (NewGuid). |
get_Instructions() | Gets or sets instructions to the signer that are displayed on signing the signature line. This property is ignored if DefaultInstructions is set. Default value for this property is empty string. |
get_IsSigned() | Indicates that signature line is signed by digital signature. |
get_IsValid() | Indicates that signature line is signed by digital signature and this digital signature is valid. |
get_ProviderId() | Gets or sets signature provider identifier for this signature line. Default value is “{00000000-0000-0000-0000-000000000000}”. |
get_ShowDate() | Gets or sets a value indicating that sign date is shown in the signature line. Default value for this property is true. |
get_Signer() | Gets or sets suggested signer of the signature line. Default value for this property is empty string. |
get_SignerTitle() | Gets or sets suggested signer’s title (for example, Manager). Default value for this property is empty string. |
GetType() const override | |
Is(const System::TypeInfo&) const override | |
set_AllowComments(bool) | Setter for Aspose::Words::Drawing::SignatureLine::get_AllowComments. |
set_DefaultInstructions(bool) | Setter for Aspose::Words::Drawing::SignatureLine::get_DefaultInstructions. |
set_Email(const System::String&) | Setter for Aspose::Words::Drawing::SignatureLine::get_Email. |
set_Id(System::Guid) | Setter for Aspose::Words::Drawing::SignatureLine::get_Id. |
set_Instructions(const System::String&) | Setter for Aspose::Words::Drawing::SignatureLine::get_Instructions. |
set_ProviderId(System::Guid) | Setter for Aspose::Words::Drawing::SignatureLine::get_ProviderId. |
set_ShowDate(bool) | Setter for Aspose::Words::Drawing::SignatureLine::get_ShowDate. |
set_Signer(const System::String&) | Setter for Aspose::Words::Drawing::SignatureLine::get_Signer. |
set_SignerTitle(const System::String&) | Setter for Aspose::Words::Drawing::SignatureLine::get_SignerTitle. |
static Type() |
Examples
Shows how to create a line for a signature and insert it into a document.
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
auto options = MakeObject<SignatureLineOptions>();
options->set_AllowComments(true);
options->set_DefaultInstructions(true);
options->set_Email(u"john.doe@management.com");
options->set_Instructions(u"Please sign here");
options->set_ShowDate(true);
options->set_Signer(u"John Doe");
options->set_SignerTitle(u"Senior Manager");
// Insert a shape that will contain a signature line, whose appearance we will
// customize using the "SignatureLineOptions" object we have created above.
// If we insert a shape whose coordinates originate at the bottom right hand corner of the page,
// we will need to supply negative x and y coordinates to bring the shape into view.
SharedPtr<Shape> shape = builder->InsertSignatureLine(options, RelativeHorizontalPosition::RightMargin, -170.0, RelativeVerticalPosition::BottomMargin,
-60.0, WrapType::None);
ASSERT_TRUE(shape->get_IsSignatureLine());
// Verify the properties of our signature line via its Shape object.
SharedPtr<SignatureLine> signatureLine = shape->get_SignatureLine();
ASSERT_EQ(u"john.doe@management.com", signatureLine->get_Email());
ASSERT_EQ(u"John Doe", signatureLine->get_Signer());
ASSERT_EQ(u"Senior Manager", signatureLine->get_SignerTitle());
ASSERT_EQ(u"Please sign here", signatureLine->get_Instructions());
ASSERT_TRUE(signatureLine->get_ShowDate());
ASSERT_TRUE(signatureLine->get_AllowComments());
ASSERT_TRUE(signatureLine->get_DefaultInstructions());
doc->Save(ArtifactsDir + u"Shape.SignatureLine.docx");
See Also
- Namespace Aspose::Words::Drawing
- Library Aspose.Words for C++