Browse our Products

Aspose.Words for .NET 24.2 Release Notes

Major Features

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

  • Introduced new public properties for enhanced style management.
  • Added the capability to specify SvgSaveOptions during rendering using ShapeRenderer.Save() and OfficeMathRenderer.Save() methods.
  • Enhanced functionality to retrieve the actual text of reference marks for footnotes and endnotes.
  • Continued extending the DrawingML Chart API capabilities.
  • Added an ability to preserve empty lines while loading Markdown files.
  • Enabled compatibility with Word 2016 charts for LINQ Reporting Engine.

Full List of Issues Covering all Changes in this Release

Expand to view the full list of issues.
KeySummaryCategory
WORDSNET-26469Disable links in ToC when exporting to HTMLNew Feature
WORDSNET-26325Preserving Document Structure Post Content Control RemovalNew Feature
WORDSNET-23972Provide an ability to get/set styles priorityNew Feature
WORDSNET-23973Provide an ability to show/hide stylesNew Feature
WORDSNET-23884Support working with treemap and sunburst charts for LINQ Reporting EngineNew Feature
WORDSNET-23355Allow passing SvgSaveOptions into ShapeRenderer.Save and OfficeMathRenderer.Save methodsNew Feature
WORDSNET-26356Font Control in Bar ChartNew Feature
WORDSNET-26434StructuredDocumentTagRangeStart class Appearance propertyNew Feature
WORDSNET-26164Errors with dates of 1900 year in chartsEnhencement
WORDSNET-26236Without explicitly specifying ‘LoadFormat.Markdown’, Aspose.Words cannot determine the MD format in the user’s MD fileEnhencement
WORDSNET-26518Text is lost after converting RTF to HTMLBug
WORDSNET-26514Aspose.Words produces a invalid DOCX documentBug
WORDSNET-26500Remove implicit call of Document.UpdateActualReferenceMarks from Footnote.ActualReferenceMarkBug
WORDSNET-23579Equations are cut off when saving to PDFBug
WORDSNET-26396Table formatting is broken after open/save DOCX fileBug
WORDSNET-26358Importing SVG file into document results with shifted head arrowBug
WORDSNET-26329Formatting missing for the custom bullet point(s)Bug
WORDSNET-26136Make refactoring of MOBI/AZW3 import/exportBug
WORDSNET-26478Href and target attributes of hyperlink is changed after inserting to document and saving to HTMLBug
WORDSNET-26447FieldHyperlink.ScreenTip returns truncated valueBug
WORDSNET-26493ArgumentException is thrown upon comparing documentBug
WORDSNET-3857Vertical position of text in cell is wrongBug
WORDSNET-26385Table layout is changed after renderingBug
WORDSNET-26393Chinese text is improperly distributed after renderingBug
WORDSNET-25632FileCorruptedException is thrown upon loading DOC documentBug
WORDSNET-25577Formatting of the document is broken after PDF to DOCX conversionBug
WORDSNET-26422DOCX to MD: Text after image is not indentedBug
WORDSNET-26419Line break is added at the end of block level SDTBug
WORDSNET-26123System.Drawing.Image throws exceptions after using it in ImageData.SetImageBug
WORDSNET-22529Aspose.Words.FileCorruptedException is thrown while import DOCBug
WORDSNET-20696FileCorruptedException while loading DOCBug
WORDSNET-26415FileCorruptedException is thrown upon loading DOC documentBug
WORDSNET-26416Plain SDT is incorrectly inserted during comparisonBug
WORDSNET-19774DOCX Content not Displayed on the Same Page in HTML FIXED FormatBug
WORDSNET-19751DOCX to HtmlFixed conversion issue with shape (image) positionBug
WORDSNET-19653Some content pushed to previous page in HTML_FIXEDBug
WORDSNET-19487A line pushed to next page in PDFBug
WORDSNET-18591Line break not respected in PDFBug
WORDSNET-16564Content is pushed to the beginning of next line in PDFBug
WORDSNET-24904Comments content is marked as a revision after comparing documentBug
WORDSNET-20547Stamp misplaced in Html FixedBug
WORDSNET-24487Overlapped content and reduced number of pages when saving to PDFBug
WORDSNET-26261NullReferenceException is thrown when using ToString method on a cell with nested table and PreserveTableLayout optionBug
WORDSNET-21422Content of first page spans across two pages during ODT to DOCX conversionBug
WORDSNET-26324Heading style formatting is lost after open/save documentBug
WORDSNET-26487Spacing before semicolon is less then expectedBug
WORDSNET-25813DOCX to MD: Multi-line remarks issueBug
WORDSNET-25835DOCX to MD: Examples block not converted correctlyBug
WORDSNET-25814DOCX to MD: Indentations not working correctlyBug
WORDSNET-26240ArgumentOutOfRangeException is thrown upon updating page layout in LinuxBug
WORDSNET-3789Hidden content becomes visible in output PDFBug
WORDSNET-26389The combination of a comma and nine spaces is used as line break in MathFormulaBug
WORDSNET-26438Page number is incorrect after rendering documentBug
WORDSNET-26368Add resilience by ignoring Spaces at start/end of each Row during Markdown Table importBug
WORDSNET-26359Proxy error(ArgumentOutOfRangeException) occurs upon converting OfficeMath to html string in linuxBug
WORDSNET-26203Table formatting is broken after open/save DOC fileBug
WORDSNET-26453Characters overlap in Chinese textBug
WORDSNET-26108Links don’t work in AZW3/MOBI documents generated with HtmlVersion.Html5Bug
WORDSNET-25134LINQ Reporting Engine - Unexpected image resizing while inserting HTMLBug
WORDSNET-26448Position of page numbers in TOC is shifted after renderingBug
WORDSNET-26428Images are scaled down even if HtmlSaveOptions.ScaleImageToShapeSize is set to falseBug
WORDSNET-26343The “Slash” should be used as LineBreak in Math formulaBug
WORDSNET-26064Empty lines are lost after importing MD documentBug
WORDSNET-25133Text misaligned in uppercase roman styled list when is aligned to LeftBug
WORDSNET-19839Number of Pages reduced during rendering DOCX to PDFBug
WORDSNET-19982Content moves to next pages in PDFBug
WORDSNET-26411Extra whitespaces are added to merge field value after formatting numberBug
WORDSNET-26313Forward text is not inserted after executing mail mergeBug
WORDSNET-26189DOCX to HTML: Single page converted to multiple pagesBug
WORDSNET-26382Memory leak upon creating document.Bug
WORDSNET-26174Table Border Lost for Inline ComponentBug
WORDSNET-26256Nested content controls CXP is not updatingBug
WORDSNET-26399DOCX to PDF: Chinese characters not rendered correctlyBug
WORDSNET-25321JPEG image is loaded as TXT document by Aspose.WordsBug
WORDSNET-18723DOCX to PDF conversion issue with row heightBug
WORDSNET-26371Number format is incorrect when “fr-BE” culture is used.Bug
WORDSNET-26477DOC to PCL: Saving using MemoryStream incorrectly renderedBug
WORDSNET-22623System.InvalidCastException occurs during comparing Word documentsBug
WORDSNET-26148Consider adding an option to preserve empty paragraphs upon exporting to MDBug
WORDSNET-26465Formatting of document is incorrect after PDF to DOCX conversionBug
WORDSNET-26538Pdf2Word.PdfImageBuilder throws IndexOutOfRangeExceptionBug

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 24.2. 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 an ability to preserve empty lines while loading Markdown files.

Related issue: WORDSNET-26064

Implemented new public classes with a new public property:

/// <summary>
/// Allows to specify additional options when loading <see cref="LoadFormat.Markdown"/> document into a <see cref="Document"/> object.
/// </summary>
public class MarkdownLoadOptions : LoadOptions
...
/// <summary>
/// Gets or sets a boolean value indicating whether to preserve empty lines while load a <see cref="LoadFormat.Markdown"/> document.
/// The default value is <c>false</c>.
/// <para>
/// Normally, empty lines between block-level elements in Markdown are ignored. Empty lines at the beginning and
/// end of the document are also ignored. This option allows to import such empty lines.
/// </para>
/// </summary>
public bool PreserveEmptyLines { get; set; }

This use case explains how to preserve empty lines while loading Markdown document:

Introduced new public properties for enhanced style management.

Related issue: WORDSNET-23973

A new public properties Priority, UnhideWhenUsed and SemiHidden has been added to class Style.

/// <summary>
/// Gets/sets the integer value that represents the priority for sorting the styles in the Styles task pane.
/// </summary>
public int Priority { get; set; }

/// <summary>
/// Gets/sets whether the style used in the current document unhides from the Styles gallery and from the Styles task pane.
/// </summary>
public bool UnhideWhenUsed { get; set; }

/// <summary>
/// Gets/sets whether the style hides from the Styles gallery and from the Styles task pane.
/// </summary>
public bool SemiHidden { get; set; }

This use case explains how to work with new properties:

