Browse our Products

Aspose.Words for Java 18.9 Release Notes

Major Features

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

  • Animated GIF is fully supported now
  • MANIFEST.MF updated to support new OSGI versions
  • TIFF colors accuracy improved
  • Java10&11 compatibility improved: reflection for safe using of optional external libraries is removed.
  • Bookmarks are allowed on block, cell, row level 
  • Added load option to treat Shapes with math XML as Shapes in the model 
  • Provided option to choose between Old and New Mail Merge behaviors 
  • Improved PDF encryption in case when owner password is not specified 
  • Metafile rendering improved: fixed drawing records processing when path bracket is opened, fixed processing of EMR_SETBKMODE record when incorrect values specified
  • Improved output image quality when rendering metafiles with raster operations set
  • Fixed handling of glyphs without outlines when parsing glyph data while rendering
  • Fixed a bug with a glow effect, if the specified glow size is less than 10
  • Fixed several problems in DrawingML Charts rendering: incorrect default axis color, bug with the date format for axis values, bug with rendering of the trend line with unsorted x-values
  • Improved rendering of the mathematical element “Apostrophe” of the MathML object 
  • Improved justification of Asian texts
  • Improved rendering of revisions in balloons
  • Improved text placement around floating shapes
  • Fixed issue with paragraph spacing in footnotes
  • Fixed issue with line wrapping when it has single glyph wider than the line followed by page break
  • Fixed issue with table row height calculation when cells in vertical merge have horizontal borders

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WORDSJAVA-1578Right-aligned tab-stops conversion issue in resultant MHTMLBug
WORDSJAVA-1837Image sometimes do not render in exported HTMLBug
WORDSJAVA-1840Math symbols are being read incorrectlyBug
WORDSJAVA-1847Animated GIF rendered to PDF with a bottom gray bandBug
WORDSJAVA-1848ReportingEngine.buildReport throws “Multiple decimal separators in pattern “yyyy.MM.dd”Bug
WORDSJAVA-1855DOCX to PDF conversion issue with image’s colorBug
WORDSJAVA-1859RtfLoadOptions.setRecognizeUtf8Text() does not workBug
WORDSJAVA-1864Wrong export declaration in MANIFEST.MFBug
WORDSJAVA-1844Update Manifest generation according to changed packages and new OSGI versionsEnhancement
WORDSJAVA-1860Ampersand changes alphabetical sort order for INDEX fieldEnhancement
WORDSJAVA-1697Debugging assert throws on production codeException
WORDSJAVA-1886Transparent background become visibleRegression
WORDSNET-11845Docx to Png/Pdf conversion issue with table’s autofit behaviorBug
WORDSNET-12887Tables misaligned in rendered PDFBug
WORDSNET-13392Text at the end of page flows to the next page when saving Word as PDFBug
WORDSNET-16463Shape’s text and color is lost in output PDF/DOCBug
WORDSNET-16477DOCX to PDF conversion issue with table renderingBug
WORDSNET-16478Extra lines are rendered after conversion from DOCX to PDFBug
WORDSNET-16535Size of picture changes after re-saving DOCBug
WORDSNET-16560Format revisions and comments are not rendered correctly in PDFBug
WORDSNET-16574Shape’s position is changed in output PDFBug
WORDSNET-16751Empty pages are rendered in output PDFBug
WORDSNET-16791MACROBUTTON HTMLDirect is not rendered in output PDFBug
WORDSNET-16959Paragraph floats towards left page margin in PDFBug
WORDSNET-16990DOCX to PDF conversion issue with shape’s positionBug
WORDSNET-17004Trendlines in graphs on word documents not displayingBug
WORDSNET-17022Formula breaks when document is resavedBug
WORDSNET-17044MailMergeCleanupOptions.RemoveUnusedFields removes REF field from the footerBug
WORDSNET-17121Asian text is justified incorrectlyBug
WORDSNET-17135The EQ field does not render in output Jpeg when Document.GetPageInfo is calledBug
WORDSNET-17140Image’s content is lost after using Document.AppendDocumentBug
WORDSNET-17177Hidden bookmarks are not correct after re-saving DOCXBug
WORDSNET-17183The EQ field does not render in output JpegBug
WORDSNET-17186Font name and size is changed after appending one document into anotherBug
WORDSNET-17206Vertical spacing not preserved in PDFBug
WORDSNET-17225Open Save a DOCX causes Tabs to become UnderlinedBug
WORDSNET-17226Endnotes becoming corrupted when saving DOC to DOCXBug
WORDSNET-17227Endnotes becoming corrupted when saving DOC to DOCXBug
WORDSNET-17228Endnotes becoming corrupted when saving DOC to DOCXBug
WORDSNET-17229Endnotes Footnotes becoming corrupted when saving DOCBug
WORDSNET-17249TOC isn’t rendered properly in PDF outputBug
WORDSNET-17250Fopc Strict can be written, but reading failsBug
WORDSNET-17258Chart axis is wrong in Aspose.Words generated .pdfBug
WORDSNET-17265An error raises while using ComHelper class.Bug
WORDSNET-17280Picture does not render correctlyBug
WORDSNET-17282Picture does not render correctlyBug
WORDSNET-17293Equation is not rendered correctly in PDFBug
WORDSNET-17295DOCX to PDF conversion issue with cell bordersBug
WORDSNET-17334DOCX to PDF conversion issue with textbox shape glowBug
WORDSNET-17342Incorrect color of the axis after converting to PDFBug
WORDSNET-17343Color shade inside the shape is missing in output PDFBug
WORDSNET-17344Irregular shapes, Missing colors, Incomplete shapes in output PDFBug
WORDSNET-17345Fill color in shapes is missing in output PDFBug
WORDSNET-17347Irregular shapes, Missing colors, Incomplete shapes in output PDFBug
WORDSNET-6980Bookmark position is not preserved during open/saveBug
WORDSNET-7809Table in Shape overlaps the other Page content in fixed page formatsBug
WORDSNET-13707Table Bookmark gets deleted when importing TableEnhancement
WORDSNET-15693Incorrect wrapping around a table because of WrapGap issue.Enhancement
WORDSNET-17175Create tests for API 18.06Enhancement
WORDSNET-17286AW doesn’t move text to the new line for tables with thick bordersEnhancement
WORDSNET-17316Aspose.Words sets owner password when only user password is specified during conversion to PDFEnhancement
WORDSNET-17318Add unit tests code coverage analysis to development processEnhancement
WORDSNET-721Improve table bookmarksEnhancement
WORDSNET-8755Improve through wrapping of text boxesEnhancement
WORDSNET-14353Range.Bookmarks throws System.ArgumentExceptionException
WORDSNET-16621LINQ Reporting Engine - OutOfMemory Exception While Saving DocumentException
WORDSNET-16745Save method throws NullReferenceException after doing MailMergeException
WORDSNET-16749Unable to load DLL ‘libSkiaSharp’ exception is thrown while converting DOCX to PDFException
WORDSNET-17079SetLicense throws: An error occurred while parsing EntityNameException
WORDSNET-17141An exception raises when using long path namesException
WORDSNET-17237System.IndexOutOfRangeException is thrown when SvgSaveOptions.TextOutputMode is UsePlacedGlyphsException
WORDSNET-17263Aspose.Words.FileCorruptedException is thrown while importing RTFException
WORDSNET-17301InvalidOperationException: Unsupported encryption parameters occurs when loading a DOCException
WORDSNET-17302InvalidOperationException: Unsupported encryption parameters occurs when loading a DOCException
WORDSNET-17303InvalidOperationException: Unsupported encryption parameters occurs when loading a DOCException
WORDSNET-17335“Not expected other boolex values here” error occurs upon invoking ListFormat.ListLevel.Font.ItalicException
WORDSNET-16429Aspose.Words conversion throw error in DockerFeature
WORDSNET-16540Add load option to treat Shapes with math XML as Shapes in the modelFeature
WORDSNET-16962Support insertion of Bookmarks at Block, Row and Cell levelsFeature
WORDSNET-17190Investigate Aspose.Words for .NET containerizationFeature
WORDSNET-17313Provide option to choose between Old and New Mail Merge behaviorsFeature
WORDSNET-17127Significant decrease of performance getting bookmarkPerformance
WORDSNET-16637Bookmarks are not part of the BookmarkCollectionRegression
WORDSNET-17300Bookmark.Remove very slow in the Aspose.Version 18.8Regression
WORDSNET-17305Bookmark Performance issue in Aspose.Words 18.6 versionRegression

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 18.9. 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 a regression and modifies existing behavior is especially important and is documented here.

Bookmarks are Allowed on Block, Cell, Row Levels

WORDSNET-721 has now been resolved.

The bookmark nodes are allowed to be placed on the block, cell and row levels now. In the previous versions bookmarks were moved into the next nearest paragraph on document loading. So, now on reading/saving DOCX, DOC, WML documents, bookmarks preserve their positions in document node structure. The following public properties have been added into the LoadOptions class to control the mentioned behavior.

/// <summary>
/// Gets or sets a flag indicating whether cross structure annotation nodes can be added at block/cell/row level (<see cref="Node.NodeLevel"/>).
/// </summary>
/// <remarks>
/// Currently only bookmarks are affected by this option.
/// </remarks>
public boolean AnnotationsAtBlockLevel { get; set; }
/// <summary>
/// Gets or sets a default value for the <see cref="AnnotationsAtBlockLevel"/> property.
/// </summary>
/// <remarks>
/// Allows defining necessary behaviour when an instance of <see cref="LoadOptions"/> is not specified on opening a document.
/// </remarks>
public static boolean AnnotationsAtBlockLevelAsDefault { get; set; }

Now code that uses Aspose.Words should consider that not only composite nodes may appear on the block/cell/row level, for example, as children of the Body, Table, Row, Cell nodes. Setting the AnnotationsAtBlockLevelAsDefault property to false allows temporarily prevent possible issues with the existing code. But please note that the property may become obsolete in the further versions of the software.

UC to open a document in the inline-bookmarks mode

LoadOptions options = new LoadOptions();
options.setAnnotationsAtBlockLevel(false);
Document doc = new Document("Document1.docx", options);
UC to set the “old” mode as default
LoadOptions.setAnnotationsAtBlockLevelAsDefault(false);

Added LoadOption to Treat Shapes with Math XML as Shapes in Model

WORDSNET-16540 has now been resolved.

The “ConvertShapeToOfficeMath” property has been added to “LoadOptions” class.

/// <summary>
/// Gets or sets whether to convert shapes with EquationXML to Office Math objects.
/// </summary>
public boolean ConvertShapeToOfficeMath
{
    get { return mConvertShapeToOfficeMath; }
    set { mConvertShapeToOfficeMath = value; }
}

Default value corresponds to MS Word behaviour i.e. shapes with equation XML are not converted to Office math objects.

Use case:

LoadOptions lo = new LoadOptions();
lo.setConvertShapeToOfficeMath(true);

// Specify load option to use previous default behaviour i.e. convert math shapes to office math ojects on loading stage.
Document doc = new Document("SrcFile.docx", lo);

Option to Choose Between Old and New Mail Merge Behaviors Added

WORDSNET-17313 has now been resolved.

We had a customer (issue: WORDSNET-17259) who was not happy with the current Aspose.Words behavior related to the IF fields evaluation during mail merge. They were relying on the fact that the merge fields and regions located in the “false” argument of the IF field (“false” meaning the argument that does not match the condition) were merged in the past along with the “true” argument. This behavior was changed over time to mimic MS Word and at the moment it matches MS Word (the “false” argument is not merged); however the customer considered it a regression and wanted the old behavior back. To satisfy them, we decided to introduce an option controlling the behavior.

/// <summary>
/// Gets or sets a value indicating whether merge fields and merge regions are merged regardless of the parent IF field's condition.
/// </summary>
/// <remarks>
/// The default value is <b>false</b>.
/// </remarks>
public boolean UnconditionalMergeFieldsAndRegions

Use case:

document.getMailMerge().setUnconditionalMergeFieldsAndRegions(true);
document.getMailMerge().execute(dataSource);

Improved PDF encryption in Case when Owner Password is not Specified

WORDSNET-17316 has now been resolved.

Previously Aspose.Words created random owner password in the produced PDF document when PdfEncryptionDetails.OwnerPassword was not set by the user. This behavior was described in XML comments:

If you do not specify an owner password, then the system will generate a random password when generating the PDF document.

Now Aspose.Words properly sets the empty owner password when saving to PDF.