Aspose.Words for .NET 16.8.0 Release Notes

Major Features

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

  • Huge performance optimization of UpdateFields() and ExecuteWithRegions().
  • Performance optimization of Fonts catch.
  • Support loading of Mobi (Mobipocket) documents (MOBI is an eBook format used by the MobiPocket and Amazon Kindle Readers).
  • Shapes with the translucent fill rendering implemented in PDF and other fixed-page formats. Opacity parameter is now taken into account.
  • New base class FixedPageSaveOptions added for all fixed page formats e.g. PNG, PDF, HTML and many others.
  • Over a dozen of fixes and improvements over model and flow formats.
  • Hijri/Lunar, Hebrew Calendar Date Field option supported.
  • The analogue of NEXT fields is added to LINQ Reporting Engine.

Full List of Issues Covering all Changes in this Release

WORDSNET-10377List items are rendered incorrectly.Bug
WORDSNET-12765Shape has wrong position after export to HTMLBug
WORDSNET-13450Incorrect generic font name is exported to EPUB for a missing fontBug
WORDSNET-13548Tables layout corrupted during open/save a DOCBug
WORDSNET-13666Problem converting DOC to PDF with transparent image inside docBug
WORDSNET-13682List numbers are changed after re-saving RTFBug
WORDSNET-13701Rotated image on Linux (Mono) during DOCX to HTML conversionBug
WORDSNET-13764Space after paragraph disappears in AW pdf, docx output.Bug
WORDSNET-13787Problems in arabic language direction during HTML to DOCX conversionBug
WORDSNET-13792Doc to Pdf conversion issue with GroupShape renderingBug
WORDSNET-13795The rule “Allow hanging punctuation” is processed improperly if a line ends by several spaces.Bug
WORDSNET-13797Mismatch in table styles when the docx converted to pdfBug
WORDSNET-13823The ROUND function works incorrectly with negative argumentsBug
WORDSNET-13832Unnecessary text appears after re-saving mhtmlBug
WORDSNET-13842Date field not transformed correctly if used Hijri/Lunar CalendarBug
WORDSNET-13850Chinese words are rotated in HtmlFixed formatBug
WORDSNET-13855document.UpdatePageLayout throws ArgumentOutOfRangeExceptionBug
WORDSNET-13859LayoutCollector.GetEndPageIndex throws InvalidOperationExceptionBug
WORDSNET-13866Last page missing when appending documentBug
WORDSNET-13868Bar chart labels overlap bars in the PDFBug
WORDSNET-13869Charts Leader lines are not rendering correctly in PDFBug
WORDSNET-13902Generated html has white font color and misplaced imagesBug
WORDSNET-13960Hyperlink.Result update => lost link formatting (font size, link color)Bug
WORDSNET-13961Few words show as bold incorrectly in the PDF outputBug
WORDSNET-13962ListLabel.LabelValue is rendered incorrectly in Odt and PdfBug
WORDSNET-13977Docx to pdf conversion issue with chart renderingBug
WORDSNET-13982Document.UpdateFields does not update TOC field’s numberBug
WORDSNET-13986Hebrew date field renders incorrectly in PdfBug
WORDSNET-14017‘::after’ pseudo-element is imported incorrectly from HTMLBug
WORDSNET-14056Comments numbering are changed when show revision in the balloonsBug
WORDSNET-14069When Chart object in Word document is converted to .jpg image, highest value in axis is differentBug
WORDSNET-14083Consider SpanFormField as RTL when the field start marker is RTLBug
WORDSNET-6933/vml/ Shapes are laid out incorrectly in DOC on HTML importBug
WORDSNET-8441RTL text of HTML Fixed Page document is reordered when copied to ClipboardBug
WORDSNET-9658Formula (Equation.DSMT4) background color is lost after conversion from Docx to HTMLBug
WORDSNET-13188Extract many duplicate options from Fixed-page based save formats to one abstract class.Enhancement
WORDSNET-13952Index is loosing style(italic) information.when convert rtf to docxEnhancement
WORDSNET-7762Use the Hijri/Lunar calendar field option has no effect in PDFEnhancement
WORDSNET-10055Throw a meaningful exception during Range.Replace callbackException
WORDSNET-13555Exception is thrown in VmlShapeReader while reading VML shapeException
WORDSNET-13745java.lang.NullPointerException occurs upon converting to HTMLException
WORDSNET-13816System.InvalidCastException is thrown while conversion of Docx to pdf.Exception
WORDSNET-13889ArgumentException is thrown while saving to pngException
WORDSNET-13900System.InvalidCastException is thrown while loading DocxException
WORDSNET-13901ArgumentOutOfRangeException on Section.Clone operationException
WORDSNET-13909MailMerge.ExecuteWithRegions throws System.InvalidOperationExceptionException
WORDSNET-13912Document.ImportNode throws System.NullReferenceExceptionException
WORDSNET-13924System.NullReferenceException occurs during converting DOC to PDFException
WORDSNET-13925System.NullReferenceException occurs during converting DOC to PDFException
WORDSNET-13926System.NullReferenceException occurs during converting DOC to PDFException
WORDSNET-13951Document.Save throws System.InvalidCastExceptionException
WORDSNET-13957Document.Save throws System.ArgumentOutOfRangeExceptionException
WORDSNET-13964Node.ToString(SaveFormat.Html) throws System.IndexOutOfRangeExceptionException
WORDSNET-13971Aspose.Words.FileCorruptedException is thrown while loading HtmlException
WORDSNET-13992System.NullReferenceException is thrown while saving Docx to HtmlException
WORDSNET-13996Word doc with MERGEFORMAT template variables failing to convert to PDFException
WORDSNET-14006Aspose.Words.FileCorruptedException is thrown while loading DocxException
WORDSNET-14019System.NullReferenceException occurs during converting DOCX to PDFException
WORDSNET-14089System.InvalidOperationException assertion occured while saving document to HTML formatException
WORDSNET-10041Consider exporting editable TextBox Shape to HTMLFeature
WORDSNET-13084root/ Support loading of Mobi (Mobipocket) documentsFeature
WORDSNET-13563Add support of Next field in Linq Reporting EngineFeature
WORDSNET-13389Improve Inline.Font.Hidden property performancePerformance
WORDSNET-13835Out of memory exception occurs during rendering to HTMLPerformance
WORDSNET-13837Timeout was reached upon rendering to PDFPerformance
WORDSNET-13958Docx to Doc conversion takes much timePerformance
WORDSNET-13997Aspose Words 16.6 UpdateFields() and ExecuteWithRegions() Performance problemPerformance
WORDSNET-14013Value in calculated textbox is not exported to PDF with Aspose.WordsRegression

Public API and Backward Incompatible Changes

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

WORDSNET-6933 is resolved and we have added new public property to HtmlLoadOptions class:

/// <summary>
/// Specifies HTML parser to parse conditional comments exactly like &lt;!--[if gte vml 1]&gt;
/// and not to parse conditional comments exactly like &lt;![if !vml]&gt;.
/// </summary>
public bool SupportVml
    get { return mSupportVml; }
    set { mSupportVml = value; }

Added HtmlSaveOptions.ExportTextBoxAsSvg public property

WORDSNET-10041 is resolved and we have added new public property to HtmlSaveOptions class:

/// <summary>
/// Controls how textboxes represented by <see cref="Drawing.Shape"/> are saved to HTML, MHTML or EPUB. 
/// Default value is <c>false</c>.
/// </summary>
/// <remarks>
/// <p>When set to <c>true</c>, exports textboxes as inline <b>&lt;svg&gt;</b> elements. 
/// When <c>false</c>, exports as <b>&lt;img&gt;</b> elements.</p>
/// </remarks>
public bool ExportTextBoxAsSvg
    get { return mSaveImageOptions.TextBoxAsSvg; }
    set { mSaveImageOptions.TextBoxAsSvg = value; }

HtmlLoadOptions public class is introduced

WORDSNET-6933 is resolved and HtmlLoadOptions class is a subclass of LoadOptions and should be used instead of LoadOptions whenever specific options are needed to be set when loading HTML document. Currently HtmlLoadOptions class has two properties:

/// <summary>
/// Specifies HTML parser to parse conditional comments exactly like &lt;!--[if gte vml 1]&gt;
/// and not to parse conditional comments exactly like &lt;![if !vml]&gt;.
/// </summary>
public bool SupportVml
    get { return mSupportVml; }
    set { mSupportVml = value; }
/// <summary>
/// The number of milliseconds to wait before the web request times out. The default value is 100000 milliseconds (100 seconds).
/// </summary>
/// <remarks>
/// The number of milliseconds that Aspose.Words waits for a response, when loading external resources (images, style sheets)
/// linked in HTML and MHTML documents.
/// </remarks>
public new int WebRequestTimeout
    get { return mWebRequestTimeout; }
    set { mWebRequestTimeout = value; }

Base property LoadOptions.WebRequestTimeout is marked as obsolete and will be removed in several releases. If you need to specify web request timeout use HtmlLoadOptions.WebRequestTimeout property.

Use case:

HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions();
htmlLoadOptions.SupportVml = true;
htmlLoadOptions.WebRequestTimeout = 1000;
Document doc = new Document("Test.html", htmlLoadOptions);

WORDSNET-13188 Changes in save options of fixed page formats

\1. Now all save option classes of fixed page formats (HtmlFixedSaveOptions, ImageSaveOptions, PdfSaveOptions, PsSaveOptions, SvgSaveOptions, SwfSaveOptions, XamlFixedSaveOptions and XpsSaveOptions) are inherited from the new public abstract class FixedPageSaveOptions.

\2. The MetafileRenderingOptions property has become available in the SwfSaveOptions class:

/// <summary>
/// Allows to specify metafile rendering options.
/// </summary>
public MetafileRenderingOptions MetafileRenderingOptions { get; }

\3. The JpegQuality property has become available in the XamlFixedSaveOptions and XpsSaveOptions classes:

/// <summary>
/// Gets or sets a value determining the quality of the JPEG images inside Html document.
/// </summary>
/// <remarks>
/// <para>Has effect only when a document contains JPEG images.</para>
/// <p>Use this property to get or set the quality of the images inside a document when saving in fixed page format.
/// The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100
/// means best quality but minimum compression.</p>
/// <p>The default value is 95.</p>
/// </remarks>
public int JpegQuality { get; set; }

Jpeg quality was 100 for the XAML and XPS formats in the previous version. Now its default value is 95 to unify with the other formats (except PDF).

The analogue of NEXT fields is added to LINQ Reporting Engine

The “Forcing Movement to Next Item within Data Band” section of the engine’s documentation was added to describe the change