Added NodeRendererBase.Save() methods that accept SvgSaveOptions.

Related issue: WORDSNET-23355

New public methods has been added to class NodeRendererBase allowing to pass SvgSaveOptions:

/// <summary>
/// Renders the shape into an SVG image and saves into a file.
/// </summary>
/// <param name="fileName">The name for the image file. If a file with the specified name already exists, the existing file is overwritten.</param>
/// <param name="saveOptions">Specifies the options that control how the shape is rendered and saved. Can be <c>null</c>.</param>
public void Save(String fileName, SvgSaveOptions saveOptions);

/// <summary>
/// Renders the shape into an SVG image and saves into a stream.
/// </summary>
/// <param name="stream">The stream where to save the SVG image of the shape.</param>
/// <param name="saveOptions">Specifies the options that control how the shape is rendered and saved. Can be <c>null</c>.
/// If this is <c>null</c>, the image will be saved with the default options.</param>
public void Save(Stream stream, SvgSaveOptions saveOptions);

This use case explains how to specify SvgSaveOptions when rendering via ShapeRenderer.Save() and OfficeMathRenderer.Save() methods:

Added public property Appearance to the StructuredDocumentTagRangeStart class.

Related issue: WORDSNET-26434

A new public property Appearance has been added to class StructuredDocumentTagRangeStart and IStructuredDocumentTag interface:

/// <summary>
/// Gets or sets the appearance of the structured document tag.
/// </summary>
public SdtAppearance Appearance { get; set; }

This use case explains how to get and set Appearance property of a ranged structured document tag:

Added public property Footnote.ActualReferenceMark and public method Document.UpdateActualReferenceMarks.

Related issue: WORDSNET-24512

An ability to get the actual text of reference marks for footnotes and endnotes has been implemented.

The following new public members have been added to the Footnote and Document classes:

public class Footnote
{
    /// <summary>
    /// Gets the actual text of the reference mark displayed in the document for this footnote.
    /// </summary>
    /// <remarks>
    /// To initially populate values of this property for all reference marks of the document, or to update
    /// the values after changes in the document that might affect the reference marks, you must execute the
    /// <see cref="Document.UpdateActualReferenceMarks"/> method.
    /// Updating fields (<see cref="Document.UpdateFields"/>) may also be necessary to get the correct result.
    /// </remarks>
    public string ActualReferenceMark { get; }
    ...
}

public class Document
{
    /// <summary>
    /// Updates the <see cref="Footnote.ActualReferenceMark"/> property of all footnotes and endnotes in the document.
    /// </summary>
    /// <remarks>
    /// Updating fields (<see cref="Document.UpdateFields"/>) may be necessary to get the correct result.
    /// </remarks>
    public void UpdateActualReferenceMarks();

    ...
}

This use case explains how to get actual text of reference mark:

Continued extending the DrawingML Chart API capabilities.

Related issue: WORDSNET-26356

A new class AxisTickLabels has been implemented. The properties related to axis tick mark labels have been marked as obsolete in the ChartAxis class and moved to the new class. A property TickLabels of the AxisTickLabels type has been added to the ChartAxis class.

Also the ability to set font formatting for tick mark labels has been implemented: a new AxisTickLabels.Font property has been added.

And a Format property, which allows defining line formatting for an axis and fill for tick mark labels, has been added to the ChartAxis class.

/// <summary>
/// Represents properties of axis tick mark labels.
/// </summary>
public class AxisTickLabels
{
    /// <summary>
    /// Gets or sets the position of the tick labels on the axis.
    /// </summary>
    /// <remarks>
    /// The property is not supported by MS Office 2016 new charts.
    /// </remarks>
    public AxisTickLabelPosition Position { get; set; }

    /// <summary>
    /// Gets or sets the distance of the tick labels from the axis.
    /// </summary>
    /// <remarks>
    /// <para>The property represents a percentage of the default label offset.</para>
    /// <para>Valid range is from 0 to 1000 percent inclusive. The default value is 100%.</para>
    /// <para>The property has effect only for category axes. It is not supported by MS Office 2016 new charts.</para>
    /// </remarks>
    public int Offset { get; set; }

    /// <summary>
    /// Gets or sets the interval at which the tick labels are drawn.
    /// </summary>
    /// <remarks>
    /// <para>The property has effect for text category and series axes. It is not supported by MS Office 2016 
    /// new charts. Valid range of a value is greater than or equal to 1.</para>
    /// <para>Setting this property sets the <see cref="IsAutoSpacing"/> property to <c>false</c>.</para>
    /// </remarks>
    public int Spacing { get; set; }

    /// <summary>
    /// Gets or sets a flag indicating whether to use automatic interval for drawing the tick labels.
    /// </summary>
    /// <remarks>
    /// <para>The default value is <c>true</c>.</para>
    /// <para>The property has effect for text category and series axes. It is not supported by MS Office 2016
    /// new charts.</para>
    /// </remarks>
    public bool IsAutoSpacing { get; set; }

    /// <summary>
    /// Gets or sets text alignment of the axis tick labels.
    /// </summary>
    /// <remarks>
    /// <para>This property has effect only for multi-line labels.</para>
    /// <para>The default value is <see cref="ParagraphAlignment.Center"/>.</para>.
    /// </remarks>
    public ParagraphAlignment Alignment { get; set; }

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

public class ChartAxis
{
    /// <summary>
    /// Provides access to the properties of the axis tick mark labels.
    /// </summary>
    public AxisTickLabels TickLabels { get; }

    /// <summary>
    /// Provides access to line formatting of the axis and fill of the tick labels.
    /// </summary>
    /// <remarks>
    /// Fill of chart tick marks can be changed only for pre Word 2016 charts. Word 2016 charts do not support this.
    /// </remarks>
    public ChartFormat Format { get; }

    [Obsolete("Obsolete, use the TickLabels.Position property instead.")]
    public AxisTickLabelPosition TickLabelPosition { get; set; }

    [Obsolete("Obsolete, use the TickLabels.Offset property instead.")]
    public int TickLabelOffset { get; set; }

    [Obsolete("Obsolete, use the TickLabels.Spacing property instead.")]
    public int TickLabelSpacing { get; set; }

    [Obsolete("Obsolete, use the TickLabels.IsAutoSpacing property instead.")]
    public bool TickLabelSpacingIsAuto { get; set; }

    [Obsolete("Obsolete, use the TickLabels.Alignment property instead.")]
    public ParagraphAlignment TickLabelAlignment { get; set; }

    ...
}

A new public class ChartDataTable has been implemented. A property DataTable of this type has been added to the Chart class:

/// <summary>
/// Allows to specify properties of a chart data table.
/// </summary>
public class ChartDataTable
{
    /// <summary>
    /// Gets or sets a flag indicating whether the data table will be shown for the chart.
    /// Default value is <c>false</c>.
    /// </summary>
    /// <remarks>
    /// The following chart types do not support data tables: Scatter, Pie, Doughnut, Surface, Radar, Treemap,
    /// Sunburst, Histogram, Pareto, Box and Whisker, Waterfall, Funnel, Combo charts that include series of
    /// these types. Showing a data table for the chart types throws a <see cref="InvalidOperationException"/>
    /// exception.
    /// </remarks>
    public bool Show { get; set; }

    /// <summary>
    /// Gets or sets a flag indicating whether legend keys are displayed in the data table.
    /// The default value is <c>true</c>.
    /// </summary>
    public bool HasLegendKeys { get; set; }

    /// <summary>
    /// Gets or sets a flag indicating whether a horizontal border of the data table is displayed.
    /// The default value is <c>true</c>.
    /// </summary>
    public bool HasHorizontalBorder { get; set; }

    /// <summary>
    /// Gets or sets a flag indicating whether a vertical border of the data table is displayed.
    /// The default value is <c>true</c>.
    /// </summary>
    public bool HasVerticalBorder { get; set; }

    /// <summary>
    /// Gets or sets a flag indicating whether an outline border, that is, a border around series and category names,
    /// is displayed.
    /// The default value is <c>true</c>.
    /// </summary>
    public bool HasOutlineBorder { get; set; }

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

    /// <summary>
    /// Provides access to fill of text background and border formatting of the data table.
    /// </summary>
    public ChartFormat Format { get; }
}

public class Chart
{
    /// <summary>
    /// Provides access to properties of a data table of this chart.
    /// The data table can be shown using the <see cref="ChartDataTable.Show"/> property.
    /// </summary>
    public ChartDataTable DataTable { get; }

    ...
}

This use case explains how show and format chart data table:

Supported working with Word 2016 charts for LINQ Reporting Engine.

Related issue: WORDSNET-23884

Starting from Aspose.Words 24.2, LINQ Reporting Engine supports working with the following Word 2016 chart types:

  • Treemap
  • Sunburst
  • Histogram
  • Box & Whisker
  • Waterfall
  • Funnel
  • Stock

This use case explains how to use Word 2016 charts with Aspose.Words LINQ Reporting Engine: