Browse our Products

Aspose.Words for Java 23.2 Release Notes

Major Features

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

  • MOBI (also called PRC, AZW - Amazon Kindle’s proprietary e-book file format) is now supported for import and export.
  • Added an ability to specify the character spacing adjustment of a document.
  • Provided the way to instruct Aspose.Words whether to include textboxes, footnotes and endnotes in word count statistics.
  • Introduced the new option for the document style, which allows specifying whether this style is automatically redefined based on the appropriate value.
  • Significantly improved chart rendering.
  • Implemented support for “Lay out footnotes the way Word 6.x/95/97 does” compatibility option.

Full List of Issues Covering all Changes in this Release

Public API and Backward Incompatible Changes

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

Added public property Document.IncludeTextboxesFootnotesEndnotesInStat

Related issue: WORDSNET-24819

The following public property was added to the Aspose.Words.Document class:

/// <summary>
/// Specifies whether to include textboxes, footnotes and endnotes in word count statistics.
/// </summary>
public bool IncludeTextboxesFootnotesEndnotesInStat
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.Writeln("Lorem ipsum");
builder.InsertFootnote(FootnoteType.Footnote, "sit amet");

// Check the option is set to 'false' by default when a new document is created.
Console.WriteLine("By default for new document this option is set to '{0}'", doc.IncludeTextboxesFootnotesEndnotesInStat);

doc.UpdateWordCount();
Console.WriteLine("Words count without textboxes, footnotes and endnotes: {0}", doc.BuiltInDocumentProperties.Words);

// Change option.
doc.IncludeTextboxesFootnotesEndnotesInStat = true;
doc.UpdateWordCount();
Console.WriteLine("Words count with textboxes, footnotes and endnotes: {0}", doc.BuiltInDocumentProperties.Words);

/* This code produces the following output:
By default for new document this option is set to 'False'
Words count without textboxes, footnotes and endnotes: 2
Words count with textboxes, footnotes and endnotes: 4
*/

Added public property Document.JustificationMode

Related issue: WORDSNET-24455

A new public property JustificationMode has been added to the Document class:

/// <summary>
/// Gets or sets the character spacing adjustment of a document.
/// </summary>
public JustificationMode JustificationMode { get; set; }
Document doc = new Document("in.docx");
// Getting JustificationMode.
JustificationMode justificationMode = doc.JustificationMode;
if (justificationMode == JustificationMode.Expand)
  // Setting JustificationMode.
  doc.JustificationMode = JustificationMode.Compress;

Added public property Style.AutomaticallyUpdate

Related issue: WORDSNET-24686

A new public property AutomaticallyUpdate has been added to thr Style class:

/// <summary>
/// Specifies whether this style is automatically redefined based on the appropriate value.
/// </summary>
public bool AutomaticallyUpdate { get; set; }
Document doc = new Document("in.docx");
// Getting AutomaticallyUpdate.
if (!doc.Styles[StyleIdentifier.Normal].AutomaticallyUpdate)
{
  Style style = doc.Styles.Add(StyleType.Paragraph, "Redefined");
  style.BaseStyleName = "Normal";
  // Setting AutomaticallyUpdate.
  style.AutomaticallyUpdate = true;
}

Added support for MOBI export

Related issue: WORDSNET-24162

Aspose.Words now can export documents to MOBI file format.

MOBI (also called PRC, AZW) is Amazon Kindle’s proprietary e-book file format.

The following publicly visible enum values were added:

FileFormat.Mobi
SaveFormat.Mobi
Document doc = new Document("in.docx");
doc.Save("out.mobi");

or

Document doc = new Document("in.docx");
HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.Mobi);
doc.Save("out.mobi", options);

HtmlSaveOptions properties that are not applicable for MOBI export:

  • ImagesFolder
  • ImagesFolderAlias
  • FontsFolder
  • FontsFolderAlias
  • ResourceFolder
  • ResourceFolderAlias
  • ExportImagesAsBase64 (always false)
  • ExportFontsAsBase64 (always false)
  • ExportDropDownFormFieldAsText (always true)
  • ExportTextInputFormFieldAsText (always true)
  • ExportRoundtripInformation (always false)
  • CssStyleSheetType (always CssStyleSheetType.Inline)
  • CssStyleSheetFileName
  • DocumentSplitCriteria (always DocumentSplitCriteria.None)
  • ExportListLabels (always ExportListLabels.ByHtmlTags)
  • ExportRelativeFontSize (always false)