Last active
October 22, 2023 09:03
-
-
Save groupdocs-com-kb/e19687eb2d4c52fa8d9df78c9a61f824 to your computer and use it in GitHub Desktop.
How to Add Text Signature to RTF using C#. For more information, please follow link: https://kb.groupdocs.com/signature/net/how-to-add-text-signature-to-rtf-using-csharp/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using GroupDocs.Signature.Domain; | |
using GroupDocs.Signature.Options; | |
using GroupDocs.Signature; | |
namespace AddTextSignaturetoRTFUsingCSharp | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Set License to avoid the limitations of Signature library | |
License lic = new License(); | |
lic.SetLicense(@"GroupDocs.Signature.lic"); | |
// load the source RTF file | |
using (Signature signature = new Signature("input.RTF")) | |
{ | |
// Set required options for text signature | |
TextSignOptions options = new TextSignOptions("John Doe") | |
{ | |
Left = 100, | |
Top = 100, | |
Width = 200, | |
Height = 50, | |
ForeColor = System.Drawing.Color.Red, | |
Font = new SignatureFont { Size = 12, FamilyName = "Arial", Italic = true }, | |
Text = "Sign RTF using Text Signature", | |
DocumentType = DocumentType.WordProcessing, | |
Border = new Border { Visible = true } | |
}; | |
// Save and sign the output RTF | |
signature.Sign("output.rtf", options); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment