We’re happy to announce GroupDocs.Assembly for .NET 25.12 – the Christmas release that’s available as of December 2025. This update adds full OOXML compliance handling, improves barcode generation on Linux, and resolves critical template‑processing issues.

Có gì mới trong bản phát hành này

Danh mục Vấn đề Tóm tắt
Tính năng ASSEMBLYNET‑70 Thực hiện chỉ định tuân thủ OOXML rõ ràng cho tài liệu Word.
Cải tiến ASSEMBLYNET‑68 Thêm hỗ trợ tuân thủ OOXML (Ecma, Transitional, Strict) cho tài liệu Word.
Cải tiến ASSEMBLYNET‑69 Tự động giữ nguyên mức tuân thủ của tài liệu gốc khi có thể.
Cải tiến ASSEMBLYNET‑75 Buộc chiều X tối thiểu cho mã vạch Codabar (tạo mã tin cậy hơn).
Cải tiến ASSEMBLYNET‑76 Ngăn màu trong suốt được sử dụng khi tạo mã vạch trên Linux.
Sửa lỗi ASSEMBLYNET‑73 Các biểu thức mẫu trong các điều khiển nội dung nội tuyến (SdtRun) hiện được xử lý đúng.
Sửa lỗi ASSEMBLYNET‑60 Mã vạch không còn hiển thị trống trên các assembly Linux (.NET 8) nữa.

Hỗ trợ Tuân thủ OOXML

Bạn giờ có thể chọn mức tuân thủ OOXML chính xác khi lưu tài liệu Word (DOCX, DOCM, DOTX, …). Thư viện cũng tự động giữ nguyên mức tuân thủ của tài liệu nguồn khi tài liệu gốc là Transitional.

Enum công khai mới: OoxmlCompliance

namespace GroupDocs.Assembly
{
    /// <summary>
    /// Specifies the OOXML compliance level to use when saving Word documents to OOXML formats.
    /// </summary>
    public enum OoxmlCompliance
    {
        /// <summary>ECMA‑376 compliance.</summary>
        Ecma,

        /// <summary>ISO/IEC 29500:2008 Transitional compliance.</summary>
        Transitional,

        /// <summary>ISO/IEC 29500:2008 Strict compliance.</summary>
        Strict
    }
}

Thuộc tính mới trong LoadSaveOptions: OoxmlCompliance

public class LoadSaveOptions
{
    /// <summary>
    /// Gets or sets the OOXML compliance level to use when saving Word documents to OOXML formats.
    /// The default value is null, which means the compliance level will be determined automatically.
    /// </summary>
    public OoxmlCompliance? OoxmlCompliance { get; set; }
}

Cách chỉ định mức tuân thủ OOXML rõ ràng

var source = "template.docx";
var target = "output.docx";
var data   = "data.json";

// Create LoadSaveOptions with explicit OOXML compliance
var options = new LoadSaveOptions(FileFormat.Docx);
options.OoxmlCompliance = OoxmlCompliance.Strict; // or Ecma, Transitional

var dataSourceInfo = new DataSourceInfo(new JsonDataSource(data));
var assembler      = new DocumentAssembler();
assembler.AssembleDocument(source, target, options, dataSourceInfo);

Cách tự động giữ nguyên mức tuân thủ của tài liệu gốc

var source = "template_transitional.docx"; // Document with Transitional compliance
var target = "output.docx";
var data   = "data.json";

// OoxmlCompliance is null by default – original compliance will be preserved
var options = new LoadSaveOptions(FileFormat.Docx);
// options.OoxmlCompliance remains null

var dataSourceInfo = new DataSourceInfo(new JsonDataSource(data));
var assembler      = new DocumentAssembler();
assembler.AssembleDocument(source, target, options, dataSourceInfo);
// Output document keeps Transitional compliance

Xử lý các biểu thức mẫu trong các điều khiển nội dung nội tuyến (SdtRun)

var source = "template_with_sdtrun.docx";
var target = "output.docx";
var data   = "data.json";

// Template document contains:
// - SdtBlock: <<[field1]>>
// - SdtRun (inline): <<[field2]>>   // Now correctly processed
// - Regular text: <<[field3]>>

var options = new LoadSaveOptions(FileFormat.Docx);
var dataSourceInfo = new DataSourceInfo(new JsonDataSource(data));
var assembler = new DocumentAssembler();
assembler.AssembleDocument(source, target, options, dataSourceInfo);
// All template expressions, including those in SdtRun, are replaced.

Sửa lỗi và cải tiến

  • [Cải tiến] Việc tạo mã vạch Codabar giờ buộc chiều X tối thiểu (ASSEMBLYNET‑75).
  • [Cải tiến] Khi hiển thị mã vạch trên Linux, không còn sử dụng màu trong suốt (ASSEMBLYNET‑76).
  • [Sửa lỗi] Các biểu thức mẫu trong điều khiển SdtRun được xử lý (ASSEMBLYNET‑73).
  • [Sửa lỗi] Mã vạch không còn hiển thị trống trên Linux (.NET 8) (ASSEMBLYNET‑60).

Cách nhận bản cập nhật

  • NuGet – Nâng cấp lên gói GroupDocs.Assembly mới nhất:

    dotnet add package GroupDocs.Assembly --version 25.12
    

    (Cùng một gói hỗ trợ .NET 6+, .NET 5 và .NET Framework 4.6.2.)

  • Tải trực tiếp – Tải các assembly đã biên dịch cho .NET từ trang phát hành chính thức:

    GroupDocs.Assembly for .NET 25.12 DLLs only

Tài nguyên