Browse our Products

Aspose.Words for Java 25.4 Release Notes

Major Features

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

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 25.4. 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.

New public paper sizes JisB4 and JisB5 have been added

Related issue: WORDSNET-27516

New public paper sizes JisB4 and JisB5 have been added to PaperSize enum:

/// <summary>
/// 257 x 364 mm.
/// </summary>
JisB4,
/// <summary>
/// 182 x 257 mm.
/// </summary>
JisB5

This use case explains how use new paper sizes:

Related issue: WORDSNET-27851

A new public option RemoveJavaScriptFromLinks has been added in HtmlSaveOptions class:

/// <summary>
/// Specifies whether JavaScript will be removed from links.
/// Default is <c>false</c>.
/// </summary>
/// <remarks>
/// If this option is enabled, all links containing JavaScript (e.g., links with "javascript:" in the href attribute)
/// will be replaced with "javascript:void(0)". This can help prevent potential security risks, such as XSS attacks.
/// </remarks>
public bool RemoveJavaScriptFromLinks { get; set; }

This use case shows how to specify whether JavaScript will be removed from links:

Added a new overload for Watermark.SetImage with Stream as parameter

Related issue: WORDSNET-27938

The following new overload of Watermark.SetImage has been implemented:

/// <summary>
/// Adds Image watermark into the document.
/// </summary>
/// <param name="imageStream">The stream containing the image data that is displayed as a watermark.</param>
/// <param name="options">Defines additional options for the image watermark.</param>
/// <exception cref="ArgumentNullException">
/// Throws when the path is <c>null</c>.
/// </exception>
/// <remarks>If <see cref="ImageWatermarkOptions"/> is <c>null</c>, the watermark will be set with default options.</remarks>
public void SetImage(Stream imageStream, ImageWatermarkOptions options)

This use case shows how to add Image watermark into the document using stream containing the image data:

Significantly improved the usability of the LowCode API

How to Compare two Word documents using ComparerContext with custom options:

How to Compare Word documents from streams using ComparerContext with custom options:

How to Compare Word documents and export differences as PNG images using file paths and streams:

How to Convert Word documents using streams with load, save options, and export to PNG images:

How to Convert Word documents to PDF, RTF, DOCX (with options), and export to PNG using LowCode API:

How to Perform mail merge from a DataRow using LowCode API:

How to Perform mail merge from a DataTable using LowCode API:

How to Perform mail merge from a stream with a DataRow as data source using LowCode API:

How to Perform mail merge from a stream with a DataTable as data source using LowCode API:

How to Perform mail merge with nested data relations using DataSet:

How to Perform mail merge from a DataTable using LowCode API:

How to Perform mail merge with simple arrays using LowCode API:

How to Generate a mail merge document with nested data relations using DataSet using LowCode API:

How to Generate a document using mail merge regions and DataTable using LowCode API:

How to Execute basic mail merge using string arrays as data source using LowCode API:

How to Generate mail merge output as images from a DataRow using LowCode API:

How to Convert Word mail merge documents to multiple PNG files using DataTable using LowCode API:

How to Generate PNG images from Word mail merge using string arrays using LowCode API:

How to Generate PNG images from Word mail merge with related DataTables using LowCode API:

How to Convert Word mail merge regions to multiple PNGs using DataTable using LowCode API:

How to Generate PNG images from Word mail merge using a single DataRow using LowCode API:

How to Convert Word mail merge results to PNG images using DataTable using LowCode API:

How to Generate PNG images from Word mail merge using parallel arrays using LowCode API:

How to Generate nested mail merge results as PNG images from a DataSet using LowCode API:

How to Convert Word mail merge regions to PNG images using DataTable:

How to Merge multiple Word documents with format preservation and loading/saving options:

How to Merge Word documents from streams with format retention and encryption:

How to Replace text patterns in Word documents using regex:

How to Perform regex text replacement in Word documents using file streams:

How to Replace text in Word documents using file streams:

How to Replace text in Word documents using direct file paths:

How to Perform regex text replacement and generate PNG images from Word documents:

How to Perform regex replacements and export as PNGs from Word document streams:

How to Replace text and generate PNG images from Word streams:

How to Replace text and export as PNG images from Word files:

How to Split a Word document into individual pages using streams:

How to Split a Word document into separate pages by file path:

How to Add a scalable image watermark to Word documents via streams:

How to Add a scaled image watermark to Word documents via file paths:

How to Add colored text watermarks to Word documents via streams:

How to Add colored text watermarks to Word documents via file path:

How to Apply image watermarks when converting Word documents to PNGs:

How to Add scalable image watermarks when converting Word documents to PNG files:

How to Apply colored text watermarks when converting Word documents to PNG via streams:

How to Add colored text watermarks when converting Word documents to PNG images: