Browse our Products

Aspose.Words for Java 26.1 Release Notes

Major Features

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

  • Platform Support: Introduced a dedicated build for the .NET 10.0 target framework.
  • Document Conversion: Implemented a new export format allowing documents to be serialized as Docling JSON.
  • AI Integration: Enhanced the Aspose.Words.AI namespace by allowing direct instantiation of the GoogleAiModel class.
  • Document Merging: Added an option to the AppendDocument() method to explicitly define the SectionStart behavior for the first imported section.
  • PDF Rendering: Extended PdfSaveOptions.PreserveFormFields functionality to be compatible with all PDF compliance standards (including PDF/A and PDF/UA).
  • PDF Export: Implemented support for tagging PDF AcroForms to enhance document accessibility.
  • Field Rendering: Improved displacement handling for EQ fields with updated layout logic for precise positioning and bounds.
  • Mathematical Equations: Added support for rendering MathML with East Asian characters while correctly preserving Latin and Hebrew text when an East Asian font is specified.

Full List of Issues Covering all Changes in this Release

Expand to view the full list of issues, reported by Java Users.
KeySummaryCategory
WORDSJAVA-3266JAR signing refactoringNew Feature
WORDSJAVA-3248Font substitution issue on LinuxBug
WORDSJAVA-3140Font substitution doesn’t workBug
Expand to view the full list of issues, reported by .NET Users.
KeySummaryCategory
WORDSNET-28898Allow to create instance of GoogleAiModel class directlyNew Feature
WORDSNET-28873Consider providing a build for .NET10New Feature
WORDSNET-28841Add support for loading of hyperlinks and bookmarks from MsoHtmlNew Feature
WORDSNET-28737Support editable form fields when exporting to PDF/UANew Feature
WORDSNET-28263Support PDF AcroForms taggingNew Feature
WORDSNET-27057Preserve AcroForms when saving to PDF/ANew Feature
WORDSNET-21493Convert Word to JSON in Parent Child HierarchyNew Feature
WORDSNET-18994Support OpenType Font VariationsNew Feature
WORDSNET-28652Circled numbers are rendered inaccuratelyEnhancement
WORDSNET-28956Revision group calculated incorrectlyBug
WORDSNET-28941PDF to DOCX layout differencesBug
WORDSNET-28915StackOverflowException is thrown upon inserting PICT image in .NET Standard in x86 applicationBug
WORDSNET-28908Baskerville semi-bold is used instead of Baskerville regularBug
WORDSNET-28905Document comparison does not show the hyperlink object changeBug
WORDSNET-28882UpdatePageLayout hangsBug
WORDSNET-28879‘Roboto Lt’ is substituted with ‘Roboto’ when ‘Roboto Light’ is availableBug
WORDSNET-28878List numbering is wrong after converting DOCX to PDFBug
WORDSNET-28860NullReferenceException is thrown upon converting node to HTMLBug
WORDSNET-28858MsoHtml lists differs from MS Word’s resultBug
WORDSNET-28857Import of MsoHtml lists differs from MS Word’s resultBug
WORDSNET-28836Exception is thrown while converting MsoHtml to DocxBug
WORDSNET-28835TOC looks incorrect after updatingBug
WORDSNET-28833Import of MsoHtml lists differs from MS Word’s resultBug
WORDSNET-28814Formatting changes are not detected by Aspose.Words comparisonBug
WORDSNET-28788Bookmark is lost after extracting pageBug
WORDSNET-28767Resulted import of MsoHtml lists differs from MS Word’sBug
WORDSNET-28761Import of MsoHtml lists differs from MS Word’s resultBug
WORDSNET-28687EQ field is rendered improperlyBug
WORDSNET-28611Exception is thrown while converting MsoHtml to DocxBug
WORDSNET-28336Section start is changed after appending documentsBug
WORDSNET-28319Take ImageSaveOptions.PageLayout into account when render PDF documentBug
WORDSNET-28227Axis labels are rendered improperlyBug
WORDSNET-27922ExtractPages does not split pages correctlyBug
WORDSNET-27250Different behavior on .NET StandardBug
WORDSNET-26719Text is rendered with junk charactersBug
WORDSNET-28903Japanese chart title became English upon conversion to PDFBug
WORDSNET-28849Table rendering inconsistency when save to DOCX and PDFBug
WORDSNET-28074Paragraph alignment is changed after appending documentBug

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 26.1. 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 ability to create instance of GoogleAiModel class directly

Related issue: WORDSNET-28898

There are breaking changes in this update.

Now, you can create Aspose.Words.AI.GoogleAiModel class directly.

/// <summary>
/// Class representing Google AI Models (Gemini) integration within Aspose.Words.
/// </summary>
/// <remarks>
/// Please refer to https://ai.google.dev/gemini-api/docs/models for Gemini models details.
/// </remarks>
public class GoogleAiModel : AiModel
/// <summary>
/// Initializes a new instance of <see cref="GoogleAiModel"/> class.
/// </summary>
/// <param name="name">The name of the model. For example, gemini-2.5-flash.</param>
public GoogleAiModel(string name)
/// <summary>
/// Initializes a new instance of <see cref="GoogleAiModel"/> class.
/// </summary>
/// <param name="name">The name of the model. For example, gemini-2.5-flash.</param>
/// <param name="apiKey">The API key to use the Gemini API.
/// Please refer to https://ai.google.dev/gemini-api/docs/api-key for details.</param>
public GoogleAiModel(string name, string apiKey) : this(name)

