Browse our Products

Aspose.Words for .NET 21.3 Release Notes

Major Features

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

  • ClearQuickStyleGallery method of StyleCollection class was introduced.
  • Extended font API to set Fill properties of text.
  • Added an ability to work with child nodes of StructuredDocumentTag range.
  • Fixed issue with nested PDF bookmarks due to merged hidden paragraphs.
  • Supported Select and SelectMany extension methods for LINQ Reporting Engine.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WORDSNET-7788Support Font.Fill property and provide public members in APINew Feature
WORDSNET-17851LINQ Reporting Engine - Support Select extension methodNew Feature
WORDSNET-18173Implement full functionality of MERGESEQ fieldNew Feature
WORDSNET-12810Provide bool FontSettings.SetFontsFolder overloadNew Feature
WORDSNET-20554Support dynamic cell merging in both directions simultaneously for LINQ Reporting EngineNew Feature
WORDSNET-21425LINQ Reporting Engine - Support SelectMany extension methodNew Feature
WORDSNET-21189Add feature to get the content of StructuredDocumentTagRangeStartNew Feature
WORDSNET-21785Remove styles from Style GalleryNew Feature
WORDSNET-9676Incorrect result of Node.NextSiblingEnhancement
WORDSNET-16692Improve path gradient rendering in .NET StandardBug
WORDSNET-12371Date field value is changed after re-saving ODTBug
WORDSNET-21788Memory consumption issueBug
WORDSNET-21539Very long backward conversion time HTML-to-DOCXBug
WORDSNET-21790Text from INCLUDETEXT field no longer appearing in mailmerge using Aspose WordsBug
WORDSNET-16714TestSaveToImageHorizaontalVerticalResolution is rendered improperlyBug
WORDSNET-18067UpdateFields does not update REF field with FieldRef.IncludeNoteOrComment attribute properlyBug
WORDSNET-18083TOC field with designated bookmark picks up SEQ entries from outside of it, until it is manually updatedBug
WORDSNET-21196Even/Odd numbered pages use wrong header/footer definitions upon RTF to PDF conversionBug
WORDSNET-10033Field.Type return incorrect value for SaveDate field when it is hiddenBug
WORDSNET-21511Two borders displayed instead of One in converted documentsBug
WORDSNET-21806DOCX to PDF: System.NullReferenceException thrownBug
WORDSNET-21681Part of text is lost during DOCX-to-Markdown conversionBug
WORDSNET-21777Shapes collection grows on each creation of LayoutCollectorBug
WORDSNET-16695TestPathGradientFill metafile is rendered improperlyBug
WORDSNET-21666Analyse Aspose.Words.Net NuGet Used By packagesBug
WORDSNET-18100Chart’s series do not render correctly in output PDFBug
WORDSNET-21667Turkish characters in the headings are corruptedBug
WORDSNET-21668Analyze LoadOptions inheritance treeBug
WORDSNET-19580Incorrect scaling of the horizontal date axis after conversion to PDFBug
WORDSNET-21820Incorrect Page Number Appears in Extracted DocumentBug
WORDSNET-21817Benchmark fails on .NetStandard projectsBug
WORDSNET-21502Document.PageCount throws System.DivideByZeroExceptionBug
WORDSNET-21861Text with “Berlin Sans FB Demi” is rendered incorrectly when converting to PNGBug
WORDSNET-21674Investigate and fix XXE vulnerabilities in Aspose.Words.NetBug
WORDSNET-20097Conversion to PDF displays hidden contentBug
WORDSNET-21678Text and Image are overlapped in output PDFBug
WORDSNET-19844A Table Repeats on all Pages of Rendered DocumentBug
WORDSNET-21682Base URL collisionBug
WORDSNET-198454 Pages DOC turned into a 86 Pages PDFBug
WORDSNET-18900Rounded corners are converted differently in HTMLBug
WORDSNET-21870Aspose.Words.FileCorruptedException occurs upon loading a DOCBug
WORDSNET-21687Bookmarks wrongly nested when hidden headingsBug
WORDSNET-21874Unexpected results produced when comparing Documents with ImagesBug
WORDSNET-21690System.NullReferenceException is thrown when call UpdatePageLayoutBug
WORDSNET-18817Low performance for Document.UpdatePageLayout() methodBug
WORDSNET-19614Value of attribute “id” of navPoint element is invalid for an XML nameBug
WORDSNET-21414Some Lines move to Next Pages in PDFBug
WORDSNET-21559Table moves and touches the left page edge in rendered documentBug
WORDSNET-21869System.IO.FileLoadException upon PDF to ODT conversionBug
WORDSNET-21403Wrong header & footer definitions used for odd and even numbered pages in PDF?sBug
WORDSNET-19911Even numbered pages use header/footer definition for odd numbered pageBug
WORDSNET-19138Header contents are lost in output PDF when FieldToc.UpdatePageNumbers is calledBug
WORDSNET-21710ArgumentException when save document to pngBug
WORDSNET-21708InvalidCastException  is thrown when call UpdatePageLayoutBug
WORDSNET-21408Missing textboxes during conversion from HTML to DOCXBug
WORDSNET-21646LINQ Reporting engine does not Sum the table column data correctlyBug
WORDSNET-21712DOCX is corrupted after calling Document.UpdateFieldsBug
WORDSNET-21591Random content copied to the output after converting the DOCX file with Content ControlsBug
WORDSNET-21889FileCorruptedException occurs for a DOC | EndOfStreamException: Unable to read beyond the end of the streamBug
WORDSNET-21498Remove and modify rels - Shape.HRef does not workBug
WORDSNET-21723Reconfigure recipients list on JenkinsBug
WORDSNET-21729RTF content is not converted to PDF correctlyBug
WORDSNET-21734PDF output does not pass accessibility check for alt text for header imageBug
WORDSNET-20944Frozen application on Document.UpdatePageLayout()Bug
WORDSNET-21747The text labels for the bubble chart should not be drawn for zero valueBug
WORDSNET-21909Aspose.Words.FileCorruptedException occurs upon loading a DOCBug
WORDSNET-21749The document isn’t opened by APIBug
WORDSNET-21298ArgumentOutOfRangeException while extract pagesBug
WORDSNET-21483Image scaling is incorrect when custom resolution is specified.Bug
WORDSNET-21618Aspose.Words.FileCorruptedException error when converting HTML to DOCBug
WORDSNET-21619Japanese font is incorrectly rendered in output PDFBug
WORDSNET-21611Document.Compare throws System.NullReferenceExceptionBug
WORDSNET-21627Aspose.Words generates PDF document with incorrect compliance levelBug
WORDSNET-21765Test fails for .NET Framework 2.0Bug
WORDSNET-21641System.ArgumentOutOfRangeException occurs upon Word to PDF conversionBug
WORDSNET-21194Consider ignoring certain hyperlinks with special URI schemas when loading CHM documentsBug
WORDSNET-18968Inserting HTML lists causes empty list entryBug
WORDSNET-21769File Corrupted Exception occurs upon loading a Word DocumentBug
WORDSNET-21768Document.Compare throws ArgumentOutOfRangeExceptionBug
WORDSNET-21770StoreItemChecksum removed after re-saving documentBug
WORDSNET-21771Document.ExtractPages adds extra Table BordersBug
WORDSNET-21775Diagonal border appears in table after RTF to PDF conversionBug
WORDSNET-16681UnifiedTestSteveQuarles TIFF is has incorrect height.Bug
WORDSNET-21367Internal Aspose nuget server hangs sometimesBug
WORDSNET-21660Double border around image appears during HTML to Word conversionBug
WORDSNET-21326AW hangs with tha test document on Linux when Tahoma font is absentBug
WORDSNET-21743DOCX to PDF conversion issue with Arabic text renderingBug
WORDSNET-21507Specific Mhtml file can’t ne opened - Aspose.Words.FileCorruptedExceptionBug
WORDSNET-21714Arabic Text shifted up & few Arabic Words get cut post transformationBug
WORDSNET-21827Adding HtmlFragment does not fit to A4 pageBug

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 21.3. 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.

Aspose.Words.DigitalSignatures namespace was introduced

Due to refactoring work on Aspose.Words namespaces, DigitalSignature, DigitalSignatureCollection, DigitalSignatureUtil, DigitalSignatureType, CertificateHolder, SignOptions classes were moved to new separate namespace Aspose.Words.DigitalSignatures In case of compilation error - please add using Aspose.Words.DigitalSignatures.

Aspose.Words.Vba namespace was introduced

Due to refactoring work on Aspose.Words namespaces, VbaModule, VbaModuleCollection, VbaProject, VbaReference, VbaReferenceCollection, VbaModuleType, VbaReferenceType classes were moved to new separate namespace Aspose.Words.Vba. In case of compilation error - please add using Aspose.Words.Vba.

ListFormat class was moved to Aspose.Words.Lists namespace

Due to refactoring work on Aspose.Words namespaces, ListFormat class was moved to the Aspose.Words.Lists namespace. In case of compilation error - please add using Aspose.Words.Lists.

Added a new public method ClearQuickStyleGallery()

Related issue: WORDSNET-21785

Added a new public method ClearQuickStyleGallery() to StyleCollection class:

/// <summary>
/// Removes all styles from the Quick Style Gallery panel.
/// </summary>
public void ClearQuickStyleGallery()

Use Case:

Document doc = new Document(docPath);
doc.Styles.ClearQuickStyleGallery();
doc.Save(dsrPath, saveOptions);

Added warning callback property for font sources

Related issue: WORDSNET-12810

The following public property have been added to the FontSourceBase class:

/// <summary>
/// Called during processing of font source when an issue is detected that might result in formatting fidelity loss.
/// </summary>
public IWarningCallback WarningCallback
{
  get; set;
}

Use Case:

FontSettings settings = new FontSettings();
settings.SetFontsFolder("bad folder?", false);

FontSourceBase source = settings.GetFontsSources()[0];
IWarningCallback wc = new CustomWarningCallback();
source.WarningCallback = wc;

IList<PhysicalFontInfo> fontInfos = source.GetAvailableFonts();

Console.WriteLine((wc as IList<WarningInfo>)[0].Description);

The output will be:

Error loading font from the folder "bad folder?": Illegal characters in path.

Extended font API to set Fill properties of text

Related issue: WORDSNET-7788

The Fill property can be accessed not only from ShapeBase, but also from Font object now:

/// <summary>
/// Represents fill formatting for an object.
/// </summary>
/// <remarks>
/// <p>Use the <see cref="ShapeBase.Fill"/> or <see cref="Font.Fill"/> property
/// to access fill properties of an object.
/// You do not create instances of the <see cref="Fill"/> class directly.</p>
///
/// <p>Although the <see cref="Fill"/> class provides properties to specify solid color fill only,
/// all of the more complex fill types, including as gradient, pattern and texture are fully preserved
/// during document open-save cycles.</p>
/// </remarks>
public class Fill

Also, the following new public properties were added into the Fill class:

/// <summary>
/// Gets or sets a Color object that represents the foreground color for the fill.
/// </summary>
public Color ForeColor

/// <summary>
/// Gets or sets a Color object that represents the background color for the fill.
/// </summary>
public Color BackColor

/// <summary>
/// Gets or sets value that is <c>true</c> if the formatting applied to this instance, is visible.
/// </summary>
public bool Visible

/// <summary>
/// Gets or sets the degree of transparency of the specified fill as a value between 0.0 (opaque) and 1.0 (clear).
/// </summary>
/// <remarks>This property is the opposite of property <see cref="Opacity"/>.</remarks>
public double Transparency

/// <summary>
/// Gets or sets whether the fill rotates with the specified object.
/// </summary>
public bool RotateWithObject

/// <summary>
/// Gets a fill type.
/// </summary>
public FillType FillType

In addition, the following new public enumeration is added into Aspose.Words.Drawing namespace:

/// <summary>
/// Specifies fill type for a fillable object.
/// </summary>
public enum FillType
{
    /// <summary>
    /// Solid fill.
    /// </summary>
    Solid = 1,

    /// <summary>
    /// Patterned fill.
    /// </summary>
    Patterned = 2,
     
    /// <summary>
    /// Gradient fill.
    /// </summary>
    Gradient = 3,
     
    /// <summary>
    /// Textured fill.
    /// </summary>
    Textured = 4,
     
    /// <summary>
    /// Fill is the same as the background.
    /// </summary>
    Background = 5,
     
    /// <summary>
    /// Picture fill.
    /// </summary>
    Picture = 6
}

Use Case: Explains how to use Fill object for the Font.

// Open some document with text effects.
const string myDir = @"example\";
Document doc = new Document(myDir + "TextTwoColorGradient.docx");

