Browse our Products

Aspose.Words for Java 23.10 Release Notes

Major Features

There are 129 improvements and fixes in this regular monthly release. The most notable are:

  • Added generic type parameter to CompositeNode’s class methods.
  • Implemented various PDF rendering optimizations to reduce output size when utilizing PdfSaveOptions.OptimizeOutput settings.
  • Added the capability to retrieve the foreground color without modifiers in the Fill and Stroke classes.
  • Expanded the functionality of ChartDataPointCollection, ChartSeries, and ChartFormat classes with new options.
  • Introduced a simplified method for inserting one document inside another document inline at the current cursor position.
  • Introduced the ImageData.FitImageToShape() method.
  • Added the ability to access and modify the Locked property of a Style.
  • Implemented a feature to recognize hyperlinks when loading TXT documents.

Full List of Issues Covering all Changes in this Release

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 23.10. It includes not only new and obsoleted public methods, but also a description of any changes in the behavior behind the scenes in Aspose.Words which may affect existing code. Any behavior introduced that could be seen as regression and modifies the existing behavior is especially important and is documented here.

Added ability to get foreground color without modifiers in Fill and Stroke classes

Related issue: WORDSNET-24933

A new public property BaseForeColor has been added to class Fill and Stroke:

//// <summary>
/// Gets a Color object that represents the base foreground color for the fill
/// without any modifiers.
/// </summary>
public Color BaseForeColor

...

/// <summary>
/// Gets the base foreground color of the stroke without any modifiers.
/// </summary>
public Color BaseForeColor

Added generic type parameter to CompositeNode’s class methods

Related issue: WORDSNET-23827

Added generic type parameter to the following CompositeNode’s methods:

/// <summary>
/// Adds the specified node to the end of the list of child nodes for this node.
/// </summary>
public T AppendChild<T>(T newChild) where T : Node;

/// <summary>
/// Adds the specified node to the beginning of the list of child nodes for this node.
/// </summary>
public T PrependChild<T>(T newChild) where T : Node;

/// <summary>
/// Inserts the specified node immediately after the specified reference node.
/// </summary>
/// <remarks>
public T InsertAfter<T>(T newChild, Node refChild) where T : Node;

/// <summary>
/// Inserts the specified node immediately before the specified reference node.
/// </summary>
public T InsertBefore<T>(T newChild, Node refChild) where T : Node;

/// <summary>
/// Removes the specified child node.
/// </summary>
public T RemoveChild<T>(T oldChild) where T : Node;

Added new members to ChartDataPointCollection, ChartSeries and ChartFormat classes

Related issue: WORDSNET-24944

The following new methods and property have been added to the ChartDataPointCollection, ChartSeries and ChartFormat classes:

namespace Aspose.Words.Drawing.Charts
{
    public class ChartDataPointCollection
    {
        ...

        /// <summary>
        /// Gets a flag indicating whether the data point at the specified index has default format.
        /// </summary>
        public bool HasDefaultFormat(int dataPointIndex);

        /// <summary>
        /// Copies format from the source data point to the destination data point.
        /// </summary>
        public void CopyFormat(int sourceIndex, int destinationIndex);
    }

    public class ChartSeries
    {
        ...

        /// <summary>
        /// Copies default data point format from the data point with the specified index.
        /// </summary>
        public void CopyFormatFrom(int dataPointIndex);
    }

    public class ChartFormat
    {
        ...

        /// <summary>
        /// Resets the fill of the chart element to have the default value.
        /// </summary>
        public void SetDefaultFill();

        /// <summary>
        /// Gets a flag indicating whether any format is defined.
        /// </summary>
        public bool IsDefined { get; }
    }
}

Added new public method ImageData.FitImageToShape()

Related issue: WORDSNET-24967

A new FitImageToShape public method has been added to ImageData class:

/// <summary>
/// Fits the image data to Shape frame so that the aspect ratio of the image data matches the aspect ratio of Shape frame.
/// </summary>
public void FitImageToShape()

Added public method DocumentBuilder.InsertDocumentInline

Related issue: WORDSNET-25505

A new public method InsertDocumentInline has been added to class DocumentBuilder:

/// <summary>
/// Inserts a document inline at the cursor position.
/// </summary>
/// <remarks>
/// <para>
/// This method mimics the MS Word behavior, as if CTRL+'A' (select all content) was pressed,
/// then CTRL+'C' (copy selected into the buffer) inside one document
/// and then CTRL+'V' (insert content from the buffer) inside another document.
/// </para>
/// <para>As a difference from <see cref="InsertDocument(Aspose.Words.Document,Aspose.Words.ImportFormatMode,Aspose.Words.ImportFormatOptions)"/>
/// this method moves the content of the paragraph of the destination document,
/// before which the source document is inserted, into the last
/// paragraph of the inserted source document. Actually, this means that
/// paragraph break of the last inserted paragraph is removed.</para>
/// <para>Note, if the last node of the source document is not a paragraph, then nothing will be done.</para>
/// </remarks>
/// <param name="srcDoc">Source document for inserting.</param>
/// <param name="importFormatMode">Specifies how to merge style formatting that clashes.</param>
/// <param name="importFormatOptions">Allows to specify options that affect formatting of a result document.</param>
/// <returns>First node of the inserted content.</returns>
public Node InsertDocumentInline(Document srcDoc, ImportFormatMode importFormatMode, ImportFormatOptions importFormatOptions)

Added public properties ChartTitle.Font and ChartAxisTitle.Font

Related issue: WORDSNET-25799

An ability to set font properties for chart and axis titles has been implemented.

The following new public properties have been added:

namespace Aspose.Words.Drawing.Charts
{
    public class ChartTitle
    {
        ...

        /// <summary>
        /// Provides access to the font formatting of the chart title.
        /// </summary>
        public Font Font { get; }
    }

    public class ChartAxisTitle
    {
        ...

        /// <summary>
        /// Provides access to the font formatting of the axis title.
        /// </summary>
        public Font Font { get; }
    }
}

Added public property Style.Locked

Related issue: WORDSNET-25544

A new public property Locked has been added to class Style:

/// <summary>
/// Specifies whether this style is locked.
/// </summary>
public bool Locked { get; set; }

Related issue: WORDSNET-25529

A new public property DetectHyperlinks has been added to class TxtLoadOptions:

/// <summary>
/// Specifies either to detect hyperlinks in text.
/// The default value is <c>false</c>.
/// </summary>
public bool DetectHyperlinks { get; set; }