The following values are removed from Aspose.Words.AI.AiModelType enumaration:

/// <summary>
/// Gemini 1.5 Flash generative model type.
/// </summary>
Gemini15Flash = 4,

/// <summary>
/// Gemini 1.5 Flash-8B generative model type.
/// </summary>
Gemini15Flash8B = 5,

/// <summary>
/// Gemini 1.5 Pro generative model type.
/// </summary>
Gemini15Pro = 6,
and the following values are added instead:

/// <summary>
/// Gemini Flash latest release generative model type.
/// </summary>
GeminiFlashLatest = 4,

/// <summary>
/// Gemini Pro latest release generative model type.
/// </summary>
GeminiProLatest = 6,

This use case explains how to create instance of GoogleAiModel class and summarize a document:

Added option to control first imported section type in AppendDocument() method

Related issue: WORDSNET-28336

A new public option has been added into Aspose.Words.ImportFormatOptions class:

/// <summary>
/// Gets or sets a boolean value indicating whether to change a first imported section type
/// to the <see cref="SectionStart.NewPage"/> forcibly when call
/// <see cref="Document.AppendDocument(Aspose.Words.Document,Aspose.Words.ImportFormatMode, ImportFormatOptions)"/>.
/// <para>The default value is <c>true</c>.</para>
/// </summary>
/// <remarks>
/// Please note that this option is only relevant for the
/// <see cref="Document.AppendDocument(Aspose.Words.Document,Aspose.Words.ImportFormatMode, ImportFormatOptions)"/>
/// method and has no effect on other import-related methods.
/// </remarks>
public bool AppendDocumentWithNewPage { get; set; }

This use case explains how to preserve original section type while appending documents:

Added PdfSaveOptions.PreserveFormFields support for all compliances

Related issues: WORDSNET-27057, WORDSNET-28737, WORDSNET-28263

Previously form field export was not supported for PDF/A and PDF/UA compliances and PdfSaveOptions.PreserveFormFields was ignored. Now form field is supported for all available compliances.

Implemented ability to save documents as Docling JSON format

Related issue: WORDSNET-21493

An ability to save documents as Docling JSON format (Deep Search document) has been implemented.

A new class DoclingSaveOptions has been implemented.

A new item Docling has been added to the SaveFormat enum type.

A new item Docling has been added to the WarningSource enum type.

/// <summary>
/// Can be used to specify additional options when saving a document into the <see cref="SaveFormat.Docling"/>
/// format.
/// To learn more, visit the <a href="https://docs.aspose.com/words/net/specify-save-options/">Specify
/// Save Options</a> documentation article.
/// </summary>
public class DoclingSaveOptions : SaveOptions
{
    /// <summary>
    /// Specifies the format in which the document will be saved if this save options object is used.
    /// Can only be <see cref="Words.SaveFormat.Docling"/>.
    /// </summary>
    public override SaveFormat SaveFormat { get; set; }

    /// <summary>
    /// Gets or sets a value indicating whether non-image shapes should be rendered and written to the output
    /// Docling JSON document.
    /// </summary>
    /// <remarks>
    /// If the property is <b>false</b>, non-image shapes are not exported to the output document.
    /// The default value is <b>false</b>.
    /// </remarks>
    public bool RenderNonImageShapes { get; set; }
}

public enum SaveFormat
{
    ...
    /// <summary>
    /// Saves the document in Docling JSON format.
    /// </summary>
    Docling = 81,
    ...
}

public enum WarningSource
{
    ...
    /// <summary>
    /// Module that writes Docling JSON files.
    /// </summary>
    Docling = 28
}

This use case explains how to save document as Docling JSON

IBarcodeGenerator interface has been changed

The return type of the method in IBarcodeGenerator has been changed from Image to Stream. This has been done to unify API for .NET Framework and .NET Standard versions of Aspose.Words.

/// <summary>
/// Public interface for barcode custom generator. Implementation should be provided by user.
/// </summary>
/// <remarks>
/// Generator instance should be passed through the <see cref="FieldOptions.BarcodeGenerator"/> property.
/// </remarks>
public interface IBarcodeGenerator
{
    /// <summary>
    /// Generate barcode image using the set of parameters (for DisplayBarcode field).
    /// </summary>
    /// <param name="parameters">The set of parameters</param>
    /// <returns>Stream with image data representing generated barcode.</returns>
    /// <remarks>Supported image formats are Bmp, Emf, Gif, Jpeg, Png, Tiff, Wmf, Pict, Ico, WebP, Svg.</remarks>
    Stream GetBarcodeImage(BarcodeParameters parameters);

    /// <summary>
    /// Generate barcode image using the set of parameters (for old-fashioned Barcode field).
    /// </summary>
    /// <param name="parameters">The set of parameters</param>
    /// <returns>Stream with image data representing generated barcode.</returns>
    /// <remarks>Supported image formats are Bmp, Emf, Gif, Jpeg, Png, Tiff, Wmf, Pict, Ico, WebP, Svg.</remarks>
    Stream GetOldBarcodeImage(BarcodeParameters parameters);
}

Removed obsolete IAiModelText interface

Related issue: WORDSNET-28363

Removed obsolete interface Aspose.Words.AI.IAiModelText:

/// <summary>
/// The common interface for AI models designed to generate a variety of text-based content.
/// </summary>
[Obsolete("This interface is obsolete. Please use Aspose.Words.AI.AiModel class instead.")]
public interface IAiModelText

This use case explains how to how to work with AI models in Aspose.Words without IAiModelText interface: