com.aspose.words

Class SignatureLineOptions

  • java.lang.Object
    • com.aspose.words.SignatureLineOptions
public class SignatureLineOptions 
extends java.lang.Object

Allows to specify options for signature line being inserted. Used in DocumentBuilder.

Constructor Summary
 
Property Getters/Setters Summary
booleangetAllowComments()
void
setAllowComments(booleanvalue)
           Gets or sets a value indicating that the signer can add comments in the Sign dialog. Default value for this property is false.
booleangetDefaultInstructions()
void
           Gets or sets a value indicating that default instructions is shown in the Sign dialog. Default value for this property is true.
java.lang.StringgetEmail()
void
setEmail(java.lang.Stringvalue)
           Gets or sets suggested signer's e-mail address. Default value for this property is empty string.
java.lang.StringgetInstructions()
void
setInstructions(java.lang.Stringvalue)
           Gets or sets instructions to the signer that are displayed on signing the signature line. Default value for this property is empty string.
booleangetShowDate()
void
setShowDate(booleanvalue)
           Gets or sets a value indicating that sign date is shown in the signature line. Default value for this property is true.
java.lang.StringgetSigner()
void
setSigner(java.lang.Stringvalue)
           Gets or sets suggested signer of the signature line. Default value for this property is empty string.
