Aspose.Words for .NET 16.6.0 Release Notes

Major Features

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

  • Fast extraction from DOC format via PlainTextDocument class is faster by a factor of ten (at a cost).
  • Saving DOCX as ISO 29500 Strict OOXML format is available now.
  • Added support for outer document insertion to LINQ Reporting Engine.
  • Added feature to insert empty values in chart series.
  • HTML radio input fields are imported to AW as HtmlOleControl nodes/HtmlOleControl nodes are exported to HTML as HTML input tags.
  • Implemented support for “show revisions in balloons” option.
  • Implemented “suppress endnotes” property.
  • Numerous Complex Script improvements, asian typography detection, kinsoku rule handling.
  • Improved PDF export to support Acrobat PDF IFilter.
  • Field.GetFieldCode() improved to work with nested fields’ codes that spanned among paragraphs or sections.
  • Introduced a Field.GetFieldCode(bool) overload that controlling whether to include child field codes.
  • Added the MailMerge.GetRegionsByName() method so that the user can obtain a list of regions by the specified name.
  • Added the MailMergeRegionInfo.Level property that allows to get the nesting level of a mail merge region.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WORDSNET-10518UpdateFields does not calculate NOTEREF field properlyBug
WORDSNET-12497Camera Rotation DML effect with shadow looks incorrect after rendering.Bug
WORDSNET-12568Text overlaps after generating pdfBug
WORDSNET-12935DocumentBuilder.InsertHtml issue with list itemsBug
WORDSNET-13008System.ArgumentOutOfRangeException is thrown when getting chart title font or setting chart title text.Bug
WORDSNET-13187/shrink spaces/ System.NullReferenceException during converting to PDFBug
WORDSNET-13194Adobe Accessibility check fails for LinksBug
WORDSNET-13225Word to PDF conversion tables formatting changing between the source and the converted documentBug
WORDSNET-13235Document.UpdateFields doesn’t update TOC as MS Word 2016 does in German language environmentBug
WORDSNET-13272/CJK baseline /The last line is moved to the next pageBug
WORDSNET-13304CompatibilityOptions.OptimizeFor does not remove “Compatibility mode” ribbonBug
WORDSNET-13320Issue with hr indentation when saving doc as htmlBug
WORDSNET-13408Doc to Pdf conversion issue with MACROBUTTON renderingBug
WORDSNET-13415The contents of last page are truncated after re-saving the DocBug
WORDSNET-13416The contents of last page are truncated after re-saving the DocBug
WORDSNET-13423Doc to XML conversion issue with markup of imagesBug
WORDSNET-13476Image is lost after saving html to Png/Docx/HtmlBug
WORDSNET-13486Check boxes occupy more space which causes blank page in PDFBug
WORDSNET-13527StructuredDocumentTag.RemoveSelfOnly changes the Sdt textBug
WORDSNET-13539Rule Kinsoku is applied incorrectlyBug
WORDSNET-13552Docx to Pdf conversion issue with image renderingBug
WORDSNET-13562Result of STYLEREF is rendered on next line in output PdfBug
WORDSNET-13572Aspose.Words.Document generates inefficient XPSBug
WORDSNET-13580HeaderFooter of last section is removed after mail merge processBug
WORDSNET-13583GetFieldCode on a IF field returning EmptyBug
WORDSNET-13586TOC update shows Error Bookmark not definedBug
WORDSNET-13587TOC update shows Error Bookmark not definedBug
WORDSNET-13588Images are not completely visible in generated PDFBug
WORDSNET-13590Bounds of primary vertical axis of chart are changed after conversion from Docx to PdfBug
WORDSNET-13600DocumentBuilder.InsertHtml does not render MathML in output documentBug
WORDSNET-13604Space between ListLabel and List item is removed after conversion from Docx to PdfBug
WORDSNET-13607Bullet list is converted to numbered list after re-saving DocxBug
WORDSNET-13608Images are rendering at incorrect position in PDFBug
WORDSNET-13609Non-breaking space is converted to square block after conversion from Html to DocBug
WORDSNET-13610Table in TextBox renders incorrectly in PDFBug
WORDSNET-13614Format (custom angle) of horizontal axis of chart is changed after re-saving DocxBug
WORDSNET-13615Docx to Pdf conversion issue with chart renderingBug
WORDSNET-13616Background lines in plot area of chart do not render in output Pdf/DocBug
WORDSNET-13617Chart title is changed after conversion from Docx to Pdf/DocBug
WORDSNET-13618Gradient background appears in plot area of chart in output Doc/PdfBug
WORDSNET-13620Chart data series are changed after conversion from Docx to PdfBug
WORDSNET-13622StructuredDocumentTag of type DROP_DOWN_LIST is not retaining its value when saving as PDF formatBug
WORDSNET-13627Link disappears during open save a DOCXBug
WORDSNET-13628Document.UpdateFields does not update the TOC fieldBug
WORDSNET-13632Diagram gets messed up during open/save a DOCXBug
WORDSNET-13636COLSPAN not working for insertHTMLBug
WORDSNET-13637Images not visible in pdf outputBug
WORDSNET-13638Incorrect encoding applied upon converting DOC to PDFBug
WORDSNET-13645Picture width is incorrect in generated HtmlFixedBug
WORDSNET-13646A Drawing renders incorrectly in PDFBug
WORDSNET-13649Data missing when inserting SVG image in Word documentBug
WORDSNET-13663Incorrect positions of list items markers with Roman numerals imported from HTMLBug
WORDSNET-13673Invalid location of the META element when converting DOCX to HtmlFixedBug
WORDSNET-13680Horizontal lines appear at the start of document after re-saving RTFBug
WORDSNET-13687Image is cropped after conversion from Docx to PdfBug
WORDSNET-13693Document.UpdateFields incorrectly calculates SUM fields valueBug
WORDSNET-13694Document.UpdateFields incorrectly calculates SUM fields valueBug
WORDSNET-13713Field Function ‘Page’ does not handle all formats when converting Flat-OPC to PDFBug
WORDSNET-13718Diagram gets messed up during open/save to PDF.Bug
WORDSNET-13720Contents of OfficeMath are changed after re-saving DocxBug
WORDSNET-13727Field.IsLocked property has no effect when saving documentBug
WORDSNET-13728Contents move to previous page after conversion from Docx to PdfBug
WORDSNET-13731The rule “Allow hanging punctuation” should not be applied.Bug
WORDSNET-13742Paragraph alignment is changed after conversion from Doc to HtmlFixedBug
WORDSNET-13746Problem converting OfficeMath equations into PDFBug
WORDSNET-13751Docx to Pdf conversion issue with NumeralFormat.ContextBug
WORDSNET-1829Row Height is not retrieved into HTML when HeightRule is Auto.Bug
WORDSNET-5853While doc to Pdf, Pdf page count is less than input Word fileBug
WORDSNET-6470AW ignores the sign of the currency when calculating the sum of the range of table cells but Word saves one and shows it in the result field.Bug
WORDSNET-7179/line metrics + font substitution/ Spacing between lines is incorrect in PDFBug
WORDSNET-8358Charts move on to the next page and lose their X,Y position in PDFBug
WORDSNET-9151Hidden comments are rendered in PDFBug
WORDSNET-13239Indent lists inserted with InsertHtmlEnhancement
WORDSNET-13455List label revision is not exported properly.Enhancement
WORDSNET-13460Documents converted from Word to PDF are not properly extractable by an IFilterEnhancement
WORDSNET-13683Aspose.Words.FileCorruptedException is thrown while loading RTFEnhancement
WORDSNET-13692Docx to Pdf conversion issue with Hebrew content’s positionEnhancement
WORDSNET-13724Improve Asian typography detection by using TTFont.IsCjkSupported instead of predefined Asian font listEnhancement
WORDSNET-13738Export HtmlOleControls to HTML using HTML tagsEnhancement
WORDSNET-5412Checkbox selected attribute is ignored in HTML importEnhancement
WORDSNET-7822RadioButtons are not preserved during converting HTML to DOCXEnhancement
WORDSNET-8826Import radio input html field as HTMLCONTROL Forms.HTML:Option.1Enhancement
WORDSNET-13314Document.Save throws System.ArgumentException while saving Docx to HtmlException
WORDSNET-13443System.Xml.XmlException is thrown while loading DocxException
WORDSNET-13493MailMerge.ExecuteWithRegions throws System.InvalidOperationExceptionException
WORDSNET-13546Aspose.Words.FileCorruptedException occurs upon loading a XMLException
WORDSNET-13642MailMerge.ExecuteWithRegions throws System.InvalidOperationExceptionException
WORDSNET-13651Aspose.Words.FileCorruptedException is thrown while loading DocxException
WORDSNET-13656Aspose.Words.FileCorruptedException is thrown while loading RTFException
WORDSNET-13657Aspose.Words.FileCorruptedException is thrown while loading RTFException
WORDSNET-13658Aspose.Words.FileCorruptedException is thrown while loading RTFException
WORDSNET-13659System.InvalidOperationException occurs during DOCX-to-HTML conversionException
WORDSNET-13697UpdateFields throws “Index was outside the bounds of the array” exceptionException
WORDSNET-13698Aspose.Words.FileCorruptedException occurs upon loading a MHTException
WORDSNET-13703‘An object already included into list’ error during document reflowException
WORDSNET-13721Handle the case when DML text effects are used for OTF(CFF) fontsException
WORDSNET-12425Tag with name ’effectStyleLst’ is not supportedFeature
WORDSNET-12426Import of element ’effectStyleLst’ is not supported in Docx format by Aspose.WordsFeature
WORDSNET-12427Tag with name ‘objectDefaults’ is not supportedFeature
WORDSNET-12428Import of element ‘objectDefaults’ is not supported in Docx format by Aspose.WordsFeature
WORDSNET-13054Provide API to change default proofing languageFeature
WORDSNET-13329Add feature to insert Document after populating it with data using LINQ Reporting EngineFeature
WORDSNET-13428Add feature to insert empty values in chart seriesFeature
WORDSNET-13432Add feature to get the nested level number of Mail Merge RegionFeature
WORDSNET-13433Add feature to get MailMergeRegionInfo by Region nameFeature
WORDSNET-13739Add the feature to show the delete revision in pdfFeature
WORDSNET-7741Load and save ISO/IEC 29500 Strict / Word 2013 OOXMLFeature
WORDSNET-9431A Paragraph in Table breaks into two lines during saving a RTF to DOCXFeature
WORDSNET-9664Support SuppressEndnotes property when saving to fixed page formatsFeature
WORDSNET-13654Performance degradation in v16.4.0 while inserting EMF into Document and save document to PdfPerformance
WORDSNET-13711Aspose.Words.FileCorruptedException occurs upon loading a FlatOpcRegression
WORDSNET-13712System.InvalidOperationException is thrown while saving Docx to PdfRegression
WORDSNET-13809Document.UpdateFields throws System.InvalidOperationExceptionRegression

Public API and Backward Incompatible Changes

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

Added Support for Outer Document Insertion to LINQ Reporting Engine

WORDSNET-13329 has been resolved. The Inserting Documents Dynamically section was added to the LINQ Reporting Engine’s documentation.

Fast Extraction from DOC Format via PlainTextDocument Class is Faster by a Factor of Ten (at a cost)

WORDSNET-13498 has been resolved. We’ve improved the speed of fast text indexing method for DOC format available via public API as PlainTextDocument. However to do this a special DOC reader had to be written which only guarantees the order of plain text within a story upon reading. This means that document sections may be swapped around, and their order is not guaranteed. However the order of paragraphs words and so forth within is section will be as usual.

RevisionOptions has ShowRevisionBalloons Option now

WORDSNET-13739 has been resolved. ShowRevisionBalloons property has been added to the RevisionOptions class. This option lets a user to show formatting changes in the balloons. NOTE: Now it works only for delete revisions.

/// <summary>
/// Allows to specify whether the formatting changes are rendered in the balloons.
/// Default value for this property is <c>false</c>.
/// <remarks>
/// <para>
/// Only works for <see cref="RevisionType.Deletion"/>.
/// For <see cref="RevisionType.FormatChange"/> and <see cref="RevisionType.Insertion"/> is not supported yet.
/// </para>
/// </remarks>
/// </summary>
public bool ShowRevisionBalloons
{
    get { return mShowRevisionBalloons; }
    set
    {
        mHasChanged = true;
        mShowRevisionBalloons = value;
    }
}

Example of how to use:

Document doc = new Document(@"Document.docx");
doc.LayoutOptions.RevisionOptions.ShowRevisionBalloons = true;
string outFileName = (@"Out.pdf");
doc.Save(outFileName);

Saving DOCX as ISO 29500 Strict OOXML Format is Available now

A new member Iso29500_2008_Strict is added into the OoxmlCompliance enum type. UseCase to save as Strict OOXML:

Document doc = new Document();
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
saveOptions.Compliance = OoxmlCompliance.Iso29500_2008_Strict;
doc.Save(@"C:\MyDir\strict_OOXML.docx", saveOptions);

Limitations:

  • ISO 29500 Strict forbids VML, so we had to do a quick conversion hack by rendering VML shapes into pictures and storing them as DML Pictures. Proper VML->DML conversion is a big task without an ETA
  • Testing has been done on documents mostly from our TestBase, so Support people please be prepared to receive a number of non-conformant, non-compliant and generally bad smelling documents that will violate our model assumptions in one way or another.

Added Feature to Insert Empty Values in Chart Series.

WORDSNET-13428 has been resolved. Starting from 16.6.0 Version, Aspose.Words supports an empty values in chart data series and categories upon creating. For example, you are going to create the chart with the following data:

aspose-words-for-net-16-6-0-release-notes_1

In this case you have to use the code provided below: double.NaN value is used as empty data value. null is used as empty category name.

// Add chart with default data.
Shape shape = builder.InsertChart(ChartType.Line, 432, 252);
Chart chart = shape.Chart;
ChartSeriesCollection seriesColl = chart.Series;
seriesColl.Clear();

// Create category names array, second category will be null.
string[] categories = new string[] { "Cat1", null, "Cat3", "Cat4", "Cat5" };

// Adding new series with empty (double.NaN) values.
seriesColl.Add("AW Series 1", categories, new double[] { 1, 2, double.NaN, 4, 5 });
seriesColl.Add("AW Series 2", categories, new double[] { 2, 3, double.NaN, 5, 6 });
seriesColl.Add("AW Series 3", categories, new double[] { double.NaN, 4, 5, double.NaN, double.NaN });

The resulted chart looks like this:

aspose-words-for-net-16-6-0-release-notes_2

Added MailMergeRegionInfo.Level Property

WORDSNET-13432 has been resolved. We have added the MailMergeRegionInfo.Level property to satisfy customer’s requirements logged in WORDSNET-13432. Following property for getting/setting level number will be added to public API for Aspose.Words.MailMerging.MailMergeRegionInfo class:

namespace Aspose.Words.MailMerging
{
    /// <summary>
    /// Contains information about a mail merge region.
    /// </summary>
    public class MailMergeRegionInfo
    {
...
        /// <summary>
        /// Return nesting level for the region.
        /// </summary>
        public int Level
        {
            get { return mRegionLevel; }
        }
        /// <summary>
        /// Sets nesting level for the region.
        /// </summary>
        internal void SetRegionLevel(int val)
        {
            mRegionLevel = val;
        }
...
        private int mRegionLevel = 0;
...
}

Added MailMerge.GetRegionsByName() Method

WORDSNET-13433 has been resolved. We have added the MailMerge.GetRegionsByName() method so that the user can obtain a list of regions by the specified name as follows:

public class MailMerge
{
...
        /// <summary>
        /// Returns a collection of mail merge regions with given name.
        /// </summary>
        /// <param name="regionName">Region name (case-insensitive).</param>
        /// <returns>The list of regions.</returns>
        public ArrayList GetRegionsByName(string regionName)

XpsSaveOptions.OptimizeOutput Option Added

WORDSNET-13572 has been resolved. Following new option is available in XpsSaveOptions:

/// <summary>
/// Flag indicates whether it is required to optimize output of XPS.
/// If this flag is set redundant nested canvases and empty canvases are removed,
/// also neighbor glyphs with the same formating are concatenated.
///
/// Default is false.
/// </summary>
public bool OptimizeOutput

Field.GetFieldCode() Improved, Added Field.GetFieldCode() Overload

As a resolution for WORDSNET-13583, we decided to improve the method Field.GetFieldCode(). Now it collects field’s code properly: the returned string includes all nested fields’ codes and results regardless of how the parent field is spanned among paragraphs or sections. Additionally, we have introduced a Field.GetFieldCode(bool) overload that accepts a parameter controlling whether to include child field codes into the resulting string. The user can pass false if they want to see nested fields’ results only.