Browse our Products

Aspose.Words for Java 25.3 Release Notes

Major Features

There are 72 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.3. 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.

Improved export of attachments to PDF

Related requests: WORDSNET-27454, WORDSNET-27523

New PdfSaveOptions.AttachmentsEmbeddingMode property added instead of PdfSaveOptions.EmbedAttachments.

Attachments are supported when exporting to PDF/A (specific versions) and PDF/UA. Added new values to PdfCompliance enum for PDF/A versions which supports attachments. Also attachments are now supported with encryption.

public class PdfSaveOptions {
...
    [Obsolete("Obsolete, please use AttachmentsEmbeddingMode instead.")]         
    public bool EmbedAttachments { get; set; }

    /// <summary>
    /// Gets or sets a value determining how attachments are embedded to the PDF document.
    /// </summary>
    /// <remarks>
    /// <para>Default value is <see cref="PdfAttachmentsEmbeddingMode.None"/> and attachments are not embedded.</para>
    /// <para>
    /// PDF/A-1, PDF/A-2 and regular PDF/A-4 (not PDF/A-4f) standards do not allow embedded files.
    /// <see cref="PdfAttachmentsEmbeddingMode.None"/> value will be used automatically.
    /// </para>
    /// </remarks>
    public PdfAttachmentsEmbeddingMode AttachmentsEmbeddingMode {get; set; }
...
}

/// <summary>
/// Specifies how attachments are embedded to PDF document.
/// </summary>
public enum PdfAttachmentsEmbeddingMode
{
    /// <summary>
    /// Attachments are not embedded.
    /// </summary>
    None,
    /// <summary>
    /// Attachments are embedded as annotations with location on page.
    /// </summary>
    Annotations,
    /// <summary>
    /// Attachments are embedded as the document embedded files without annotations.
    /// </summary>
    DocumentEmbeddedFiles
}

public enum PdfCompliance
{
...
    /// <summary>
    /// The output file will comply with the PDF/A-3a (ISO 19005-3) standard.
    /// This level includes all the requirements of PDF/A-3u and additionally requires
    /// that document structure be included (also known as being "tagged"),
    /// with the objective of ensuring that document content can be searched and repurposed.
    /// </summary>
    /// <remarks>
    /// Note that exporting the document structure significantly increases the memory consumption, especially
    /// for the large documents.
    /// </remarks>
    PdfA3a,
    /// <summary>
    /// The output file will comply with the PDF/A-3u (ISO 19005-3) standard.
    /// PDF/A-3u (as well as PDF/A-2u) has the objective of preserving document static visual appearance over time, independent of the tools
    /// and systems used for creating, storing or rendering the files. Additionally, any text contained in the document
    /// can be reliably extracted as a series of Unicode codepoints. In addition to PDF/A-2u, PDF/A-3u allows embedding
    /// attachments to the PDF document.
    /// </summary>
    PdfA3u,
    /// <summary>
    /// The output file will comply with the PDF/A-4f (ISO 19005-4:2020) standard.
    /// This level includes all the requirements of PDF/A-4 and additionally allows embedding
    /// attachments to the PDF document.
    /// </summary>
    PdfA4f
}

This use case explains how to customize how attachments are embedded in PDFs with PdfSaveOptions:

Added new public option UpdateAmbiguousTextFont

Related issue: WORDSNET-27743

A new public option UpdateAmbiguousTextFont has been added to SaveOptions class:

/// <summary>
/// Determines whether the font attributes will be changed according to the character code being used.
/// </summary>
public bool UpdateAmbiguousTextFont { get; set; }

This use case shows how to control font selection for ambiguous characters in Word documents using UpdateAmbiguousTextFont: