Browse our Products

Aspose.Words for Java 17.5 Release Notes

Major Features

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

  • New types of Radial Gradients are supported.
  • Online JavaDoc is synchronised with locally-generated one.
  • MailMerge and Metafile rendering performance are improved.
  • Support TOA, IMPORT, INCLUDE, SHAPE fields.
  • API to bind SDT to CustomXML properties is provided.
  • Implemented support for ShapeLayoutLikeWW8 compatibility option.
  • Improved calculation of width of spaces in Asian text.
  • Improved text wrapping for lines consisting of many tabs.
  • Improved layout of multi-column sections when column ends with page break followed by paragraph break.
  • A low resolution text rendering to images improved.
  • HtmlFixed output file rendering improved (removing zero-sized text boxes).
  • Image crop is now taken into account while rendering HtmlFixed.
  • Shaded DrawingML images rendering fixed.
  • DrawingML Charts rendering improved (axis label placement).

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WORDSJAVA-1478Mirrored position of chart axis label.Bug
WORDSJAVA-1498Specifying -Djava.ext.dirs causes i18 issuesBug
WORDSJAVA-1513Image is truncated after conversion from DOC to HtmlFixedBug
WORDSJAVA-1516TermInfo/TermName element doesn’t extracted if Terms element was selected.Bug
WORDSJAVA-1517Spanish labels become English.Bug
WORDSJAVA-1520Spanish labels become englishBug
WORDSJAVA-1529Unable to implement IFieldResultFormatterBug
WORDSJAVA-1480Some types of Radial Gradients are rendered incorrectly while saving to SVG.Enhancement
WORDSJAVA-1504Online JavaDoc miss some member descriptions and examples that exist in locally-generated one.Feature
WORDSNET-10427Doc to fixed file format conversion issue with STYLEREFBug
WORDSNET-10833non-breaking space. Text position is changed after conversion from Docx to Doc/PdfBug
WORDSNET-12367Aspose.Words does not import the Run nodes correctly in DOMBug
WORDSNET-12544space width + BalanceSingleByteDoubleByteWidth. Cell’s text moves to next line in output PdfBug
WORDSNET-14200Rtf to Docx conversion issue with spaces’s width.Bug
WORDSNET-14348ShapeLayoutLikeWW8. Doc to Pdf conversion issue with content’s positionBug
WORDSNET-14349Veracode vulnerabilities in running Aspose.Words API codeBug
WORDSNET-14355ShapeLayoutLikeWW8. Doc to Pdf conversion issue with shape’s positionBug
WORDSNET-14408Bookmark.Remove() removes only some bookmarks.Bug
WORDSNET-14647Chart is corrupted after conversion from MS WORD to PDFBug
WORDSNET-14661List labels are lost after conversion from RTF to PNGBug
WORDSNET-14667Image is lost after modifying the output Doc with MS Word 2003.Bug
WORDSNET-14682Document.AcceptAllRevisions does not accept all tracked changesBug
WORDSNET-14706Chart image size seems bigger than original when exporting to HTMLBug
WORDSNET-14874Embedded Fonts are gone when printing Aspose.Words generated PDFBug
WORDSNET-14881If saving to HTML and CssSavingArgs.CssStream is provided, CSS outputs both to the stream and to a fileBug
WORDSNET-14928Slope of Drawing Line is inversed when opening and saving the documentBug
WORDSNET-14952Pictures are shifted in rendered documentsBug
WORDSNET-14987Chart rendering is not accurate.Bug
WORDSNET-14992Vertical Axis of chart does not render correctlyBug
WORDSNET-14997Accept revisions cause a text deletion in CellBug
WORDSNET-15034Paragraph space after is changed after mail mergeBug
WORDSNET-15040Docx to Pdf conversion issue with Shape’s text formattingBug
WORDSNET-15055FontSettings are not document-bound during import from HTMLBug
WORDSNET-15067STYLEREF fields in headers resolve in Error when rendering Word document with revisions to PDFBug
WORDSNET-15083SVG is not exported in output DOC/PDFBug
WORDSNET-15105The stroke of SVG image is lost in output PDFBug
WORDSNET-15118Inline styles are used when styles are set to be saved separatelyBug
WORDSNET-15139Html to Docx/Pdf conversion issue with SVG imageBug
WORDSNET-15171Text color is changed in DOCX to JPG conversionBug
WORDSNET-15177Range.Replace method does not replace text in footnoteBug
WORDSNET-15182Text in DrawingML textboxes missing when converting to PDFBug
WORDSNET-15184Paragraph’s text is rendered on previous page in output HtmlFixed/PdfBug
WORDSNET-15202Document.AcceptAllRevisions removes the empty paragraph that causes incorrect page layoutBug
WORDSNET-15208Pages are truncated in output HtmlFixed/PDFBug
WORDSNET-15210API throws InvalidCastException upon loading DOCXBug
WORDSNET-15213Date field is incorrectly formatted when FieldUpdateCultureSource.FieldCode is usedBug
WORDSNET-15227Chart’s vertical axis are in correct in output PNGBug
WORDSNET-15228Chart’s vertical axis are rendered as decimal instead of integerBug
WORDSNET-15230The minimum axis bound is changed in output PNGBug
WORDSNET-15232Axis bounds and units of chart are changed in output PNGBug
WORDSNET-15237Incorrect conversion of x-axis data of a ChartBug
WORDSNET-15242Docx to PDF conversion issue with image renderingBug
WORDSNET-15254Horizontal axis of chart does not render correctlyBug
WORDSNET-6061decimal tab. Table column text aligned incorrectly while doc to png/bmp format.Bug
WORDSNET-6126Background of Shape becomes black upon converting to EPUB/HTMLBug
WORDSNET-6538Shapes are misplaced when rendering to TIFFBug
WORDSNET-7377decimal tabs. A Run of text splits into three lines in Cell when rendering to PdfBug
WORDSNET-9371Hebrew (RTL) characters are turned into garbage characters during rendering to PDFBug
WORDSNET-9606A nested floating table is not rendering in PdfBug
WORDSNET-11781Incorrect text wrapping when a line starts with a huge spaceEnhancement
WORDSNET-14782Outline is incorrect upon converting VML to DMLEnhancement
WORDSNET-15014Aspose.Words Objects are very verboseEnhancement
WORDSNET-15038MHTML import. Image format EMZ is not supported.Enhancement
WORDSNET-15052Simplifiy OMath when copying it into toc entryEnhancement
WORDSNET-15135Take image crop in account when render to HtmlFixed.Enhancement
WORDSNET-15155Documents rendered incorrectlyEnhancement
WORDSNET-15200Obtain the correct distance between list label and content of list itemEnhancement
WORDSNET-7252Backslashes and double quotes are not processed properly by the FieldTokenDecoderEnhancement
WORDSNET-7302An odd space added between spans at export to PNGEnhancement
WORDSNET-8436Rendering RTL tables to GDI/PNG is wrongEnhancement
WORDSNET-14880Exception when Saving Words document and CSS to StreamException
WORDSNET-14926When open .MOBI file, the Aspose.Words.FileCorruptedException occurs.Exception
WORDSNET-14996AcceptAllRevisions throws System.ArgumentExceptionException
WORDSNET-15068Document.UpdateFields throws System.IndexOutOfRangeExceptionException
WORDSNET-15079Document.UpdateFields throws System.ArgumentExceptionException
WORDSNET-15160Document.UpdateFields throws System.InvalidOperationExceptionException
WORDSNET-15189Aspose.Words.FileCorruptedException is thrown while loading DOCXException
WORDSNET-15194Bookmark.Text throws System.ArgumentException when it is set to empty stringException
WORDSNET-15267Document.Save throws System.InvalidOperationExceptionException
WORDSNET-14363Support TOA fieldFeature
WORDSNET-15243Support IMPORT fieldFeature
WORDSNET-15244Support INCLUDE fieldFeature
WORDSNET-15245Support SHAPE fieldFeature
WORDSNET-4738Provide an API to bind SDT to CustomXML properties.Feature
WORDSNET-15089performance. slow Document.MailMerge.ExecutePerformance
WORDSNET-13424Odt appears to be corrupted with 16.2.0 and Mono 2.10.8Regression
WORDSNET-15114HtmlFixed file size is increased after conversion from DOCRegression
WORDSNET-15122Escaping problem of double quotes in latest versionRegression
WORDSNET-15143Changing of BackgroundPatternColor doesn’t work.Regression
WORDSNET-15146Table border can’t be changed.Regression
WORDSNET-15149DOC to HTML conversion results a big HTMLRegression
WORDSNET-15161Table borders disappear after Paragraph removalRegression
WORDSNET-15199Header content becomes visible from behind a floating Frame with shading during renderingRegression

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 17.5. 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.

Added Public Method CustomXmlPartCollection.add(string id, string xml)

A public method is added into the CustomXmlPartCollection class to help in creation of a custom XML part by specifying its XML:

/// <summary>
/// Creates a new XML part with the specified XML and adds it to the collection.
/// </summary>
/// <param name="id">Identifier of a new custom XML part.</param>
/// <param name="xml">XML data of the part.</param>
/// <returns>Created custom XML part.</returns>
public CustomXmlPart add(string id, string xml)

Value of the ‘xml’ parameter is encoded as UTF8 and is stored in creating XML part.

UC for creating a custom XML part by specifying its XML

Document doc = new Document();
CustomXmlPart xmlPart = doc.getCustomXmlParts().add(UUID.fromString("B").toString(), "<root><text>Hello, World!</text></root>");
StructuredDocumentTag sdt = new StructuredDocumentTag(doc, SdtType.PLAIN_TEXT, MarkupLevel.BLOCK);
sdt.getXmlMapping().setMapping(xmlPart, "/root[1]/text[1]", "");
doc.getFirstSection().getBody().appendChild(sdt);

Implemented API to Bind StructuredDocumentTag to Node of Custom XML Part

WORDSNET-4738 has been resolved. The following public property is added into the StructuredDocumentTag class:

/// <summary>
/// Gets an object that represents the mapping of this structured document tag to XML data
/// in a custom XML part of the current document.
/// </summary>
/// <remarks>
/// You can use the <see cref="Markup.XmlMapping.SetMapping"/> method of this object to map
/// a structured document tag to XML data.
/// </remarks>
public XmlMapping getXmlMapping()

Public methods of the XmlMapping class:

/// <summary>
/// Specifies the information that is used to establish a mapping between the parent
/// structured document tag and an XML element stored within a custom XML data part in the document.
/// </summary>
public class XmlMapping
{
    /// <summary>
    /// Sets a mapping between the parent structured document tag and an XML node of a custom XML data part.
    /// </summary>
    /// <param name="customXmlPart">A custom XML data part to map to.</param>
    /// <param name="xPath">An XPath expression to find the XML node.</param>
    /// <param name="prefixMapping">XML namespace prefix mappings to evaluate the XPath.</param>
    /// <returns>A flag indicating whether the parent structured document tag is successfully mapped to
    /// the XML node.</returns>
    public boolean setMapping(CustomXmlPart customXmlPart, string xPath, string prefixMapping);
    /// <summary>
    /// Deletes mapping of the parent structured document to XML data.
    /// </summary>
    public void delete();
    /// <summary>
    /// Returns the custom XML data part to which the parent structured document tag is mapped.
    /// </summary>
    public CustomXmlPart getCustomXmlPart()
    /// <summary>
    /// Returns the XPath expression, which is evaluated to find the custom XML node
    /// that is mapped to the parent structured document tag.
    /// </summary>
    public string getXPath()
    /// <summary>
    /// Returns XML namespace prefix mappings to evaluate the <see cref="XPath"/>.
    /// </summary>
    /// <remarks>
    /// Specifies the set of prefix mappings, which shall be used to interpret the XPath expression
    /// when the XPath expression is evaluated against the custom XML data parts in the document.
    /// </remarks>
    public string getPrefixMappings()
    /// <summary>
    /// Returns <b>true</b> if the parent structured document tag is successfully mapped to XML data.
    /// </summary>
    public boolean isMapped()
}

UC for creation of an XML part and binding a content control to it

Document doc = new Document();
CustomXmlPart xmlPart = doc.getCustomXmlParts().add(UUID.fromString("B").toString(), "<root><text>Hello, World!</text></root>");
StructuredDocumentTag sdt = new StructuredDocumentTag(doc, SdtType.PLAIN_TEXT, MarkupLevel.BLOCK);
doc.getFirstSection().getBody().appendChild(sdt);
sdt.getXmlMapping().setMapping(xmlPart, "/root[1]/text[1]", "");
doc.save(fileName);

CellFormat.setPaddings Method was Introduced.

WORDSNET-15014 (Enhancement) has been resolved. We have added a simple method allowing to set all cell paddings in one line of code.

/// <summary>
/// Sets the amount of space (in points) to add to the left/top/right/bottom of the contents of cell.
/// </summary>
public void setPaddings(double leftPadding, double topPadding, double rightPadding, double bottomPadding)

You can use this method instead of using four properties:

// Set all cell paddings.
builder.getCellFormat().setPaddings(30, 40, 50, 60);