Aspose.Words for Java 22.6 Release Notes

Major Features

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

  • Implemented an ability to convert PDF documents to fixed page formats with high fidelity and performance.
  • DrawingML charts public API was extended to support gradient, texture and pattern fills.
  • Implemented a solid text fill effect inheritance exception that mimics the behavior of MS Word.
  • Saving progress notifications were extended for ODT format.

Full List of Issues Covering all Changes in this Release (Reported by Java Users)

Key Summary Category
WORDSJAVA-2731 XHTML Entities do not resolved during loading Epub documents. New Feature
WORDSJAVA-2651 Bookmark.Text does not return All the Text Enclosed Bug
WORDSNET-21860 DOCX to PDF - A picture in table moves to next page resulting in increase in page count Bug
WORDSNET-22581 Problem wirh bookmark upon comparing documents Bug
WORDSNET-23778 Revision on list item is rendered incorrectly Bug
WORDSNET-22810 Error converting DOCX to HTML Bug
WORDSNET-23803 stylePaneFormatFilter values are chnaged after open/save DOCX document Bug
WORDSNET-23793 Image resolution is changed after saving to HTML with ScaleImageToShapeSize = false Bug
WORDSNET-23840 Part of content is invisible after rendering Bug
WORDSNET-23797 Table Alignment Issue in converting RTF files to PDF Bug

Full List of Issues Covering all Changes in this Release (Reported by .NET Users)

Key Summary Category
WORDSNET-22072 Add support for gradient, texture and pattern fills in Charts New Feature
WORDSNET-23059 Rendering PDFs directly to fixed formats without intermediate flow layout New Feature
WORDSNET-22890 Add loading progress notification for ODT documents New Feature
WORDSNET-23167 Consider supporting “User Field” upon importing ODT New Feature
WORDSNET-7284 Vertical space between Picture and TextBox is lost in PDF New Feature
WORDSNET-7282 Text lines in Lists do not have correct left indentation in PDF New Feature
WORDSNET-6264 Left indent of text in second line of List is incorrect in PDF New Feature
WORDSNET-23615 Output AZW3 document isn’t correctly displayed in Kindle for PC Bug
WORDSNET-22805 HTML to PDF conversion issue with page border Bug
WORDSNET-23633 Remove obsolete properties from ChartDataPointCollection and ChartDataLabelCollection classes Bug
WORDSNET-23908 Resaved document throws an error in MS Word Bug
WORDSNET-14308 Bookmarks are lost after using Document.Compare method Bug
WORDSNET-22952 Bookmark is lost after comparing documents Bug
WORDSNET-22550 Document.Compare breaks inserted cross-references Bug
WORDSNET-23885 Shape becomes visible after open/save DOCX document Bug
WORDSNET-23842 Text with effects is rendered improperly Bug
WORDSNET-23581 System.NotImplementedException occurs on accessing the Fill property Bug
WORDSNET-23876 Rejecting delete revision removes the deleted text Bug
WORDSNET-23826 Aspose.Words produces corrupted DOCX document Bug
WORDSNET-23906 TypeInitializationException is thrown when Shaping.HarfBuzz is used in .NET6 Bug
WORDSNET-23871 Support EQ field overstrike alignment Bug
WORDSNET-23809 Text images are lost during Pdf2Word conversion Bug
WORDSNET-23859 FileCorruptedException is thrown upon loading ODT document Bug
WORDSNET-23694 RevisionColor missing ClassicRed and ClassicBlue values Bug
WORDSNET-23785 Document.Save method modifying documents unexpectedly Bug
WORDSNET-23818 FormatException is thrown upon rendering document with chart Bug
WORDSNET-23870 Export equitation matrix columns alignment Bug
WORDSNET-23843 Extra space is added after table Bug
WORDSNET-23613 Tables were not detected during PDF to DOCX conversion Bug
WORDSNET-23777 Default content of SDT becomes visible after processing document Bug
WORDSNET-23806 ArgumentOutOfRangeException is thrown upon conversion from DOC to DOCX Bug
WORDSNET-23836 Progress does not work while loading blank file Bug
WORDSNET-20805 CSS Borders not rendering around div within a div Bug
WORDSNET-23761 Header/footer does not match MS Word on RTF to DOCX conversion Bug
WORDSNET-23844 List numbering is wrong for lists from HTML altChunk’s Bug
WORDSNET-23834 Section breaks are missing from XML file Bug
WORDSNET-23154 Vertical axis scaling is changed after rendering chart Bug
WORDSNET-18806 Text placement in the axle labels is different after the conversion in PDF Bug
WORDSNET-23035 InvalidOperationException: Infinite loop detected. Check if fixed Bug
WORDSNET-21068 One Table became multiple Tables when converting DOCX to HTML Bug
WORDSNET-23812 Timestamp data of the inserted/deleted text gets modified Bug
WORDSNET-12365 Font rendering issue with Persian text in output PDF Bug
WORDSNET-23808 Separator elements are added instead of spaces Bug
WORDSNET-23790 Tab of list label is highlighted after rendering Bug
WORDSNET-23780 Paragraph first line indentation is incorrect after rendering Bug
WORDSNET-9646 DOC to PDF conversion issue with image rendering Bug
WORDSNET-23813 Attempt to read empty bfchar section gives InvalidOperationException Bug
WORDSNET-23773 Part of content is missed after loading RTF document Bug
WORDSNET-23744 InvalidOperationException is thrown on DOCX to DOC conversion Bug
WORDSNET-23738 NullReferenceException is thrown upon rendering document Bug
WORDSNET-23614 Exception on conversion to PDF Bug
WORDSNET-23659 Data labels of stacked bar chart are lost after rendering Bug
WORDSNET-23726 Fix StringComparison warnings Bug
WORDSNET-23727 Fix some StringComparison warnings in the code Bug
WORDSNET-23627 Placeholder is rendered instead of real value in data label Bug
WORDSNET-23700 Text in list item starts in wrong position after wrapping around paragraph Bug
WORDSNET-23796 InvalidOperationException is thrown upon rendering document Bug
WORDSNET-23784 ArgumentOutOfRangeException is thrown upon appending document Bug
WORDSNET-23792 Review of Particular file with “Gabriola” font is displayed incorrect in FF/Chrome Bug
WORDSNET-23756 InvalidCastException is thrown when set text of bookmark, which is inside OfficeMath Bug
WORDSNET-21069 Wrong Style Color applied to some Rows when converting DOCX to HTML Bug

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 22.6. 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 new public constants to RevisionColor enum

Related issue: WORDSNET-23694

Starting from version 2019 of MS Word, it has the ability to set additional colors for revisions. A new revision color constants have been added.

/// <summary>
/// Represents 0000ff color.
/// </summary>
/// <summary>
/// Represents ff0000 color.
/// </summary>

Now it is really easy to set new colors for the document revisions.

Use Case:

// Set new color for the insert revisions
doc.LayoutOptions.RevisionOptions.InsertedTextColor = RevisionColor.ClassicBlue;

Changed behavior of Fill.OneColorGradient and Fill.TwoColorGradient methods

Related issue: WORDSNET-22072

The following changes have been implemented:

  1. Now the OneColorGradient and TwoColorGradient methods of the Fill class can be used to create gradient fills in charts (see ChartDataPoint.Format.Fill, ChartMarker.Format.Fill and ChartSeries.Format.Fill properties). System.NotImplementedException was thrown in the previous versions.

  2. Behavior of the following overloads of the OneColorGradient and TwoColorGradient methods have been changed:

    /// <summary>
    /// Sets the specified fill to a one-color gradient using the specified color.
    /// </summary>
    /// <param name="color">The color to build the gradient.</param>
    /// <param name="style">The gradient style <see cref="Drawing.GradientStyle"/></param>
    /// <param name="variant">The gradient variant <see cref="Drawing.GradientVariant"/></param>
    /// <param name="degree">The gradient degree. Can be a value from 0.0 (dark) to 1.0 (light).</param>
    public void OneColorGradient(Color color, GradientStyle style, GradientVariant variant, double degree);
    /// <summary>
    /// Sets the specified fill to a two-color gradient.
    /// </summary>
    /// <param name="color1">The first color to build the gradient.</param>
    /// <param name="color2">The second color to build the gradient.</param>
    /// <param name="style">The gradient style <see cref="Drawing.GradientStyle"/>.</param>
    /// <param name="variant">The gradient variant <see cref="Drawing.GradientVariant"/></param>
    public void TwoColorGradient(Color color1, Color color2, GradientStyle style, GradientVariant variant);

In the past, their behavior was as if a gradient was created using the overloads without specifying colors, and then fore and back color were set. Now the behavior is reversed: as if you first define the colors, and then using the overloads to build the gradient.

Removed obsolete PdfDigitalSignatureHashAlgorithm enum values

Related issue: WORDSNET-23473

Removed obsolete PdfDigitalSignatureHashAlgorithm enum values Sha1 and Md5.

SHA1 and MD5 hash algorithms for digital signature are deprecated in the latest PDF specification due to security issues. So, please, use the one of the available algorithms instead.

Removed obsolete methods of ChartDataPointCollection and ChartDataLabelCollection classes

Related issue: WORDSNET-23633

The following obsolete methods have been removed:

public class ChartDataLabelCollection
    /// <summary>
    /// Adds new <see cref="ChartDataLabel"/> at the specified index.
    /// </summary>
    /// <param name="index">Target data label index.</param>
    [Obsolete("When ChartSeries.HasDataLabels is 'true', all data labels are available in this collection.")]
    public ChartDataLabel Add(int index);
    /// <summary>
    /// Clears format of a <see cref="ChartDataLabel"/> at the specified index.
    /// </summary>
    /// <param name="index">The zero-based index of the chart data label to clear format.</param>
    [Obsolete("Use the ChartDataLabel.ClearFormat method instead.")]
    public void RemoveAt(int index);
    /// <summary>
    /// Clears format of all <see cref="ChartDataLabel"/> in this collection.
    /// </summary>
    [Obsolete("Use the ClearFormat method instead.")]
    public void Clear();
public class ChartDataPointCollection
    /// <summary>
    /// Adds new <see cref="ChartDataPoint"/> at the specified index.
    /// </summary>
    /// <param name="index">Target data point index.</param>
    [Obsolete("All data points are available in this collection.")]
    public ChartDataPoint Add(int index);
    /// <summary>
    /// Clears format of a <see cref="ChartDataPoint"/> at the specified index.
    /// </summary>
    /// <param name="index">The zero-based index of the data point to clear format.</param>
    [Obsolete("Use the ChartDataPoint.ClearFormat method instead.")]
    public void RemoveAt(int index);
    /// <summary>
    /// Clears format of all <see cref="ChartDataPoint"/> in this collection.
    /// </summary>
    [Obsolete("Use the ClearFormat method instead.")]
    public void Clear();

Added new class for saving PDFs to other fixed formats

Related feature task: WORDSNET-23059

We’ve added a new way to work with PDF input files. Now they can be converted into a fixed format without using Words layout model.

I.e. the feature runs without Document class and returns the result in a MemoryStream object.


var pdfRenderer = new PdfFixedRenderer();
var options = new PdfFixedOptions() { PageIndex = 0, PageCount = 2 };
var resultStream = pdfRenderer.SavePdfAsHtml(pdfStream, options);


  • More accurate conversion (positions of text and other elements).
  • Better performance and memory usage (less logic to run, no need to build flow models, etc).


  • The list of output formats is limited for now (PDF, Html, XPS, Jpeg, Png, Tiff, Bmp).
  • There is no way to edit the data during the conversion.
  • A small amount of options such as Password, page range and Jpeg image quality.

Supported methods:


Available options:

  • PageIndex and PageCount can be used to select a subset of pages.
  • Password - allows to decode an encrypted PDF. The result would be decrypted.
  • JpegQuality - can be provided before SavePdfAsImages calls to setup output Jpeg image quality.
  • ImageFormat - should be used to specify the output image format for SavePdfAsImages.

All options are optional and can be ommited in favor of default values.