// Get Fill object for Font of the first Run.
Fill fill = doc.FirstSection.Body.FirstParagraph.Runs[0].Font.Fill;

// Check Fill properties of the Font.
Console.WriteLine("The type of the fill is: {0}", fill.FillType);
Console.WriteLine("It is{0} visible.", fill.Visible ? "" : " not");
Console.WriteLine("The foreground color of the fill is: {0}", fill.ForeColor);
Console.WriteLine("The background color of the fill is: {0}", fill.BackColor);
Console.WriteLine("The fill is transparent at {0}%", fill.Transparency * 100);
Console.WriteLine("Note the opacity is opposite to transparency and has value: {0}%", fill.Opacity * 100);

// You can change, for example, the foreground color.
fill.ForeColor = Color.Yellow;
// Or even make it invisible.
fill.Visible = false;
// But let's make it visible again with foreground color Red.
fill.ForeColor = Color.Green;
// Note, it now has Solid type with 100% opacity.
Console.WriteLine("\nThe fill is changed:");
Console.WriteLine("The type of the fill is: {0}", fill.FillType);
Console.WriteLine("The foreground color of the fill is: {0}", fill.ForeColor);
Console.WriteLine("The fill opacity is {0}%", fill.Opacity * 100);

// Let's also change the transparency.
fill.Transparency = 0.25;
Console.WriteLine("\nThe fill is changed once again:");
Console.WriteLine("The fill transparency is {0}%", fill.Transparency * 100);

doc.Save(myDir + "TextTwoColorGradient Out.docx");
/*
This code example produces the following results:

The type of the fill is: Gradient
It is visible.
The foreground color of the fill is: Color [A=255, R=128, G=0, B=0]
The background color of the fill is: Color [A=255, R=0, G=0, B=0]
The fill is transparent at 16%
Note the opacity is opposite to transparency and has value: 84%

The fill is changed:
The type of the fill is: Solid
The foreground color of the fill is: Color [A=255, R=0, G=128, B=0]
The fill opacity is 100%

The fill is changed once again:
The fill transparency is 25%
*/

Added an ability to work with child nodes of StructuredDocumentTagRangeStart

Related issue: WORDSNET-21189

The following public property have been added to the StructuredDocumentTagRangeStart class:

/// <summary>
/// Gets all nodes between this range start node and the range end node.
/// </summary>
public NodeCollection ChildNodes

The following public method have been added to the StructuredDocumentTagRangeStart class:

/// <summary>
/// Returns a live collection of child nodes that match the specified types.
/// </summary>
public NodeCollection GetChildNodes(NodeType nodeType, bool isDeep)

These changes allows to enumerate child nodes of ranged structured document tag. For customer convenience feature follows CompositeNode pattern and returns live collection.

Use Case: Explains how to work with child nodes of StructuredDocumentTagRangeStart

Document doc = new Document("document-containing-ranged-structured-document-tag");
StructuredDocumentTagRangeStart tag = (StructuredDocumentTagRangeStart)doc.FirstSection.Body.FirstChild;

Console.WriteLine(tag.ChildNodes.Count);

foreach(Node node in tag.ChildNodes)
    Console.WriteLine(node.NodeType);

foreach(Node node in tag.GetChildNodes(NodeType.Run, true))
    Console.WriteLine(node.GetText());

Changed loading of integer values from JSON, XML, and CSV for LINQ Reporting Engine

Related issue: WORDSNET-21646

In versions of Aspose.Words prior 21.3, LINQ Reporting Engine treated integer values as 32-bit or 64-bit depending on actual values while loading data from JSON, XML, or CSV. Starting from Aspose.Words 21.3, integer values are always treated as 64-bit in the mentioned scenario. This can be a breaking change in some rare cases.

The following sections of the engine’s documentation were updated accordingly (see “LINQ Reporting Engine API”):

“Accessing XML Data” “Accessing JSON Data” “Accessing CSV Data”

Supported dynamic cell merging in both directions simultaneously for LINQ Reporting Engine

Related issue: WORDSNET-20554

The “Merging Table Cells Dynamically” section of the engine’s documentation was updated to describe the change.

Supported Select and SelectMany extension methods for LINQ Reporting Engine

Related issue: WORDSNET-21425 and WORDSNET-17851

The “Appendix A. Enumeration Extension Methods” section of the engine’s documentation was updated to describe the change.