GroupDocs.Signature for Java is an advanced Java library to digitally sign documents using various signature types such as text, image, barcode, stamp, form-field, QR-code and metadata. By adding just a few lines of code, empower your Java applications with features to view, add, update, validate, remove and search digital signatures within PDF, Microsoft Word, Excel worksheets, PowerPoint presentations, Adobe Photoshop, metafiles and image file formats. The e-signature API also supports additional features to customize signature properties as per requirements.
The code example below clearly demonstrates the steps about how to edit digital signatures in an already signed TXT file in Java using GroupDocs.Signature library by adding just a few lines of code.
GroupDocs.Signature for Java APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.
Signature signature = new Signature("sampleSigned.pdf");
try
{
ImageSearchOptions options = new ImageSearchOptions();
// search for image signatures in document
List signatures = signature.search(ImageSignature.class,options);
if (signatures.size() > 0)
{
ImageSignature imageSignature = signatures.get(0);
imageSignature.setLeft(100);
imageSignature.setTop(100);
boolean result = signature.update("sampleSigned-output.txt",imageSignature);
if (result)
{
System.out.print("Image signature at location " + imageSignature.getLeft() + "x" + imageSignature.getTop() + " and Size " + imageSignature.getSize() + " was updated in the document [" + fileName + ".");
}
else
{
System.out.print("Signature was not updated in the document! Signature at location " + imageSignature.getLeft() + "x" + imageSignature.getTop() + " and Size " + imageSignature.getSize() + " was not found!");
}
}
} catch (Exception e) {
throw new GroupDocsSignatureException(e.getMessage());
}
Add TXT file electronic signatures right now by visiting GroupDocs.Signature Live Demos website. The live demo has the following benefits
No need to download API
No need to write any code
Just upload the source file
Get download link to save the file
A file with .TXT extension represents a text document that contains plain text in the form of lines. Paragraphs in a text document are recognized by carriage returns and are used for better arrangement of file contents. A standard text document can be opened in any text editor or word processing application on different operating systems. All the text contained in such a file is in human-readable format and represented by sequence of characters. Learn more about TXT file format
Read More What is TXT File FormatMulti-format digital signatures editing API for documents and images. Update signatures from some of the popular file formats as stated below.
(Adobe Portable Document Format)
(Microsoft Word Document)
(Microsoft Word Macro-Enabled Document)
(Microsoft Word Open XML Document)
(Microsoft Word Document Template)
(Word Open XML Document Template)
(Microsoft Word Macro-Enabled Template)
(Rich Text Document)
(Open Document Text)
(OpenDocument Text Template)
(Microsoft Excel Binary File Format)
(Microsoft Excel Open XML Spreadsheet)
(Microsoft Excel Macro-Enabled Spreadsheet)
(Microsoft Excel Macro-Enabled Spreadsheet)
(Microsoft Excel Binary Worksheet)
(Microsoft Excel template)
(Microsoft Excel macro-enabled template)
(Open Document Spreadsheet)
(OpenDocument Spreadsheet Template)
(PowerPoint Presentation)
(PowerPoint Open XML Presentation)
(Microsoft PowerPoint 97-2003 Slide Show)
(PowerPoint Open XML Slide Show)
(Microsoft PowerPoint Macro-Enabled Template)
(Microsoft PowerPoint Template)
(Microsoft PowerPoint Presentation)
(OpenDocument Presentation)
(OpenDocument Presentation Template)
(WebP Image)
(Tagged Image File Format)
(JPEG Image)
(Graphics Interchange Format)
(Portable Network Graphic)
(Bitmap File Format)
(CorelDraw Vector Graphic Drawing)
(Scalable Vector Graphics)
(Adobe Photoshop Document)
(Windows Metafile)
(Enhanced Metafile Format)
(Corel Metafile eXchange Image)
(Deja Vu)
(Microsoft PowerPoint Macro-Enabled Slide Show)
(Digital Imaging and Communications in Medicine)