GroupDocs.Redaction for .NET 26.7 มีให้ใช้งานแล้ว รุ่นนี้เพิ่มการควบคุมความสอดคล้องของ OOXML เมื่อบันทึกเอกสารประมวลผลคำ ขยายการสนับสนุนรูปแบบสเปรดชีต และแก้ไขปัญหาการลบข้อมูลรูปภาพในไฟล์ CSV และพฤติกรรมการบันทึกไฟล์ข้อความธรรมดา

Fixes and enhancements

  • [Enhancement] Implement support and respect OOXML compliance for Words documents. (REDACTIONNET-718)
  • [Enhancement] Implement support for ODS, OTS, XLSB, XLT, and TAB spreadsheet formats. (REDACTIONNET-802)
  • [Bug] Unnecessary image redactions for CSV files. (REDACTIONNET-805)
  • [Bug] Saving text file as XLSX. (REDACTIONNET-628)

What’s New?

การปล่อยรุ่นนี้มุ่งเน้นที่ตัวเลือกการบันทึก Word และการครอบคลุมสเปรดชีตที่กว้างขึ้น พร้อมพฤติกรรมที่เชื่อถือได้มากขึ้นสำหรับรูปแบบที่เน้นข้อความ

Specify OOXML compliance when saving Word documents

เมื่อคุณบันทึกเอกสารประมวลผลคำในรูปแบบเดิม คุณสามารถตั้งระดับความสอดคล้องของ OOXML ผ่าน SaveOptions.WordprocessingSaveOptions.OoxmlCompliance ได้แล้ว ใช้ค่าจาก enumeration ใหม่ WordProcessingComplianceLevel: Ecma, Transitional หรือ Strict

หากคุณไม่ได้ตั้งค่าคุณสมบัตินี้ GroupDocs.Redaction จะรักษาระดับความสอดคล้องของเอกสารต้นฉบับไว้ Strict สามารถลดระดับลงเป็น Transitional ได้เท่านั้น ไม่สามารถลดลงเป็น Ecma ได้ ตั้งค่า RasterizeToPDF เป็น false เพื่อให้เอกสารถูกบันทึกเป็น Word OOXML แทนการแปลงเป็น PDF แบบเรสเตอร์

Expanded spreadsheet format support

เวอร์ชัน 26.7 เพิ่มการสนับสนุนสเปรดชีต ODS, OTS, XLSB, XLT และ TAB รวมถึงการตรวจจับรูปแบบที่ถูกต้องและการบันทึกในรูปแบบสเปรดชีตเดิม คุณสามารถลบข้อมูลในไฟล์เหล่านี้ด้วยรูปแบบ API เดียวกับสเปรดชีตอื่น ๆ

More reliable CSV and plain-text handling

สำหรับรูปแบบสเปรดชีตที่เป็นข้อความเท่านั้น เช่น CSV การลบข้อมูลแบบกล่องสี (draw‑box) จะถูกข้ามไป เนื่องจากรูปแบบเหล่านี้ไม่รองรับการแทนที่แบบภาพ รุ่นนี้ยังแก้ไขกรณีที่ไฟล์ข้อความธรรมดาอาจถูกบันทึกผิดเป็นแพคเกจ XLSX/ZIP แทนที่จะคงเป็นไฟล์ข้อความ

Public API changes

Added

  • enumeration WordProcessingComplianceLevel พร้อมค่ Ecma, Transitional และ Strict
  • คลาส WordprocessingSaveOptions พร้อมคุณสมบัติ OoxmlCompliance
  • คุณสมบัติ SaveOptions.WordprocessingSaveOptions

Code examples

Save a Word document with OOXML compliance

using GroupDocs.Redaction.Options;
using GroupDocs.Redaction.Redactions;

using (Redactor redactor = new Redactor("sample.docx"))
{
    redactor.Apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]")));

    var options = new SaveOptions()
    {
        AddSuffix = true,
        RasterizeToPDF = false,
        RedactedFileSuffix = "Strict"
    };
    // If not specified, the compliance level of the original document is preserved.
    // Strict can only be downgraded to Transitional, not to Ecma.
    options.WordprocessingSaveOptions.OoxmlCompliance = WordProcessingComplianceLevel.Strict;

    redactor.Save(options);
}

Redact newly supported spreadsheet formats

using GroupDocs.Redaction.Options;
using GroupDocs.Redaction.Redactions;

using (Redactor redactor = new Redactor("sample.ods"))
{
    redactor.Apply(new ExactPhraseRedaction("Sensitive", new ReplacementOptions("[redacted]")));
    redactor.Save(new SaveOptions() { AddSuffix = true, RasterizeToPDF = false });
}

How to get the update

Learn more