Aspose.Words for Java 23.8 Release Notes

Major Features

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

  • Added support for CITATION and BIBLIOGRAPHY fields.
  • Introduced functionality to automatically generate a Table of Contents (TOC) for MOBI documents.
  • Expanded PdfEncryptionDetails constructor with PdfPermissions.
  • Introduced a new public property to specify the size of rendered images in pixels.
  • Implemented shaping of vertical text for EMF metafiles.
  • Added an option in the LINQ Reporting Engine to preserve whitespaces for JSON string values.

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.8. 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 a new public property to specify the size of rendered images in pixels

Related issue: WORDSNET-25267

The following public property has been added to the ImageSaveOptions class:

/// <summary>
/// Gets or sets the size of a generated image in pixels.
/// </summary>
/// <remarks>
/// <para>This property has effect only when saving to raster image formats.</para>
/// <para> The default value is (0 x 0), which means that the size of the generated image will be calculated
/// according to the size of the image in points, the specified resolution and scale.</para>
/// </remarks>
public Size ImageSize { get; set; }

Added PdfEncryptionDetails ctor overload with PdfPermissions

Related issue: WORDSNET-25600

public PdfEncryptionDetails(string userPassword, string ownerPassword, PdfPermissions permissions)

Added the ability to generate TOC (table of contents) for MOBI documents

Related issue: WORDSNET-25093

Now Aspose.Words can generate TOC (table of contents) for MOBI documents.

Desired depth of TOC can be specified same way as it’s done for AZW3 or EPUB documents using HtmlSaveOptions.NavigationMapLevel property.

Note: Currently MOBI TOC won’t be displayed by some viewers. For example, MOBI TOC won’t be displayed by calibre app.

Supported CITATION and BIBLIOGRAPHY fields

Related issue: WORDSNET-13854

Now the CITATION and BIBLIOGRAPHY fields are supported by Aspose.Words and can be updated with the Document.UpdateFields, Range.UpdateFields or Field.Update methods.

Aspose.Words supports following citation and bibliography styles:

  • APA - APASixthEditionOfficeOnline.xsl
  • Chicago - CHICAGO.XSL
  • GB7714 - GB.XSL
  • GOST - Name Sort - GostName.XSL
  • GOST - Title Sort - GostTitle.XSL
  • Harvard - Anglia - HarvardAnglia2008OfficeOnline.xsl
  • IEEE - IEEE2006OfficeOnline.xsl
  • ISO 690 - First Element and Date - ISO690.XSL
  • ISO 690 - Numerical Reference - ISO690Nmerical.XSL
  • MLA - MLASeventhEditionOfficeOnline.xsl
  • SIST02 - SIST02.XSL
  • Turabian - TURABIAN.XSL

The IBibliographyStylesProvider interface and the FieldOptions.BibliographyStylesProvider property are introduced to override built-in styles or provide custom one:

/// <summary>
/// Implement this interface to provide bibliography style for
/// the  <see cref="FieldBibliography"/> and <see cref="FieldCitation"/> fields when they're updated.
/// </summary>
public interface IBibliographyStylesProvider
    /// <summary>
    /// Returns bibliography style.
    /// </summary>
    /// <param name="styleFileName">The bibliography style file name.</param>
    /// <returns>The <see cref="Stream"/> with bibliography style XSLT stylesheet.</returns>
    /// <remarks>
    /// The implementation should return <c>null</c> to indicate that
    /// the MS Word version of specified style should be used.
    /// </remarks>
    Stream GetStyle(string styleFileName);

public sealed class FieldOptions
    /// <summary>
    /// Gets or sets a provider that returns a bibliography style for
    /// the <see cref="FieldBibliography"/> and <see cref="FieldCitation"/> fields.
    /// </summary>
    public IBibliographyStylesProvider BibliographyStylesProvider { get; set; }

The property HtmlSaveOptions.EpubNavigationMapLevel has been deprecated.

Related issue: WORDSNET-25093

The HtmlSaveOptions.EpubNavigationMapLevel property is marked as obsolete. Please, use HtmlSaveOptions.NavigationMapLevel instead.

Added an option for LINQ Reporting Engine to preserve whitespaces for JSON string values

Related issue: WORDSNET-25677

Starting from Aspose.Words 23.8, you can instruct LINQ Reporting Engine to preserve leading and trailing whitespaces for JSON string values (which are trimmed by default).