GroupDocs.Signature for .NET 23.4 Release Notes
There are about ten features, enhancements, and bug fixes in this release.
Full list of changes in this release
Key | Category | Summary |
---|---|---|
SIGNATURENET-4369 | ★ Feature | Implement support of ZIP File Type |
SIGNATURENET-4442 | ★ Feature | Implement support of TAR File Type |
SIGNATURENET-4452 | ★ Feature | Implement support of 7z File Type |
SIGNATURENET-4479 | ★ Feature | Implement Document Info for archives |
SIGNATURENET-4476 | ✜ Enhancement | Support Succeeded and Failed list as result of processing archives |
SIGNATURENET-4374 | 🔧 Fix | Error on signing Wordprocessing documents digitally with Linux generated certificates |
SIGNATURENET-4373 | 🔧 Fix | Exception on processing Spreadsheets file with Digital signatures with non Win-OS certificates |
SIGNATURENET-4203 | 🔧 Fix | Some tests for PDF throw “Invalid provider type specified” exception |
SIGNATURENET-4169 | 🔧 Fix | Some files couldn’t be processed with curent version of the product |
Major Features
This release includes four new archive features and one enhancement:
- Implement support of ZIP File Type
- Implement support of TAR File Type
- Implement support of 7z File Type
- Implement Document Info for archives
- Support Succeeded and Failed list as result of processing archives
Implement support of ZIP File Type
🌐 New class DocumentResultSignature was added to describe the processed document within the archive file. This class extends BaseSignature and implements IResult interface as container of the process (sign, verify, search) over this particular document. See example below. 🌐 FileTypes was extended with new ZIP supported file type.
/// <summary>
/// Get ZIP file and sign all documents within the archive
/// </summary>
using (var signature = new Signature("sample.zip"))
{
// create sign options
var options = new TextSignOptions("signed!")
{
// set signature position
Left = 100,
Top = 100
};
// sign archive to new zip file
SignResult result = signature.Sign("output.zip", options);
// analyze signed documents
Console.WriteLine("\nList of successfully signed documents:");
foreach (DocumentResultSignature document in signResult.Succeeded)
{
Console.WriteLine($"Document {document.FileName} was signed with. Processing time: {document.ProcessingTime}, mls");
}
}
Implement support of TAR File Type
🌐 FileTypes was extended with new TAR supported file type.
/// <summary>
/// Get TAR file and sign all documents within the archive
/// </summary>
using (var signature = new Signature("sample.tar"))
{
// create list of signature options
BarcodeSignOptions bcOptions1 = new BarcodeSignOptions("12345678", BarcodeTypes.Code128)
{
Left = 100,
Top = 100
};
QrCodeSignOptions qrOptions2 = new QrCodeSignOptions("12345678", QrCodeTypes.QR)
{
Left = 400,
Top = 400
};
List<SignOptions> listOptions = new List<SignOptions>() { bcOptions1, qrOptions2 };
// sign archive to new tar file with list of options
SignResult result = signature.Sign("output.tar", listOptions);
// analyze signed documents
Console.WriteLine("\nList of successfully signed documents:");
foreach (DocumentResultSignature document in signResult.Succeeded)
{
Console.WriteLine($"Document {document.FileName} was signed with. Processing time: {document.ProcessingTime}, mls");
}
}
Implement support of 7z File Type
🌐 FileTypes was extended with new SevenZip supported file type.
/// <summary>
/// Get 7z file and sign all documents within the archive
/// </summary>
using (var signature = new Signature("sample.7z"))
{
// create sign options
var options = new TextSignOptions("signed!")
{
// set signature position
Left = 100,
Top = 100
};
// sign archive to new 7z file
SignResult result = signature.Sign("output.7z", options);
// analyze signed documents
Console.WriteLine("\nList of successfully signed documents:");
foreach (DocumentResultSignature document in signResult.Succeeded)
{
Console.WriteLine($"Document {document.FileName} was signed with. Processing time: {document.ProcessingTime}, mls");
}
}
Implement Document Info for archives
🌐 Class DocumentInfo was extended with the new property Documents to represent the list of the document info with the archives.
/// <summary>
/// Get zip file and obtain documents information with the archive
/// </summary>
using (var signature = new Signature("sample.zip"))
{
IDocumentInfo documentInfo = signature.GetDocumentInfo();
Console.WriteLine($"Archive properties {Path.GetFileName(certificatePath)}:");
Console.WriteLine($" - format : {documentInfo.FileType.FileFormat}");
Console.WriteLine($" - extension : {documentInfo.FileType.Extension}");
Console.WriteLine($" - size : {documentInfo.Size}");
Console.WriteLine($" - documents count : {documentInfo.PageCount}");
// display each document information
Console.WriteLine($"Documents information:");
foreach (DocumentResultSignature document in documentInfo.Documents)
{
Console.WriteLine($"Document: {document.FileName}. {document.SourceDocumentSize} /{document.DestinDocumentSize}");
}
}
Support Succeeded and Failed list as result of processing archives
🌐 The SignResult will keep the list of succeeded and failed DocumentResultSignature elements in the result of the Sign method.
/// <summary>
/// Support Succeeded and Failed list as result of processing archives
/// </summary>
using (var signature = new Signature("sample.zip"))
{
// create sign options
var options = new TextSignOptions("signed!")
{
// set signature position
Left = 100,
Top = 100
};
// sign archive to new zip file
SignResult result = signature.Sign("output.zip", options);
// analyze signed documents
foreach (DocumentResultSignature document in result.Succeeded)
{
Console.WriteLine($"Document {document.FileName}. Processed: {document.ProcessingTime}, mls");
}
if (signResult.Failed.Count > 0)
{
Console.WriteLine("\nList of failed documents:");
number = 1;
foreach (DocumentResultSignature document in result.Failed)
{
Console.WriteLine($"Document {document.FileName}. Processed: {document.ProcessingTime}, mls");
}
}
}