java.lang.StringgetSignerTitle()
void
setSignerTitle(java.lang.Stringvalue)
           Gets or sets suggested signer's title. Default value for this property is empty string.
 

    • Constructor Detail

      • SignatureLineOptions

        public SignatureLineOptions()
    • Property Getters/Setters Detail

      • getAllowComments/setAllowComments

        public boolean getAllowComments() / public void setAllowComments(boolean value)
        
        Gets or sets a value indicating that the signer can add comments in the Sign dialog. Default value for this property is false.

        Example:

        Shows how to sign document with personal certificate and specific signatire line.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        SignatureLineOptions signatureLineOptions = new SignatureLineOptions();
        signatureLineOptions.setSigner("vderyushev");
        signatureLineOptions.setSignerTitle("QA");
        signatureLineOptions.setEmail("vderyushev@aspose.com");
        signatureLineOptions.setShowDate(true);
        signatureLineOptions.setDefaultInstructions(false);
        signatureLineOptions.setInstructions("You need more info about signature line");
        signatureLineOptions.setAllowComments(true);
        
        SignatureLine signatureLine = builder.insertSignatureLine(signatureLineOptions).getSignatureLine();
        signatureLine.setProviderId(UUID.fromString("CF5A7BB4-8F3C-4756-9DF6-BEF7F13259A2"));
        
        doc.save(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx");
        
        SignOptions signOptions = new SignOptions();
        signOptions.setSignatureLineId(signatureLine.getId());
        signOptions.setProviderId(signatureLine.getProviderId());
        signOptions.setComments("Document was signed by vderyushev");
        signOptions.setSignTime(new Date());
        
        CertificateHolder certHolder = CertificateHolder.create(getMyDir() + "morzal.pfx", "aw");
        
        DigitalSignatureUtil.sign(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx", getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId Out.docx", certHolder, signOptions);
      • getDefaultInstructions/setDefaultInstructions

        public boolean getDefaultInstructions() / public void setDefaultInstructions(boolean value)
        
        Gets or sets a value indicating that default instructions is shown in the Sign dialog. Default value for this property is true.

        Example:

        Shows how to sign document with personal certificate and specific signatire line.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        SignatureLineOptions signatureLineOptions = new SignatureLineOptions();
        signatureLineOptions.setSigner("vderyushev");
        signatureLineOptions.setSignerTitle("QA");
        signatureLineOptions.setEmail("vderyushev@aspose.com");
        signatureLineOptions.setShowDate(true);
        signatureLineOptions.setDefaultInstructions(false);
        signatureLineOptions.setInstructions("You need more info about signature line");
        signatureLineOptions.setAllowComments(true);
        
        SignatureLine signatureLine = builder.insertSignatureLine(signatureLineOptions).getSignatureLine();
        signatureLine.setProviderId(UUID.fromString("CF5A7BB4-8F3C-4756-9DF6-BEF7F13259A2"));
        
        doc.save(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx");
        
        SignOptions signOptions = new SignOptions();
        signOptions.setSignatureLineId(signatureLine.getId());
        signOptions.setProviderId(signatureLine.getProviderId());
        signOptions.setComments("Document was signed by vderyushev");
        signOptions.setSignTime(new Date());
        
        CertificateHolder certHolder = CertificateHolder.create(getMyDir() + "morzal.pfx", "aw");
        
        DigitalSignatureUtil.sign(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx", getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId Out.docx", certHolder, signOptions);
      • getEmail/setEmail

        public java.lang.String getEmail() / public void setEmail(java.lang.String value)
        
        Gets or sets suggested signer's e-mail address. Default value for this property is empty string.

        Example:

        Shows how to sign document with personal certificate and specific signatire line.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        SignatureLineOptions signatureLineOptions = new SignatureLineOptions();
        signatureLineOptions.setSigner("vderyushev");
        signatureLineOptions.setSignerTitle("QA");
        signatureLineOptions.setEmail("vderyushev@aspose.com");
        signatureLineOptions.setShowDate(true);
        signatureLineOptions.setDefaultInstructions(false);
        signatureLineOptions.setInstructions("You need more info about signature line");
        signatureLineOptions.setAllowComments(true);
        
        SignatureLine signatureLine = builder.insertSignatureLine(signatureLineOptions).getSignatureLine();
        signatureLine.setProviderId(UUID.fromString("CF5A7BB4-8F3C-4756-9DF6-BEF7F13259A2"));
        
        doc.save(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx");
        
        SignOptions signOptions = new SignOptions();
        signOptions.setSignatureLineId(signatureLine.getId());
        signOptions.setProviderId(signatureLine.getProviderId());
        signOptions.setComments("Document was signed by vderyushev");
        signOptions.setSignTime(new Date());
        
        CertificateHolder certHolder = CertificateHolder.create(getMyDir() + "morzal.pfx", "aw");
        
        DigitalSignatureUtil.sign(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx", getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId Out.docx", certHolder, signOptions);
      • getInstructions/setInstructions

        public java.lang.String getInstructions() / public void setInstructions(java.lang.String value)
        
        Gets or sets instructions to the signer that are displayed on signing the signature line. Default value for this property is empty string.

        Example:

        Shows how to sign document with personal certificate and specific signatire line.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        SignatureLineOptions signatureLineOptions = new SignatureLineOptions();
        signatureLineOptions.setSigner("vderyushev");
        signatureLineOptions.setSignerTitle("QA");
        signatureLineOptions.setEmail("vderyushev@aspose.com");
        signatureLineOptions.setShowDate(true);
        signatureLineOptions.setDefaultInstructions(false);
        signatureLineOptions.setInstructions("You need more info about signature line");
        signatureLineOptions.setAllowComments(true);
        
        SignatureLine signatureLine = builder.insertSignatureLine(signatureLineOptions).getSignatureLine();
        signatureLine.setProviderId(UUID.fromString("CF5A7BB4-8F3C-4756-9DF6-BEF7F13259A2"));
        
        doc.save(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx");
        
        SignOptions signOptions = new SignOptions();
        signOptions.setSignatureLineId(signatureLine.getId());
        signOptions.setProviderId(signatureLine.getProviderId());
        signOptions.setComments("Document was signed by vderyushev");
        signOptions.setSignTime(new Date());
        
        CertificateHolder certHolder = CertificateHolder.create(getMyDir() + "morzal.pfx", "aw");
        
        DigitalSignatureUtil.sign(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx", getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId Out.docx", certHolder, signOptions);
      • getShowDate/setShowDate

        public boolean getShowDate() / public void setShowDate(boolean value)
        
        Gets or sets a value indicating that sign date is shown in the signature line. Default value for this property is true.

        Example:

        Shows how to sign document with personal certificate and specific signatire line.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        SignatureLineOptions signatureLineOptions = new SignatureLineOptions();
        signatureLineOptions.setSigner("vderyushev");
        signatureLineOptions.setSignerTitle("QA");
        signatureLineOptions.setEmail("vderyushev@aspose.com");
        signatureLineOptions.setShowDate(true);
        signatureLineOptions.setDefaultInstructions(false);
        signatureLineOptions.setInstructions("You need more info about signature line");
        signatureLineOptions.setAllowComments(true);
        
        SignatureLine signatureLine = builder.insertSignatureLine(signatureLineOptions).getSignatureLine();
        signatureLine.setProviderId(UUID.fromString("CF5A7BB4-8F3C-4756-9DF6-BEF7F13259A2"));
        
        doc.save(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx");
        
        SignOptions signOptions = new SignOptions();
        signOptions.setSignatureLineId(signatureLine.getId());
        signOptions.setProviderId(signatureLine.getProviderId());
        signOptions.setComments("Document was signed by vderyushev");
        signOptions.setSignTime(new Date());
        
        CertificateHolder certHolder = CertificateHolder.create(getMyDir() + "morzal.pfx", "aw");
        
        DigitalSignatureUtil.sign(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx", getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId Out.docx", certHolder, signOptions);
      • getSigner/setSigner

        public java.lang.String getSigner() / public void setSigner(java.lang.String value)
        
        Gets or sets suggested signer of the signature line. Default value for this property is empty string.

        Example:

        Shows how to sign document with personal certificate and specific signatire line.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        SignatureLineOptions signatureLineOptions = new SignatureLineOptions();
        signatureLineOptions.setSigner("vderyushev");
        signatureLineOptions.setSignerTitle("QA");
        signatureLineOptions.setEmail("vderyushev@aspose.com");
        signatureLineOptions.setShowDate(true);
        signatureLineOptions.setDefaultInstructions(false);
        signatureLineOptions.setInstructions("You need more info about signature line");
        signatureLineOptions.setAllowComments(true);
        
        SignatureLine signatureLine = builder.insertSignatureLine(signatureLineOptions).getSignatureLine();
        signatureLine.setProviderId(UUID.fromString("CF5A7BB4-8F3C-4756-9DF6-BEF7F13259A2"));
        
        doc.save(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx");
        
        SignOptions signOptions = new SignOptions();
        signOptions.setSignatureLineId(signatureLine.getId());
        signOptions.setProviderId(signatureLine.getProviderId());
        signOptions.setComments("Document was signed by vderyushev");
        signOptions.setSignTime(new Date());
        
        CertificateHolder certHolder = CertificateHolder.create(getMyDir() + "morzal.pfx", "aw");
        
        DigitalSignatureUtil.sign(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx", getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId Out.docx", certHolder, signOptions);
      • getSignerTitle/setSignerTitle

        public java.lang.String getSignerTitle() / public void setSignerTitle(java.lang.String value)
        
        Gets or sets suggested signer's title. Default value for this property is empty string.

        Example:

        Shows how to sign document with personal certificate and specific signatire line.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        SignatureLineOptions signatureLineOptions = new SignatureLineOptions();
        signatureLineOptions.setSigner("vderyushev");
        signatureLineOptions.setSignerTitle("QA");
        signatureLineOptions.setEmail("vderyushev@aspose.com");
        signatureLineOptions.setShowDate(true);
        signatureLineOptions.setDefaultInstructions(false);
        signatureLineOptions.setInstructions("You need more info about signature line");
        signatureLineOptions.setAllowComments(true);
        
        SignatureLine signatureLine = builder.insertSignatureLine(signatureLineOptions).getSignatureLine();
        signatureLine.setProviderId(UUID.fromString("CF5A7BB4-8F3C-4756-9DF6-BEF7F13259A2"));
        
        doc.save(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx");
        
        SignOptions signOptions = new SignOptions();
        signOptions.setSignatureLineId(signatureLine.getId());
        signOptions.setProviderId(signatureLine.getProviderId());
        signOptions.setComments("Document was signed by vderyushev");
        signOptions.setSignTime(new Date());
        
        CertificateHolder certHolder = CertificateHolder.create(getMyDir() + "morzal.pfx", "aw");
        
        DigitalSignatureUtil.sign(getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId In.docx", getMyDir() + "\\Artifacts\\DocumentBuilder.SignatureLineProviderId Out.docx", certHolder, signOptions);