GroupDocs.Signature for .NET 26.6 已发布。此版本为 WordProcessing 文档添加了 OOXML 合规性控制,优化了归档文件和多层图像的试用模式体验,并引入了多框架 NuGet 交付模型,提供针对每个 TFM 的专用包。
What’s new in this release
| 关键字 | 类别 | 摘要 |
|---|---|---|
| SIGNATURENET-5634 | 功能 | 支持并遵守 WordProcessing 文档的 OOXML 合规性 |
| SIGNATURENET-5822 | 增强 | 多框架 NuGet 打包和 TFM 拆分包 |
| SIGNATURENET-5825 | 增强 | 重构试用许可证限制 |
| SIGNATURENET-5705 | 增强 | 内部改进 |
New features
Support and respect OOXML compliance for WordProcessing documents
GroupDocs.Signature 现在会保留 WordProcessing 文档的原始 OOXML 合规级别,并允许通过 API 在保存时覆盖该设置。
更改内容:
- 当文档加载时检测原始
OoxmlCompliance值,默认在保存时保持不变。 WordProcessingSaveOptions公开了一个新的可空OoxmlCompliance属性。为null(默认)时保留加载文档的合规性;设置后会覆盖源值。- 仅在以下 OOXML 输出格式中生效:
Docx、Docm、Dotx、Dotm以及它们的FlatOpc变体。
新枚举:
public enum OoxmlCompliance
{
/// <summary>Specifies ECMA-376 compliance level.</summary>
Ecma,
/// <summary>Specifies ISO/IEC 29500:2008 Transitional compliance level.</summary>
Transitional,
/// <summary>Specifies ISO/IEC 29500:2008 Strict compliance level.</summary>
Strict
}
Code example
using (Signature signature = new Signature(filePath))
{
TextSignOptions signOptions = new TextSignOptions("John Smith")
{
Left = 100,
Top = 100,
Width = 200,
Height = 60
};
// Force ISO 29500:2008 Strict on save regardless of the source's compliance.
// Other allowed values: OoxmlCompliance.Ecma, OoxmlCompliance.Transitional.
WordProcessingSaveOptions saveOptions = new WordProcessingSaveOptions(WordProcessingSaveFileFormat.Docx)
{
OoxmlCompliance = OoxmlCompliance.Strict
};
SignResult result = signature.Sign(outputFilePath, signOptions, saveOptions);
}
How to get the update
NuGet
| 包 | 目标框架 |
|---|---|
GroupDocs.Signature |
netstandard2.1; net45; net6.0; net8.0(所有框架) |
GroupDocs.Signature.netstandard2.1 |
.NET Standard 2.1 |
GroupDocs.Signature.net45 |
.NET Framework 4.5 |
GroupDocs.Signature.net6 |
.NET 6.0 |
GroupDocs.Signature.net8 |
.NET 8.0 |
通过 NuGet 升级到最新的包版本。选择与目标框架匹配的包,以仅下载所需的二进制文件。