Aspose.Words for Java 17.4 Release Notes

Major Features

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

  • Digital signature of ODT documents.
  • CompareOptions class introduced to allow customer specify comparison settings.
  • Custom Xml Data Properties is now supported for RTF format.
  • Implemented support for baseline alignment in asian text.
  • Improved table split for vertically merged cells in combination with atleast height.
  • Improved table grid calculation for horizontally merged cells.
  • Improved BalanceSingleByteDoubleByteWidth  handling.
  • The horizontal and vertical resolution of output images can now be specified separately (through ImageSaveOptions.VerticalResolution and ImageSaveOptions.HorizontalResolution).
  • Underline, strikethrough, text borders and effects are now taken into account wile rendering OfficeMath equation text.
  • A substitution of fonts with the same name but with different suffixes now generates a proper warning.
  • Metafiles with isotropic mapping mode is now rendered properly (shapes placement fixed).
  • Textboxes with automatic fit is now rendered correctly inside the group shapes.
  • Corrupted texture images do not stop the rendering procedure with an exception, a warning is sent instead now.
  • DrawingML Charts rendering improved (rotated and scaled horizontal axis labels).

Full List of Issues Covering all Changes in this Release

WORDSJAVA-1494Whitespaces added to calculated Field result.Bug
WORDSJAVA-1499Images are incorrect when stored in html formatBug
WORDSJAVA-1503Hebrew month in date field rendered incorrectly.Bug
WORDSJAVA-1505Hebrew month is changed when DOCX is saved as PDF.Bug
WORDSJAVA-1483Docm to PDF conversion has issues with grayscale image.Enhancement
WORDSJAVA-1493Dot to Pdf conversion issue with Image renderingEnhancement
WORDSJAVA-1501Sign ODT document.Feature
WORDSNET-10953Table width is not calculated correctly during rendering to PDFBug
WORDSNET-11295/vertical text alignment/ ROOT Inline Shape position is changed after conversion from Docx to PdfBug
WORDSNET-12171Docx to Pdf conversion issue with AltChunk (HTML file)Bug
WORDSNET-12921Restricted and Hidden styles appearing in styles pane and Quick style gallaryBug
WORDSNET-13142The font size of altChunk contents is changed after re-saving DocxBug
WORDSNET-13143The font name of altChunk contents is changed after re-saving DocxBug
WORDSNET-13535TextAlignment property does not take effect and leads to different output from MS Word when converting to xpsBug
WORDSNET-14000PDF Conversion Issue with Docx containing customxmlBug
WORDSNET-14053Unknown ListTrailingCharacter enum member.Bug
WORDSNET-14159Image is rendered on next page after conversion from Docx to PdfBug
WORDSNET-14246Document.Compare generates incorrect format revisionsBug
WORDSNET-14265Incorrect export of equation in MathMLBug
WORDSNET-14319Incorrect order of tags if they are inside of MS Word’s table during Replace operationBug
WORDSNET-14323Shape’s text does not render correctly in output PdfBug
WORDSNET-14324Docx to Pdf conversion issue with shape’s renderingBug
WORDSNET-14325Docx to Pdf conversion issue with shape’s rendering/positionBug
WORDSNET-14540Strikethrough in Equation not preserved during renderingBug
WORDSNET-14744Textbox positions are not preserved during open/save a DOCXBug
WORDSNET-14807Roundtrip of the DOCX document has wrong outputBug
WORDSNET-14812Word to HTML then back to Word, table has extra space between rowsBug
WORDSNET-14853PageRef is converted to hyperlink in output PdfBug
WORDSNET-14857Showing bullets and font substitution problemsBug
WORDSNET-14871Document’s contents are lost after re-saving DocxBug
WORDSNET-14899Saving Embedded Spreadsheet produces a different file every timeBug
WORDSNET-14917MHTML to PDF, Hebrew content in Subject is changed.Bug
WORDSNET-14919When DOCX is saved as PDF, some content overlaps the footer.Bug
WORDSNET-14924Document.UpdateFields does not update Ref field in output Docx/PdfBug
WORDSNET-14932Extra div elements are exported in HtmlFixedBug
WORDSNET-14938While transforming a specific Word document to PDF, the table appears mixed up.Bug
WORDSNET-14946Word drawing diagrams are overlapped after conversion from Docx to Doc/PdfBug
WORDSNET-14965When DOCX is saved as PDF, the line of graph is different.Bug
WORDSNET-14967The embedded xlsm is changed to xlsx after re-saving DocxBug
WORDSNET-14969DOCX save inserts invalid tblPrEx element to styleBug
WORDSNET-14980Different number of lines in AW pdf output because of SBCS/DBCS balancingBug
WORDSNET-14985Stylesheet problem when saving DOC to DOCBug
WORDSNET-14988When DOCX is saved as PDF, gradient fill is lostBug
WORDSNET-14991Horizontal Axis of chart does not render correctlyBug
WORDSNET-14993ShapeRenderer.Save renders extra number on chart’s imageBug
WORDSNET-15021Corrupted word file after saveBug
WORDSNET-15030DocumentBuilder.MoveToHeaderFooter does not move the cursor to the header of documentBug
WORDSNET-15031Trendline of chart is changed in output PdfBug
WORDSNET-15036Part of header image is truncated in output HtmlFixedBug
WORDSNET-15039Docx to Pdf conversion issue with OfficeMath equationsBug
WORDSNET-15046Range.Replace finds and replaces text in the incorrect orderBug
WORDSNET-15049The Image is lost When Convert docx to docx (pdf)Bug
WORDSNET-15050Old incorrect value is rendered inside a SDT in PDFBug
WORDSNET-15051When DOCX is saved as PDF, the comma in chart has been replaced by semi-colon in all labels.Bug
WORDSNET-15056The chart’s legend entries are reversed in HtmlFixedBug
WORDSNET-15070SEQ Ordinal not translated in DutchBug
WORDSNET-15074Pictures not shown or rendered incorrectly in HtmlFixedBug
WORDSNET-15082Custom document properties are lost after conversion from Doc to DocxBug
WORDSNET-15092Spanish labels become englishBug
WORDSNET-4586Style of text in header is changed during rendering.Bug
WORDSNET-4930Composite nodes inside paragraph not handled during TOC update.Bug
WORDSNET-7079Font name is corrupted when converting RTF to DOCBug
WORDSNET-13324Document.Save removes *\datastore … tag from RtfEnhancement
WORDSNET-14330Make sure CssIdentifierValue.ToCss escapes identifier.Enhancement
WORDSNET-14766Import custom list markers from ::before pseudo-elements when converting from HTML to WordsEnhancement
WORDSNET-15005x-none language is not supported for DOCXEnhancement
WORDSNET-15043Cell’s border become visible after modifying style of Div tag in HtmlFixedEnhancement
WORDSNET-10847System.NullReferenceException when calling UpdateFields methodException
WORDSNET-14529Aspose.Words.FileCorruptedException occurs upon loading HTMLException
WORDSNET-14897System.ArgumentNullException is thrown while saving Doc to HtmlException
WORDSNET-14935A generic error occurred in GDI+Exception
WORDSNET-14963System.ArgumentOutOfRangeException is thrown while saving Docx to PdfException
WORDSNET-14981Shape.GetShapeRenderer throws System.NullReferenceExceptionException
WORDSNET-14983System.NullReferenceException occurs upon converting DOCX to XPSException
WORDSNET-15012Bookmark.Text throws System.NullReferenceExceptionException
WORDSNET-15015System.ArgumentOutOfRangeException is thrown while converting Docx to PdfException
WORDSNET-15042Document.AcceptAllRevisions thriws System.ArgumentExceptionException
WORDSNET-15066Chart object crashing shape.GetShapeRenderer()Exception
WORDSNET-15097Aspose.Words.FileCorruptedException is thrown while loading DOCException
WORDSNET-12345Compare documents with comparison settingFeature
WORDSNET-13938Convert Vml shapes to Dml upon saving to Strict Open XML Document format.Feature
WORDSNET-14944Add feature to remove spaces between sign and digits during mail mergeFeature
WORDSNET-15010Add feature to set Horizontal and Vertical Resolution of output imageFeature
WORDSNET-2496Consider support of conditional and browser-dependent commentsFeature
WORDSNET-12477Table doesn’t use the entire page width in PDFRegression
WORDSNET-14978Some of the rows and columns are missing in Aspose 17.2 generated PDF fileRegression
WORDSNET-15087Document.UpdateFields does not update fields when ExecuteWithRegions is usedRegression

Public API and Backward Incompatible Changes

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

Added an Interface to Flexibly Format Field Result

WORDSNET-14944 has been resolved.

We have added an interface allowing to implement a custom formatting of field’s result. The original request was about adding a feature to remove spaces between sign and digits during mail merge. However, we decided to implement a more generic and flexible solution because our API is already overwhelmed with different specific properties.

DocumentBuilder builder = new DocumentBuilder();
Document document = builder.getDocument();
Field field = builder.insertField("=-1234567.89 \\# \"### ### ###.000\"", null);
document.getFieldOptions().setResultFormatter(new FieldResultFormatter("[%0$s]", null));
/////implementation of IFieldResultFormatter////////
public class FieldResultFormatter implements IFieldResultFormatter {
	private final String mNumberFormat;
	private final String mDateFormat;
	private final ArrayList mNumberFormatInvocations = new ArrayList();
	private final ArrayList mDateFormatInvocations = new ArrayList();
	public FieldResultFormatter(String numberFormat, String dateFormat) {
		mNumberFormat = numberFormat;
		mDateFormat = dateFormat;
	public FieldResultFormatter() {
		mNumberFormat = null;
		mDateFormat = null;
	public String format(String arg0, int arg1) {
		// TODO Auto-generated method stub
		return null;
	public String format(double arg0, int arg1) {
		// TODO Auto-generated method stub
		return null;
	public String formatNumeric(double value, String format) {
		// TODO Auto-generated method stub
		mNumberFormatInvocations.add(new Object[] { value, format });
		return (mNumberFormat.isEmpty() || mNumberFormat == null) ? null
				: String.format(mNumberFormat, value);
	public String formatDateTime(Date value, String format, int calendarType) {
				.add(new Object[] { value, format, calendarType });
		return (mDateFormat.isEmpty() || mDateFormat == null) ? null : String
				.format(mDateFormat, value);

Added Feature to Set Horizontal and Vertical Resolution of Output Image

Previously it was one property Resolution that set both vertical and horizontal resolution to the same values. Now new public properties HorizontalResolution and VerticalResolution are added into the ImageSaveOptions class:

/// <summary>
/// Gets or sets the horizontal resolution for the generated images, in dots per inch.
/// </summary>
/// <remarks>
/// <para>This property has effect only when saving to raster image formats.</para>
/// <p>The default value is 96.</p>
/// </remarks>
public float HorizontalResolution {get;set;}
/// <summary>
/// Gets or sets the vertical resolution for the generated images, in dots per inch.
/// </summary>
/// <remarks>
/// <para>This property has effect only when saving to raster image formats.</para>
/// <p>The default value is 96.</p>
/// </remarks>
public float VerticalResolution {get;set;}

Please note, that Resolution property became write-only:

/// <summary>
/// Sets both horizontal and vertical resolution for the generated images, in dots per inch.
/// </summary>
/// <remarks>
/// <para>This property has effect only when saving to raster image formats.</para>
/// </remarks>
public float Resolution {set;}