Browse our Products

Aspose.Words for Java 18.1 Release Notes

Major Features

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

  • Improved character spacing control logic.
  • Improved space shrinking for Verdana font.
  • Improved “allow handing punctuation” handling when kerning is enabled.
  • Fixed clip issue with semi-broken tables.
  • Fixed draw order of wrapped shapes in 2013 mode.
  • Fixed repeated header height problem during field update.
  • Fixed the bug causing error in page numbers in multi-page documents rendered into PostScript.
  • Proper calculation of undocumented margins in DrawingML Charts implemented.
  • Horizontal axis of Bubble Chart scaling fixed.
  • Vertical axis of 3DArea Chart scaling fixed.
  • MS Word 2016 approach for rendering of DrawingML Charts axis labels implemented; (Labels are rotated to fit the chart).
  • Fixed rendering of Legend markers for 3D-LineChart.
  • Improved rendering of composite (with multiple series) charts.
  • Chart title with ManualLayout rendering fixed.

Full List of Issues Covering all Changes in this Release

WORDSJAVA-1704Gradient fill image is filled as solid fill in PDFBug
WORDSJAVA-1681Thai words are showing as squares when converted to DOC.Bug
WORDSJAVA-1680Document.UpdateFields does not update LastSavedTime.Bug
WORDSJAVA-1634Bullets rendering issue on LinuxBug
WORDSNET-10235Header contents are overlapped with body contents after conversion from Docx to PdfBug
WORDSNET-15389Content overlaps footerBug
WORDSNET-15609Right borders specified for “tr” or “tbody” elements are not applied to cellBug
WORDSNET-15840ReplacingArgs.Replacement returns incorrect valueBug
WORDSNET-15944Scaling issue of charts in DOCX to PDF conversionBug
WORDSNET-15958Difference in values of axis in DOCX to PDF renderingBug
WORDSNET-15991Barcode images are missing upon RTF conversionBug
WORDSNET-16019DOCX to PDF conversion loses some imagesBug
WORDSNET-16070Font information garbled in RTF documentBug
WORDSNET-16117White Paragraphs in Cells Turn Black during Saving a RTFBug
WORDSNET-16125Incorrect TOC page number in RTF to DOCX conversionBug
WORDSNET-16126Incorrect TOC page number in RTF to DOCX conversionBug
WORDSNET-16137System.NullReferenceException is thrown when RevisionOptions.ShowRevisionBalloons is set to trueBug
WORDSNET-16155Repeating Section Content Control is not rendered in output PDFBug
WORDSNET-16163RTF to DOCX conversion issue for Footnote Words Become SuperscriptBug
WORDSNET-16173Incorrect rotation of the X-axis label text when exporting to PDFBug
WORDSNET-16174Legend markers for 3D-LineChart are rendered incorrectly when exporting to PDFBug
WORDSNET-16184Incorrect TOC page number in RTF to DOCX conversionBug
WORDSNET-16187Error in page number when converting to PostScriptBug
WORDSNET-16189Range.Replace text within GroupShape does not ReplaceBug
WORDSNET-16192DOCX to HTML conversion issue with chart renderingBug
WORDSNET-16200OfficeMath is changed after re-saving DOCXBug
WORDSNET-16203AllowHangingPunctuation rule is improperly processedBug
WORDSNET-16208When open DOCX file, an exception occursBug
WORDSNET-16212Html save as Odt - view of table is different than in Docx and in MS WordBug
WORDSNET-16215Document.Compare returns incorrect revisionsBug
WORDSNET-16222Incorrect TOC page number in RTF to DOCX conversionBug
WORDSNET-16223Incorrect TOC page number in RTF to DOCX conversionBug
WORDSNET-16234FontInfoCollection.EmbedSystemFonts default value is incorrectBug
WORDSNET-16236Problem with ChartTitle with ManualLayout when exporting to PDFBug
WORDSNET-16246BorderGrid class fires assertion when renders cell bordersBug
WORDSNET-16253Some characters are changed after conversion RTF to DOCXBug
WORDSNET-16273Table with image renders incorrectly while saving DOCX to PDFBug
WORDSNET-5426Autofit doesn’t work properly when the table has merged cells.Bug
WORDSNET-7251ListLabel.LabelValue is incorrectly imported from HTML to Docx/DocBug
WORDSNET-7505PDF rendering issue with the insertion of imagesBug
WORDSNET-78593D shape renders incorrectly if it has relative sizeBug
WORDSNET-8672Font size of Watermark text is increased and Shape is partially displaying in PDFBug
WORDSNET-14244RTF to Pdf conversion issue with text-box positionEnhancement
WORDSNET-15776Empty row gets added when closing tag «/foreach» is in last row of tableEnhancement
WORDSNET-16069Incorrect ChartDataPoint CloningEnhancement
WORDSNET-16144Some headers/footers have height of 0 in XMLs obtained by internal layout APIEnhancement
WORDSNET-16167Rework Pdf digital signing code to be compatible with NetStandart 2.0Enhancement
WORDSNET-16194The length of superscripted footnote’s text is incorrect in RTF output.Enhancement
WORDSNET-16267Shape is not rendered correctly in output PDFEnhancement
WORDSNETSTD-44Cleen up System.Security.Cryptography.Xml.Enhancement
WORDSNETSTD-45Removed Aspose.Xamarin.Security project.Enhancement
WORDSNET-13863ReportingEngine.BuildReport throws System.NullReferenceExceptionException
WORDSNET-15397Application crashes on loading MHT file in Document ObjectException
WORDSNET-16143DOCX to HTML conversion fails with “Stack empty” error messageException
WORDSNET-16197System.InvalidOperationException occurs when saving to PDFException
WORDSNET-16201Exception is thrown when exporting to HTMLException
WORDSNET-16209Setting RevisionOptions.ShowRevisionBalloons to True causes System.InvalidCastExceptionException
WORDSNET-16262When DOCX is opened, FileCorruptedException occursException
WORDSNET-6919Consider adding resiliency during saving nested empty TablesException
WORDSNET-15801Add feature to show/hide axis of chartFeature
WORDSNET-16042API to get geometric position of element in Word DocFeature
WORDSNET-16060Add feature to get w:storeItemID of StructuredDocumentTagFeature
WORDSNET-16092Add feature to add multiple replies to comment using Comment.AddReplyFeature

Public API and Backward Incompatible Changes

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

Enhanced Support of Single-Column Table Data Bands and Conditional Blocks for LINQ Reporting Engine

Related issues WORDSNET-13863, WORDSNET-15776, WORDSNET-16188.

The “Working with Table-Row Data Bands” and “Working with Table-Row Conditional Blocks” sections of the engine’s documentation were updated to describe the change.

Remove Obsolete Method in CompositeNode

Removed obsolete public method from CompositeNode class:

public NodeCollection getChildNodes(NodeType nodeType, boolean isDeep, boolean isLive)

Parameter “isLive” is not used anymore. Please use CompositeNode.GetChildNodes(NodeType nodeType, bool isDeep) instead.

Added the ChartAxis.Hidden Property

Related Issue: WORDSNET-15801

The following public property has been added into the ChartAxis class:

/// <summary>
/// Gets or sets a flag indicating whether this axis is hidden or not.
/// </summary>
/// <remarks>
/// Default value is false.
/// </remarks>
public boolean Hidden
    get; set;

The property allows hiding/showing and getting visibility state of an axis of a chart.

UC to create a chart and hide its Y axis

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert chart.
Shape shape = builder.insertChart(ChartType.COLUMN, 432, 252);
Chart chart = shape.getChart();

// Clear demo data.

// Fill data.
chart.getSeries().add("AW Series 1",
        new String[] { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" },
        new double[] { 1.2, 0.3, 2.1, 2.9, 4.2 });

// Hide the Y axis.
dataDir = dataDir + "HideChartAxis_out.docx";;

Added Property for Preserving Meta-Characters during Replacement

Related Issue: WORDSNET-15840

We have added public get/set property for preserving meta-characters during replacement as an option in FindReplaceOptions class

/// <summary>
/// True indicates that meta-characters beginning with "&" are preserved.
/// Default value is false.
/// </summary>
public boolean PreserveMetaCharacters

This is useful for example in replacing html text with meta-characters such as “&ldquo” and others

Sample usage

// The path to the documents directory.
String dataDir = Utils.getSharedDataDir(ReplaceTextWithField.class) + "FindAndReplace/";
String html = "<p>&ldquo;Some Text&rdquo;</p>";

// Initialize a Document.
Document doc = new Document();

// Use a document builder to add content to the document.
DocumentBuilder builder = new DocumentBuilder(doc);
FindReplaceOptions findReplaceOptions = new FindReplaceOptions();
findReplaceOptions.setReplacingCallback(new FindAndInsertHtml());
doc.getRange().replace("{PLACEHOLDER}", html, findReplaceOptions);
dataDir = dataDir + "ReplaceHtmlTextWithMetaCharacters_out.doc";;
static class FindAndInsertHtml implements IReplacingCallback {
    public int replacing(ReplacingArgs e) throws Exception {
        // This is a Run node that contains either the beginning or the complete match.
        Node currentNode = e.getMatchNode();

        // create Document Buidler and insert MergeField
        DocumentBuilder builder = new DocumentBuilder((Document) e.getMatchNode().getDocument());
        //Signal to the replace engine to do nothing because we have already done all what we wanted.
        return ReplaceAction.SKIP;

Added Feature to Get StoreItemID Property of StructuredDocumentTag

Related Issue: WORDSNET-16060

As per customer’s request, we have made public get property StoreItemId of class XmlMapping:

/// <summary>
/// Specifies the custom XML data identifier for the custom XML data part which
/// shall be used to evaluate the <see cref="XPath"/> expression.
/// </summary>
public String StoreItemId

More info about storeItemID property:

Sample usage:

Document doc = new Document("file.docx");
StructuredDocumentTag sdt = (StructuredDocumentTag) doc.getChild(NodeType.STRUCTURED_DOCUMENT_TAG, 0, true);
System.out.println("Id = " + sdt.getXmlMapping().getStoreItemId());