Elevate your C# and .NET applications with Aspose.Words for .NET API and experience the latest advancements in document processing and reporting.
API provides the ability to retrieve the electronic signature value from a digitally signed document as a byte array for verification purposes.
Verify the authenticity of digitally signed documents by extracting the digital signature value.
This following C# sample code shows how to obtain digital signature value as byte array from a Word® document (.DOCX) using API:
Document doc = new Document("docWithSign.docx");
foreach (DigitalSignature digitalSignature in doc.DigitalSignatures)
{
string signatureValue = Convert.ToBase64String(digitalSignature.SignatureValue);
Console.WriteLine("Base64 signature value is: {0}", signatureValue);
}
// The code produces the following output:
// Base64 signature value is: AJjRFbflcj+H7VUZ9Q/9rpbavjT7TC10M5orYCRYnEIwyPCtTman8+na4ynclQtBFFgT7uJoHyuHStleXwnbbj6AVNp/B1oCtlEcg9t7WjsgLlm7LQsr6PCCCkgWYNEOwe3s6Wpfop9qkyEEBxATgfpfbbdodB/wO0elS/Ei+dfUmu
Source*
Save document pages or shapes to the EPS format for high-quality output and compatibility with various applications. Enhance document sharing and compatibility with EPS export capabilities.
The document page or shape could be saved into EPS format now. A new EPS value is added into SaveFormat
Enum.
Please check the below C# code that demonstrates how to save DOCX as EPS image, using API:
// Open some document.
Document doc = new Document("document.docx");
// Save the second page as EPS image.
ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFormat.Eps);
saveOptions.PageSet = new PageSet(1);
doc.Save("image.eps", saveOptions);
Source*
More Control over Table Elements
Enhanced Row
and Cell
Classes expand your control over table elements with new public members added to the Row
and Cell
classes.
The following public properties have been added to the Row
class:
The following public properties have been added to the Cell
class:
This C# example code shows how to enumerate through all table cells, using API:
Document doc = new Document(fileName);
Table table = doc.FirstSection.Body.Tables[0];
// Enumerate through all cells of the table.
for (Row row = table.FirstRow; row != null; row = row.NextRow)
{
for (Cell cell = row.FirstCell; cell != null; cell = cell.NextCell)
{
Console.WriteLine(cell.GetText());
}
}
Source*
Mustache Support for Mail Merge
Leverage Mustache tags within MailMerge.GetRegionsHierarchy
and MailMerge.GetFieldNamesForRegion
methods for enhanced templating capabilities.
Simplify Mail Merge templating using Mustache tags for enhanced flexibility.
Now the MailMerge.GetRegionsHierarchy
method returns mustache regions and mustache fields when the MailMerge.UseNonMergeFields
option is true
.
Now the MailMerge.GetFieldNamesForRegion
method accepts mustache region names and returns mustache field names when the MailMerge.UseNonMergeFields
option is true
.
The MustacheTag
class has been introduced:
The following C# code example explains how to use MustacheTag
, using API:
Document document = new Document("Template.docx");
document.MailMerge.UseNonMergeFields = true;
MailMergeRegionInfo hierarchy = document.MailMerge.GetRegionsHierarchy();
foreach (MustacheTag mustacheTag in hierarchy.MustacheTags)
Console.WriteLine(mustacheTag.Text);
foreach (MailMergeRegionInfo region in hierarchy.Regions)
{
Console.WriteLine(region.StartMustacheTag.Text);
Console.WriteLine(region.EndMustacheTag.Text);
}
Source*
In summary, this code is used to load a Word document, configure mail merge options, retrieve information about mail merge regions and Mustache tags, and then print that information to the console. The Aspose.Words library is employed for interacting with Word documents and handling mail merge functionality.
For a complete list of features, enhancements, and bug fixes in this release please visit, Aspose.Words for .NET 23.7 Release Notes.