Support for Word 2013 Documents, Variables Support in LINQ Reporting Engine and Many More with Aspose.Words for .NET 17.3.0

Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.Words for .NET logoWe are pleased to announce our next version of Aspose.Words 17.3.0. This month’s release contains over 67 useful new features, enhancements and bug fixes. Please see the release notes for more detail. If you are planning to upgrade from older version of Aspose.Words to the current version, we would strongly suggest you to check the Public API and Backward Incompatible Changes section to know what APIs are changed so far.

Here is a look at just a few of the biggest features and API changes in this month’s release.

  • Full support for Word 2013 documents (roundtrip to/from DOCX)
  • Variables support and more new features are introduced in LINQ Reporting Engine.
  • New Public OfficeMath properties: MathObjectType, Justification, DisplayType
  • Font substitution mechanism improved. Now Aspose.Words evaluates all related fields in FontInfo (Panose, Sig etc) and finds the closest match among the available font sources.
  • Asian font rendering improved (more precise metrics calculation).
  • Stroke weight is now taken into account while rendering auto-sized Textboxes.
  • Implemented next round of improvements in table grid algorithm.
  • Improved table breaking logic in compatibility mode for tables with header rows.
  • Improved table breaking logic for tables with nested tables in a cell with bottom margin set.
  • Improved tables breaking logic for tables with vertically merged cells having horizontal borders.
  • Implemented fitText option for table cells.

Full Support for Word 2013 documents

Starting from Aspose.Words 17.3.0, We have added the full support of MS Word 2013 documents. The full support of roundtrip to/from DOCX is available in this Aspose.Words version.

Font Substitution Mechanism Improved

Previously, Aspose.Words performed font substitution only in cases when FontInfo in the document for the missing font doesn’t contains the PANOSE. Now Aspose.Words evaluates all related fields in FontInfo (Panose, Sig etc) and finds the closest match among the available font sources. In case of font substitution the warning is issued with text:

“Font ‘‘ has not been found. Using ” font instead. Reason: closest match according to font info from the document.”

Please note that now font substitution mechanism will override the FontSettings.DefaultFontName in cases when FontInfo for the missing font is available in the document. FontSettings.DefaultFontName will be used only in cases when there are no FontInfo for the missing font.

Moreover, please note that font substitution algorithm in MS Word is not documented So, the result of Aspose.Words font substitution may not match MS Word choice.

Added a MailMergeCleanupOptions Option to Remove Empty Row

We have introduced MailMergeCleanupOptions.RemoveEmptyTableRows option in Aspose.Words 17.3.0 to remove empty rows that contain mail merge regions from the document. Please refer to the following article:
How to Remove Empty Rows with Cleanup Option

/// <summary>
/// Specifies whether empty rows that contain mail merge regions should be removed from the document.
/// </summary>
/// <remarks>
/// This option applies only to mail merge with regions.
/// </remarks>
RemoveEmptyTableRows = 0x20

 

Added Public Property OfficeMath.MathObjectType

We have introduced new property OfficeMath.MathObjectType in Aspose.Words 17.3.0. This property allows user to get type MathObjectType of this Office Math object. The MathObjectType enumeration is added in Aspose.Words 17.3.0 to specify type of an Office Math object.

OfficeMath officeMath = GetOfficeMath();
if (officeMath.MathObjectType == MathObjectType.Matrix)
{
   // Do something useful with the Matrix object.
}

Added Public Properties OfficeMath.Justification and OfficeMath.DisplayType

We have added new public properties Justification and DisplayType into the OfficeMath class. Please refer to the following article for more detail:
Working with OfficeMath

/// <summary>
/// Gets/sets Office Math justification.
/// </summary>
/// <remarks>
/// <para>Justification cannot be set to the Office Math with display format type <see cref="OfficeMathDisplayType.Inline"/>.</para>
/// <para>Inline justification cannot be set to the Office Math with display format type <see cref="OfficeMathDisplayType.Display"/>.</para>
/// <para>Corresponding <see cref="DisplayType"/> has to be set before setting Office Math justification.</para>
/// </remarks>
public OfficeMathJustification Justification
 
 
/// <summary>
/// Gets/sets Office Math display format type which represents whether an equation is displayed inline with the text 
/// or displayed on its own line.
/// </summary>
/// <remarks>
/// <para>Display format type has effect for top level Office Math only.</para>
/// <para>Returned display format type is always <see cref="OfficeMathDisplayType.Inline"/> for nested Office Math.</para>
/// </remarks>
public OfficeMathDisplayType DisplayType

Note that Aspose.Words mimics MS Word behavior. Following is the detail:

  • DisplayType cannot be changed for nested Office Math. The exception will be thrown.
  • Inline justification cannot be set to the Office Math displayed on its own line (DisplayType=OfficeMathDisplayType.Display). The exception will be thrown. OfficeMath.DisplayType property has to be used to change OfficeMathDisplayType first.
  • Justification cannot be set to the Office Math displayed inline with text. The exception will be thrown. OfficeMath.DisplayType property has to be used to change OfficeMathDisplayType first.

Provided Ability to Specify Locale at Field Level

We have added new public property Field.LocaleId in Aspose.Words 17.3.0 that allows user to get/set field’s locale. Please refer to the following article:

Inserting Locale at Field Level

/// <summary>
/// Gets or sets LCID of the field.
/// </summary>
/// <seealso cref="FieldUpdateCultureSource.FieldCode"/>
public int LocaleId

 

Support of Variables, Dynamic Text Background Setting, and a New Image Size Fit mode Added to LINQ Reporting Engine

We have added new paramerter -fitSizeLim for image tag to change the size of the textbox according to the size of the image without increasing the size of the textbox. Please read the detail here:

Inserting Images Dynamically

We have added the support of variables in in Aspose.Words 17.3.0. LINQ Reporting Engine enables you to use variables in template documents. Variables are useful when you need to calculate an expensive value just once and access it multiple times in a template. Please read the detail from here:

Using Variables
In-Table List Template with Running (Progressive) Total

We have added support of setting text background color dynamically in Aspose.Words 17.3.0. Please read the detail here:

Setting Text Background Color Dynamically

Aspose.Words for .NET Resources

The following resources will help you work with Aspose.Words for .NET: