Browse our Products

Aspose.Words for .NET 20.11 Release Notes

Major Features

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

  • Document.SpellingChecked and Document.GrammarChecked properties were exposed publicly.
  • Charts data points API was extended.
  • Implemented basic support for rendering fonts with legacy Arabic encodings.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WORDSNET-10130Implement table row wrapping around floaters as MS Word 2013 doesNew Feature
WORDSNET-16527Incorrect RTL table row wrapping around a floater in 2013 modeNew Feature
WORDSNET-18416DOCX to PDF conversion issue with table positionEnhancement
WORDSNET-20148Table row does not break across pagesEnhancement
WORDSNET-20626Converting DOC/DOCX to PDF - Page break issueEnhancement
WORDSNET-21179Saving requires a seekable streamEnhancement
WORDSNET-14311Font type is changed after converting Word to PDFEnhancement
WORDSNET-21147Expected a value between 0 and 22024 error occurs during Rendering a DOCBug
WORDSNET-21198Creating instance of LayoutEnumerator throws System.NullReferenceExceptionBug
WORDSNET-13856DOCX to PDF conversion issue with Arabic font renderingBug
WORDSNET-21240Font size of the text is changed after re-saving BIDI RTFBug
WORDSNET-21265Missing half of file when saving same DOCX file twiceBug
WORDSNET-5827Table overflow problem, while saving a document with PdfSaveOptionsBug
WORDSNET-18262Charts x-axis values and their layout is incorrect in PDFBug
WORDSNET-4745Export theme fonts to RTFBug
WORDSNET-11765Some characters are not rendering in PSBug
WORDSNET-18874ChartSeries.DataPoints.Count returns incorrect valueBug
WORDSNET-21201Field result incorrectly comparedBug
WORDSNET-11769Some characters are not rendering in PostScriptBug
WORDSNET-21007Content misplaced after DOC to PDF conversionBug
WORDSNET-21013DivideByZeroException when call UpdatePageLayout for attached documentBug
WORDSNET-13875Spell check disabled after a document saveBug
WORDSNET-18286The font is missing in the output PDF documentBug
WORDSNET-21209Content control does not lock after inserting HTMLBug
WORDSNET-17381Arabic Fonts not rendering correctly in PDFBug
WORDSNET-21217Some tests failed upon convertingBug
WORDSNET-11515AW layout may not match to MS Word when a font Spacing is negative (condensed)Bug
WORDSNET-21220Empty SDT rendered as a control to PDF leads to incorrect aps tree structureBug
WORDSNET-21045System.NullReferenceException during DOCX to PDF conversionBug
WORDSNET-20203Property inheritance issue of chart data labelsBug
WORDSNET-18656Issue with SDT blocks when Section break inside itBug
WORDSNET-21225PDF can not be openedBug
WORDSNET-21226Incorrect position of SVG images grouped togetherBug
WORDSNET-20427Page number renders incorrectly in output PDFBug
WORDSNET-19794Large memory consumption during get document statisticsBug
WORDSNET-20429Document’s text is pushed down to next pages in output PDFBug
WORDSNET-20952Investigate whether SkiaSharp blur effect can improve performance in .NET Standard versionBug
WORDSNET-20125DOCX to PDF conversion issue with font renderingBug
WORDSNET-21042Custom properties do not export in output PDFBug
WORDSNET-21074Implement conversion of images from EMF to PNG during import for DOC formatBug
WORDSNET-21075Cropping SVG images is ignoredBug
WORDSNET-21076DOCX to HTML conversion hangsBug
WORDSNET-21079DOCX to PDF conversion issue with text positionBug
WORDSNET-20809Large memory consumption during DOCX to PDF conversionBug
WORDSNET-21204Image RelativeHorizontalPosition does not set correctly in ODTBug
WORDSNET-20305Content overlaps hides header’s content in PDFBug
WORDSNET-21141MailMerge.ExecuteWithRegions throws System.ArgumentExceptionBug
WORDSNET-21031EMF converted from SVG is truncated in output Word documentBug
WORDSNET-21099Incorrect X-Axis tickmarks in charts when converting DOCX to PDFBug
WORDSNET-21214System.IndexOutOfRangeException is thrown when Noto font is set using TextWatermarkOptionsBug
WORDSNET-20924Incorrect page range extractionBug
WORDSNET-21122Debug.Assert fires during fields updatesBug
WORDSNET-21126Image size is reduced after inserting RTF into a document using InsertDocumentBug
WORDSNET-21128DOCX to PDF conversion: System.InvalidOperationExceptionBug
WORDSNET-21131INDEX field - customizing the separator between item name and page numberBug
WORDSNET-21134Protected document crashes the MS WordBug
WORDSNET-21136Images (pages) are lost after DOCX to PDF conversionBug
WORDSNET-21138Content in the last cell of the table get duplicated after breaking the mappingBug
WORDSNET-21267Can not convert from PDF to MarkdownBug
WORDSNET-21150Debug.Assert fires in UpdateTableBlockRow methodBug
WORDSNET-21104Hyperlink inserted via ReportingEngine does not navigate to the bookmarked locationBug
WORDSNET-21195System.NullReferenceException occurs upon DOCX to PDF conversionBug
WORDSNET-21152System.ArgumentException while save DOCX to HtmlBug
WORDSNET-21233Table.InsertAfter throws System.InvalidOperationExceptionBug
WORDSNET-20403Horizontal Category Axis Text of Chart has Incorrect Angle when Converting to ImageBug
WORDSNET-21160Exception raised when reading CHM fileBug
WORDSNET-21162Data labels of the category axis are rendered horizontally after converting to PDFBug
WORDSNET-21167Contents are pushed down to next pages after DOCX to PDF conversionBug
WORDSNET-21202Incorrect cropping of textbox contentsBug
WORDSNET-21281RemoveStaticFields with MailMerge: The hyperlinks are no longer working in the outputBug
WORDSNET-21270Aspose.Words cannot open WordML with <w:tab w:val=“start” />Bug
WORDSNET-20548Transparent images in generated RTF have black backgroundBug
WORDSNET-8318FieldCode of a deleted REF field appears in fixed page formatsBug
WORDSNET-8215Hebrew content in dropdown form fields is inverted during Doc to TIFF conversionBug
WORDSNET-8532RenderedDocument.Pages.Count return incorrect valueBug
WORDSNET-4008Shape is improperly renderedBug
WORDSNET-11161Hidden text should not be hyphenatedBug
WORDSNET-19910Footnotes are rendered wrongBug
WORDSNET-21057Shapes are overlapped after DOCX to PDF conversionBug
WORDSNET-21184Document.UpdateFields throws System.NullReferenceExceptionBug

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 20.11. 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 existing behavior is especially important and is documented here.

Added a new public properties Document.SpellingChecked and Document.GrammarChecked

Related issue: WORDSNET-13875

Added a new public property Document.SpellingChecked:

A new public property IgnorePrinterMetrics has been added to the LayoutOptions class.

/// <summary>
/// Returns <b>true</b> if the document has been checked for spelling.
/// </summary>
/// <remarks>
/// To recheck the spelling in the document, set this property to <b>false</b>.
/// </remarks>
public bool SpellingChecked
{ 
	get;
	set;
}

Added a new public property Document.GrammarChecked:

/// <summary>
/// Returns <b>true</b> if the document has been checked for grammar.
/// </summary>
/// <remarks>
/// To recheck the grammar in the document, set this property to <b>false</b>.
/// </remarks>
public bool GrammarChecked
{ 
	get;
	set;
}

Use Case:

Document doc = new Document(fileName);
// Verifying if this document has been checked for spelling or grammar.
if (doc.SpellingChecked || doc.GrammarChecked)
{
	// The string with spelling errors.
	doc.FirstSection.Body.FirstParagraph.FirstRun.Text = "The speeling in this documentz is all broked";
	// Spelling check start. 
	doc.SpellingChecked = false; 
	// Grammar check start. 
	doc.GrammarChecked = false;
}
doc.Save(outFileName);

Changes in API of chart data points

The following changes in chart data points API have been implemented (WORDSNET-18874):

  • The this property of the ChartDataPointCollection class has been changed to automatically create a data point if it does not exist yet. In the past, a point representing default data point properties was returned at this case.
  • The Count property of the ChartDataPointCollection class has been changed to return a number of all data points of series, not just those that have non-default formatting, as it was in the previous versions of the software.
  • The enumerator of the ChartDataPointCollection class has been changed to go through all data points of a series, not just those with non-default formatting.
  • The ClearFormat method has been added to the ChartDataPointCollection class.
  • The ClearFormat method has been added to the ChartDataPoint class.
  • The Add, RemoveAt and Clear methods have been marked as obsolete. The collection contains all data points of series now and there is no need to add points to it. The RemoveAt and Clear methods actually reset the formatting of data point(s) to default values, so the ClearFormat methods can be used instead.
public class ChartDataPointCollection
{
	/// <summary>
	/// Adds new <see cref="ChartDataPoint"/> at the specified index.
	/// </summary>
	[Obsolete("All data points are available in this collection.")]
	public ChartDataPoint Add(int index);

	/// <summary>
	/// Clears format of a <see cref="ChartDataPoint"/> at the specified index.
	/// </summary>
	[Obsolete("Use the ChartDataPoint.ClearFormat method instead.")]
	public void RemoveAt(int index);

	/// <summary>
	/// Clears format of all <see cref="ChartDataPoint"/> in this collection.
	/// </summary>
	[Obsolete("Use the ClearFormat method instead.")]
	public void Clear();

	/// <summary>
	/// Clears format of all <see cref="ChartDataPoint"/> in this collection.
	/// </summary>
	public void ClearFormat();
}

public class ChartDataPoint
{
	/// <summary>
	/// Clears format of this data point. The properties are set to the default values defined in the parent series.
	/// </summary>
	public void ClearFormat();
}

Use Case:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.InsertChart(ChartType.Line, 432, 252);
Chart chart = shape.Chart;

// Delete default generated series.
chart.Series.Clear();

ChartSeries series = chart.Series.Add("Series 1",
	new string[] { "Category 1", "Category 2", "Category 3" },
	new double[] { 1, 5, 4 });

series.Marker.Symbol = MarkerSymbol.Square;
series.Marker.Size = 10;

series.DataPoints[1].Marker.Symbol = MarkerSymbol.Circle;
series.DataPoints[1].Marker.Size = 15;

doc.Save(dir + "DataPoints.docx");

Reference: WORDSNET-21281

In the past, we satisfied a customer’s request for removing HYPERLINK fields in TOC field result when the MailMergeCleanupOptions.RemoveStaticFields option is specified. However, MS Word retains them, and an ES customer asked us to change Aspose.Words’ behaviour accordingly (WORDSNET-21281). We have implemented that in 20.11.

Here is the code snippet for backward compatibility:

foreach (FieldPageRef field in document.Range.Fields.OfType<FieldPageRef>())
	field.Unlink();

foreach (FieldHyperlink field in document.Range.Fields.OfType<FieldHyperlink>())
{
	HashSet<Inline> hyperlinkNodes = new HashSet<Inline>();
	Node resultNode = field.Separator;
	while (true)
	{
		if (resultNode is Inline inline && inline.Font.StyleIdentifier == StyleIdentifier.Hyperlink)
			hyperlinkNodes.Add(inline);

		if (resultNode == field.End)
			break;

		resultNode = resultNode.NextSibling;
	}

	// Unlink method clears Hyperlink style according to MS Word behaviour.
	field.Unlink();

	foreach (Inline inline in hyperlinkNodes)
		inline.Font.StyleIdentifier = StyleIdentifier.Hyperlink;
}