Browse our Products

Aspose.Words for .NET 22.12 Release Notes

Major Features

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

  • Implemented an ability to specify the particular Margin type for the given section.
  • The new public properties ThemeColor and TintAndShade were introduced.
  • Implemented rendering of the linear trendline formula for DrawingML charts rendering.
  • Implemented optimization that significantly reduces the depth of graphics state nesting when rendering to PDF to maintain specification compliance.

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 22.12. 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 new public properties ThemeColor and TintAndShade

Related issue: WORDSNET-24441

A new public property ThemeColor has been added to class Border:

/// <summary>
/// Gets or sets the theme color in the applied color scheme that is associated with this Border object.
/// </summary>
public ThemeColor ThemeColor { get; set; }

A new public property TintAndShade has been added to class Border:

/// <summary>
/// Gets or sets a double value that lightens or darkens a color.
/// </summary>
public double TintAndShade { get; set; }
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Border topBorder = builder.ParagraphFormat.Borders.Top;
topBorder.LineWidth = 0.5;

// Sets the value of ThemeColor.
topBorder.ThemeColor = ThemeColor.Accent1;
Border bottomBorder = builder.ParagraphFormat.Borders.Bottom;
bottomBorder.LineWidth = 0.5;

// Sets the value of ThemeColor.
bottomBorder.ThemeColor = ThemeColor.Accent2;
Border leftBorder = builder.ParagraphFormat.Borders.Left;
leftBorder.LineWidth = 1.5;

// Sets the value of ThemeColor.
leftBorder.ThemeColor = ThemeColor.Accent3;

// Sets the lightens value.
leftBorder.TintAndShade = 0.25;
Border rightBorder = builder.ParagraphFormat.Borders.Right;
rightBorder.LineWidth = 1.5;

// Sets the value of ThemeColor.
rightBorder.ThemeColor = ThemeColor.Accent4;

// Sets the darkens value.
rightBorder.TintAndShade = -0.125;
builder.Write("Lorem Ipsum");
doc.Save("output.docx");

Added public property PageSetup.Margins

Related issue: WORDSNET-23931

A new public property Margins has been added to the PageSetup class:

/// <summary>
/// Returns or sets preset <see cref="Aspose.Words.Margins"/> of the page.
/// </summary>
public Margins Margins { get; set; }

A new public enum Margins has been introduced:

/// <summary>
/// Specifies preset margins.
/// </summary>
public enum Margins
Document doc = new Document("in.docx");
// Getting the current Margin type.
if (doc.Sections[1].PageSetup.Margins == Margins.Normal)
    // Setting the specified Margin type.
    doc.Sections[1].PageSetup.Margins = Margins.Mirrored;