Document development control Aspose.Words for .NET 23.7 update instructions!

Aspose.Words  is a high-level Word document processing API for performing various document management and manipulation tasks. The API supports generating, modifying, converting, rendering and printing documents without using Microsoft Word directly in the cross-platform application.

Aspose API  supports popular file format processing and allows exporting or converting various types of documents to fixed layout file formats and most commonly used image/multimedia formats.

Aspose.Words for .NET latest download (qun: 761297826) icon-default.png?t=N6B9https://www.evget.com/product/564/download

main feature

This monthly regular release has 115 improvements and fixes. Most notably:

  • The ability to save document pages or shapes in EPS format has been implemented.
  • Added the ability to retrieve a digitally signed value as a byte array from a digitally signed document.
  • The Row and Cell classes have been extended with new public members.
  • The MailMerge.GetRegionsHierarchy and MailMerge.GetFieldNamesForRegion methods now support Mustache tags.
  • The LINQ reporting engine template syntax now supports the ElementAt and ElementAtOrDefault extension methods. 

Full list of issues covering all changes in this release

Expand to view the full list of issues.
key summarize category
WORDSNET-24965 Set Cell.PreviousCell, Cell.NextCell, Row.PreviousRow, Row.NextRow properties to public new function
WORDSNET-25420 Consider providing a way to extract a digital signature as a byte array new function
WORDSNET-24384 Incorrect text wrapping in table cells new function
WORDSNET-24778 The right edge of the rendered shape is cut off new function
WORDSNET-24777 Incorrect width of table columns after rendering. new function
WORDSNET-24830 Images are not rendered correctly new function
WORDSNET-25017 Tables rendered a bit narrow, causing hyperlinks to wrap incorrectly new function
WORDSNET-25130 Table width changes after reallocation new function
WORDSNET-25382 Incorrect table layout after rendering new function
WORDSNET-25035 Warn when loading fixed page HTML documents new function
WORDSNET-13420 Paragraphs overlap shapes in output PDF new function
WORDSNET-12865 Tables in PDF moved to right edge of page new function
WORDSNET-12300 Images in tables are truncated in generated PDF new function
WORDSNET-12617 Text in the footer is misaligned when converting a Word document to PDF new function
WORDSNET-13888 DOCM to PDF conversion issue with table rendering new function
WORDSNET-14560 HTML to PDF Conversion: Table Rendering new function
WORDSNET-12870 DOC to XPS conversion issue with table rendering new function
WORDSNET-14269 DOCX to PDF conversion issue related to table rendering new function
WORDSNET-14626 The width of the table shrinks when there is an image in the cell new function
WORDSNET-15163 Image alignment issues in DOCX to PDF conversion new function
WORDSNET-15615 Use of UpdateTableLayout method in Word to PDF conversion new function
WORDSNET-16205 Paragraphs are rendered on the previous page new function
WORDSNET-16237 DOCX to Html fixed conversion issue with table position new function
WORDSNET-16131 The cell's text wraps to the next line in the output PDF new function
WORDSNET-16466 Images overlap after converting from DOC to PDF new function
WORDSNET-16992 Images in PDF slightly overlap each other new function
WORDSNET-17861 DOCX to PDF conversion issue with table content new function
WORDSNET-18482 Table rows display on page 4 in Word but on page 5 in AW new function
WORDSNET-18203 Dates in document headers were not rendered correctly in the output PDF new function
WORDSNET-25259 ElementAt extension method that supports LINQ reporting engine template syntax new function
WORDSNET-24195 Support for rendering to EPS new function
WORDSNET-18714 Incorrect table width in generated PDF new function
WORDSNET-19952 Shape (logo) position changes after DOCX to PDF conversion new function
WORDSNET-20177 Image shifted to right margin, causing partial rendering in PDF new function
WORDSNET-20811 Preserve table column widths in landscape section headers during DOCM to PDF conversion new function
WORDSNET-20818 UpdatePageLayout and UpdateTableLayout change the print document layout using .NET new function
WORDSNET-21256 Document.UpdateTableLayout changes the layout of the document footer in the output PDF new function
WORDSNET-21638 Image is cropped after DOCX to PDF conversion new function
WORDSNET-21746 Incorrect form after conversion to PDF new function
WORDSNET-22344 Table alignment issues in Word to PDF conversion headers new function
WORDSNET-22714 Design error when converting DOCX to PDF new function
WORDSNET-22755 Incorrect width of cells when converting DOCX files to PDF new function
WORDSNET-22819 Logo moved to center of PDF new function
WORDSNET-23978 Incorrect table column width during DOCX to PDF conversion new function
WORDSNET-23977 Headers not rendering correctly on landscape pages new function
WORDSNET-24091 Headers with tables on landscape pages render incorrectly new function
WORDSNET-24103 Title layout changes when converting DOCX to PDF new function
WORDSNET-24254 Images are truncated when rendering a document new function
WORDSNET-24564 Blank pages appear in PDF new function
WORDSNET-25467 Throw better error messages when reading corrupted MOBI files strengthen
WORDSNET-24916 Tables are rendered slightly narrower than in the source document strengthen
WORDSNET-25494 Incorrect text wrapping in tables strengthen
WORDSNET-17445 Images in headers in "Save as PDF" are truncated strengthen
WORDSNET-19131 Images in tables are not centered when converting Word to PDF strengthen
WORDSNET-20838 Document.UpdateTableLayout 更改输出 PDF 中表格的布局 强化
WORDSNET-21659 表格内的图像以 PDF 格式被截取 强化
WORDSNET-24279 渲染后表格右边框不可见 强化
WORDSNET-25512 检查AllStyles2003.docx资源中是否需要customXxml部分 强化
WORDSNET-25418 FindReplaceOptions.ApplyFont.Color 未应用 漏洞
WORDSNET-25404 MailMerge.GetRegionsHierarchy 和 MailMerge.GetFieldNamesForRegion 不适用于小胡子语法 漏洞
WORDSNET-25330 在 GroupDocs.Editor 内转换文档时,AW.NET 中出现内存泄漏问题 漏洞
WORDSNET-25601 文本呈现为豆腐 漏洞
WORDSNET-25602 文本呈现为豆腐 2 漏洞
WORDSNET-25574 从 DOCX 转换为 XLSX 后,细胞背景丢失 漏洞
WORDSNET-25162 字体样式下划线不起作用 漏洞
WORDSNET-25560 新版本的 Aspose.Words 中的渲染性能下降 漏洞
WORDSNET-25257 从 WPS 中创建的 DOC 中错误提取 OLE 对象 漏洞
WORDSNET-25514 将 HTML 保存到 MOBI 时出现 InvalidCastException 漏洞
WORDSNET-25363 图像保存到 SVG 时不会保留超链接 漏洞
WORDSNET-25575 MHT 转换为 PCL 后图像颜色反转 漏洞
WORDSNET-25408 DOCX 合并问题 漏洞
WORDSNET-25543 插入 SVG+XML 图像时出错 漏洞
WORDSNET-25492 首次调用 UpdateFields 后 REF 字段未正确更新 漏洞
WORDSNET-25409 Aspose.Words 未正确更新 TOC 漏洞
WORDSNET-25526 MailMerge.GetFieldNames() 中未列出 MergeBarcode 字段名称 漏洞
WORDSNET-25518 使用 DML 读取文档时无限循环 漏洞
WORDSNET-25432 打开/保存文档后 HTML AltChunk 丢失文本颜色 漏洞
WORDSNET-25566 小写字母文本渲染不正确 漏洞
WORDSNET-23448 DOCX 转 PDF:表格内的一些图像被推回到上一页 漏洞
WORDSNET-25448 DOCX 到 PDF:转换后页面丢失 漏洞
WORDSNET-25437 转换为 PDF 时,在损坏的表格单元格中不遵守寡妇/孤儿规则 漏洞
WORDSNET-25306 渲染文档后中文文本丢失 漏洞
WORDSNET-25410 如果小数部分之一具有不同的字体大小,则边界计算不正确 漏洞
WORDSNET-25497 合并 PDF 文档后图形质量会下降 漏洞
WORDSNET-24260 DOCX 到 PDF:表格溢出到页脚 漏洞
WORDSNET-25535 使用 Shaping.HarfBuzz 时,PdfSaveOptions.OptimizeOutput 会产生不正确的输出 漏洞
WORDSNET-25532 渲染文档后不保留图像比例 漏洞
WORDSNET-25393 更新字数时抛出 NullReferenceException 漏洞
WORDSNET-25192 导出为 HTML 后列表格式不正确 漏洞
WORDSNET-25191 导出为 HTML 后列表格式不正确 漏洞
WORDSNET-25190 导出为 HTML 后列表不正确 漏洞
WORDSNET-24856 改进 HTML 列表导出 漏洞
WORDSNET-25470 打开 HTML 文件时抛出 Aspose.Words.FileCorruptedException 漏洞
WORDSNET-23914 公式中分数线的位置不正确 漏洞
WORDSNET-25525 如果嵌入图像位于数学公式的顶层,则顶部和底部偏移不正确 漏洞
WORDSNET-25521 尝试将 DocumentBuilder 移动到 OfficeMath 内的书签时引发 InvalidCastException 漏洞
WORDSNET-25444 DOCX 到 PDF:文本改变颜色 漏洞
WORDSNET-25365 如果运算符字形 (+、-) 是“内联”分数的一部分,则在转换为 PDF 后会发生更改 漏洞
WORDSNET-25454 文件被 Aspose.Words 错误地检测为 PDF 漏洞
WORDSNET-25482 保存后占位符文本丢失 漏洞
WORDSNET-25496 将文档与其本身进行比较会产生看不见的修订 漏洞
WORDSNET-25474 将 HTML 保存到 DOCX 时兼容模式发生变化 漏洞
WORDSNET-23854 确保将 HTML 保存到 DOCX 时兼容模式发生变化 漏洞
WORDSNET-25458 饼图中的百分比数字不正确 漏洞
WORDSNET-12871 表格文本呈现的 DOC 到 XPS 转换问题 漏洞
WORDSNET-25572 字体后备不适用于 Wingdings 字体 漏洞
WORDSNET-23742 从 DOC 保存到 ODT 时,单元格边距发生变化 漏洞
WORDSNET-25504 两次附加文档时格式错误 漏洞
WORDSNET-25446 DOCX 到 PDF:符号未正确转换 漏洞
WORDSNET-24990 组件内容的项目符号格式已更改 漏洞
WORDSNET-25486 删除表格行后渲染文档时抛出 NullReferenceException 漏洞
WORDSNET-25487 HTML 转换为空白结果 DOCX 漏洞
WORDSNET-25364 默认字体系列写入 LI 元素 漏洞
WORDSNET-25537 渲染后表格行移至上一页 漏洞
WORDSNET-20577 Aspose.Words 比 .NET Core 需要更多的时间和内存 漏洞

公共 API 和向后不兼容的更改

本部分列出了 Aspose.Words 23.7 中引入的公共 API 更改。它不仅包括新的和过时的公共方法,还描述了 Aspose.Words 中可能影响现有代码的幕后行为的任何变化。引入的任何可被视为回归并修改现有行为的行为都特别重要,并记录在此处。

添加了从数字签名文档中以字节数组形式获取数字签名值的功能

相关问题:WORDSNET-25420

添加了从数字签名文档获取数字签名值到Aspose.Words.DigitalSignatures.DigitalSignature类的功能:

 /// <summary>
/// Gets an array of bytes representing a signature value.
/// </summary>
public byte[] SignatureValue { get; } 

使用案例

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

添加了新的 EPS 图像格式

与 WORDSNET-24195 相关

文档页面或形状现在可以保存为EPS格式。新的 EPS 值被添加到SaveFormat枚举中。

使用案例

此用例解释了如何将文档另存为 EPS 图像: 

// 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);

使用案例

此用例解释了如何将任何特定形状保存为 EPS 图像: 

// Open some document.
Document doc = new Document("document.docx");

// Save the shape as EPS image.
ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFormat.Eps);
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
ShapeRenderer renderer = shape.GetShapeRenderer();
renderer.Save("image.eps", saveOptions);

添加了新的公共属性 Row.NextRow、Row.PreviousRow、Cell.NextCell 和 Cell.PreviousCell

相关问题:WORDSNET-24965

以下公共属性已添加到Row类中: 

/// <summary>
/// Gets the next Row node.
/// </summary>
/// <remarks>
/// The method can be used when you need to have typed access to table rows.
/// If a StructuredDocumentTag node is found in a table instead of a row,
/// it is automatically traversed to get a row contained within.
/// </remarks>
public Row NextRow { get; }

/// <summary>
/// Gets the previous Row node.
/// </summary>
/// <remarks>
/// The method can be used when you need to have typed access to table rows.
/// If a StructuredDocumentTag node is found in a table instead of a row,
/// it is automatically traversed to get a row contained within.
/// </remarks>
public Row PreviousRow { get; }

使用案例

此用例解释了如何枚举所有表格单元格: 

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());
    }
}

如果加载的 HTML 文档具有固定页面结构,则会发出警告

相关问题:WORDSNET-25035

Aspose.Words 不支持加载固定页面 HTML 文档(例如,在SaveFormat.HtmlFixed中保存时生成的文档)。如果Aspose.Words检测到加载的HTML文档具有固定页面结构,它将发出以下警告: 

WarningSource.Html
WarningType.MajorFormattingLoss
"The document is fixed-page HTML. Its structure may not be loaded correctly."

Mustache flags supported in MailMerge.GetRegionsHierarchy and MailMerge.GetFieldNamesForRegion methods

Related issue: WORDSNET-25404

The MailMerge.GetRegionsHierarchy method now returns mustache regions and mustache fields when the MailMerge.UseNonMergeFields option is true  .

The MailMerge.GetFieldNamesForRegion method now accepts mustache region names and returns mustache field names when the MailMerge.UseNonMergeFields option is true  .

The MustacheTag class is introduced 

/// <summary>
/// Represents "mustache" tag.
/// </summary>
public class MustacheTag
{
    /// <summary>
    /// Gets the run that contains the beginning of the tag.
    /// </summary>
    public Run ReferenceRun { get; }

    /// <summary>
    /// Gets the zero-based starting position of the tag from the start of the <see cref="ReferenceRun"/>.
    /// </summary>
    public int ReferenceOffset { get; }

    /// <summary>
    /// Gets the text of the tag.
    /// </summary>
    public string Text { get; }
}

The StartMustacheTag, EndMustacheTag and MustacheTags properties have been added to the MailMergeRegionInfo class: 

public class MailMergeRegionInfo
{
    /// <summary>
    /// Returns a start "mustache" tag for the region.
    /// </summary>
    public MustacheTag StartMustacheTag { get; }

    /// <summary>
    /// Returns an end "mustache" tag for the region.
    /// </summary>
    public MustacheTag EndMustacheTag { get; }

    /// <summary>
    /// Returns a list of child "mustache" tags.
    /// </summary>
    public IList<MustacheTag> MustacheTags { get; }
}

Use Cases

This use case explains how to use MustacheTag: 

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);
}

ElementAt and ElementAtOrDefault extension methods supported by LINQ reporting engine template syntax

Related issue: WORDSNET-25259

From now on, you can use the ElementAt and ElementAtOrDefault extension methods in the LINQ reporting engine template syntax as follows: 

<<[persons.ElementAt(3).Name]>>
<<[persons.ElementAtOrDefault(5)?.Name]>>

Guess you like

Origin blog.csdn.net/m0_67129275/article/details/131922709