Browse our Products

Aspose.Words for Java 17.9 Release Notes

Major Features

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

  • New performance fixes.
  • Caching of shading patterns for PDF output implemented. The output size of PDF documents with the repeating images (e.g. in header/footer) is now significantly reduced.
  • Improved character spacing control handling for Asian text.
  • Improved table grid calculation when a paragraph in a cell has large indents.
  • Improved text wrapping in narrow line band when there is a leading tab stop.
  • Added feature to set Placeholder Text of Structured Document Tag.
  • Added feature to support w:dirty attribute on a field.
  • Updating value of SaveDate field just by doing open/save.

Full List of Issues Covering all Changes in this Release

WORDSJAVA-1583Symbols are changed after conversion from DOCX to PDFBug
WORDSJAVA-1588Some HTML data is missing in resultant DOCXBug
WORDSJAVA-1627Metadata Exception while saving to Pcl.Enhancement
WORDSJAVA-1641Transparent Gradient gets dark after saving to Pcl.Enhancement
WORDSJAVA-1551java.lang.NullPointerException is thrown while saving Docx to PDFException
WORDSJAVA-1602GetStartPageIndex method of LayoutCollector throws NullPointerExceptionException
WORDSJAVA-1633DOC to PDF conversion crashes JVMException
WORDSJAVA-1640JPEGImageWriter throws while saving Doc to Pcl.Exception
WORDSJAVA-1647Skipping parts for Docx Zip optimization doesn’t work on Java.Performance
WORDSJAVA-1639Word formatted with Outline Bold Impact Font is shifted.Regression
WORDSNET-11001Black backgrounds appear behind OLE objects in PDFBug
WORDSNET-11209A blank page added in generated PDFBug
WORDSNET-13308/character spacing control/ Incorrect foreign language character spacing in rendered documentsBug
WORDSNET-13557VML shape in incorrectly read from HTMLBug
WORDSNET-13741/character spacing control/ Chinese text renders on next line in HtmlFixedBug
WORDSNET-13743/character spacing control/ Chinese text moves to next page after conversion from Doc to HtmlFixedBug
WORDSNET-13750Cell’s contents are lost after re-saving RTFBug
WORDSNET-13963/character spacing control/ Docx to Pdf conversion issue with Chinese textBug
WORDSNET-14174Color of mail merge fields is changed after conversion from Docx to Doc/PdfBug
WORDSNET-14508TOC fields are corrupted during open/save RTFBug
WORDSNET-14573/character spacing control/ A paragraph wraps to next line in fixed page formatsBug
WORDSNET-14677Chart is changed to image after re-saving DocxBug
WORDSNET-14779Html to Docx conversion issue with table’s border styleBug
WORDSNET-14898Table Top Border missing in PDFBug
WORDSNET-15054Mail Merge - Numbered Bullet Points IncrementingBug
WORDSNET-15170/compressed punctuation + fullwidth characters/ Character spacing changes after DOCX to JPG conversionBug
WORDSNET-15185Long numbers are truncated in DOCX to HTML conversionBug
WORDSNET-15261CSS reader incorrectly processes @import rules that don’t end with a semicolonBug
WORDSNET-15418Move-from/move-to revisions of run properties of a paragraph are not read/writtenBug
WORDSNET-15425Docx to Odt conversion issue with GroupShape sizeBug
WORDSNET-15453Some HTML data is missing in resultant DOCXBug
WORDSNET-15545Incorrect text formatting in RTF to HTML conversionBug
WORDSNET-15554/compressed punctuation + fullwidth characters/ DOCX to PDF conversion issue with Japanese punctuation markBug
WORDSNET-15583Formatting issue in DOCX with revisions to PDFA conversionBug
WORDSNET-15597Justified XHTML text conversion issueBug
WORDSNET-15608Incorrect applying fill(Picture or texture) for bevel type of angle.Bug
WORDSNET-15613/text wrap/ Images not aligned in PDF renditionBug
WORDSNET-15621Text Replacement issue with RTL textBug
WORDSNET-15639Incorrect applying texture (hardware rendering).Bug
WORDSNET-15650When DOC is saved as PDF, in Arabic language 500 becomes 050Bug
WORDSNET-15651StructuredDocumentTag.FullDate is not updatingBug
WORDSNET-15663Assertions in CellMetricsBug
WORDSNET-15674The number of pages increases when saved into odt ott formatsBug
WORDSNET-15687List number format is not rendered correctly in output PDFBug
WORDSNET-15689Aspose.Words throws exception at Windows XP where mscorlib.dll v2.0.50727.42 is installedBug
WORDSNET-15701Heading bookmarks are not created after conversion from DOCX to PDF.Bug
WORDSNET-15705Tables count issue in RTFBug
WORDSNET-15707/character spacing control/ DOCX to PDF conversion issue with position of Chinese textBug
WORDSNET-15710Formatting issue in DOCX to SVG conversionBug
WORDSNET-15718Table of contents are brokenBug
WORDSNET-15729RTF to DOC conversion loses cell background colorsBug
WORDSNET-15732DOCX is corrupted when it is re-savedBug
WORDSNET-15743Hebrew text is reversed in output PDFBug
WORDSNET-15753Converting a landscape RTF document to PDF produces the corrupted output.Bug
WORDSNET-15763Hidden border of table is visible after saving RTF to DOC and PDFBug
WORDSNET-15778Document.UpdateFields throws System.NullReferenceExceptionBug
WORDSNET-15780Inconsistent results from JoinRunsWithSameFormattingBug
WORDSNET-15781Inconsistent results from JoinRunsWithSameFormattingBug
WORDSNET-2711Text becomes bold after open/save the document.Bug
WORDSNET-3136Table is moved to the next page during rendering.Bug
WORDSNET-4006Part of invisible content becomes visible upon renderingBug
WORDSNET-7194SmartArt (DrawingML) graphic is not preserved during DOCX to DOC conversionBug
WORDSNET-8786Table render incorrectly after conversion from Docx to PdfBug
WORDSNET-8878An EMF image is rendered completely black in PDFBug
WORDSNET-9136Docx to Pdf conversion issue with EMF metafileBug
WORDSNET-9142/table grid/ Table column widths are calculated incorrectly during renderingBug
WORDSNET-9516/character spacing control/ The line is incorrectly wrapped when punctuation compressing is enabledBug
WORDSNET-15220Show Placeholder text after removal of SDT runsEnhancement
WORDSNET-15372Preserve NUMPAGES fields during HTML round-tripEnhancement
WORDSNET-15627Table layout issue in DOCX to PDFEnhancement
WORDSNET-13896Exception is thrown when loading HTMLException
WORDSNET-15346/structure builder/ System.NullReferenceException is thrown while saving Docx to PDFException
WORDSNET-15713DOC is not loading into API throws FileCorruptedExceptionException
WORDSNET-15715Aspose.Words throws FileCorruptedException upon loading DOC fileException
WORDSNET-15716Aspose.Words throws FileCorruptedException upon loading a DOC fileException
WORDSNET-15799UpdateFields() throws IndexOutOfRange Exception with null chart valueException
WORDSNET-15803System.IndexOutOfRangeException is thrown while converting DOCX to PDFException
WORDSNET-14533Add feature to set Placeholder Text of Structured Document TagFeature
WORDSNET-15686Add feature to support w:dirty attribute on fieldFeature
WORDSNET-6956Charts are lost after open/save ODT document (triaged)Feature
WORDSNET-7912Consider updating value of SaveDate field just by doing open/saveFeature
WORDSNET-15162Print() first call taking more time than subsequent callsPerformance
WORDSNET-15605Document.UpdateFields method causes System.OutOfMemoryExceptionPerformance
WORDSNET-15224Aspose.Words.FileCorruptedException is thrown while loading HTMLRegression
WORDSNET-15783Document.UpdateFields does not update the formula fieldRegression
WORDSNET-15815Document.Compare throws System.NullReferenceExceptionRegression

Public API and Backward Incompatble Changes

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

Added LoadOptions.UpdateDirtyFields, Field.IsDirty and FieldChar.IsDirty Properties

WORDSNET-15686 has been resolved. While working on WORDSNET-15686, we have added three public properties related to the dirty (stale) state of the fields and controlling whether such fields should be updated: 


/// <summary>
/// Specifies whether to update the fields with the <c>dirty</c> attribute.
/// </summary>
public boolean getUpdateDirtyFields()
public void setUpdateDirtyFields(boolean value)


/// <summary>
/// Gets or sets whether the current result of the field is no longer correct (stale) due to other modifications made to the document.
/// </summary>
public boolean isDirty()
public void    isDirty(boolean value)


/// <summary>
/// Gets or sets whether the current result of the field is no longer correct (stale) due to other modifications
/// made to the document.
/// </summary>
public boolean isDirty()
public void    isDirty(boolean value)

When LoadOptions.UpdateDirtyFields == true, all fields having Field.IsDirty == true or FieldChar.IsDirty == true are updated on document load.

Added OdtSaveOptions.MeasureUnit Property

WORDSNET-15425 has been resolved. Public property added to OdtSaveOptions class:

/// <summary>
/// Allows to specify units of measure to apply to document content.
/// The default value is <see cref="OdtSaveMeasureUnit.Centimeters"/>
/// </summary>
/// <remarks>
/// Open Office uses centimeters when specifying lengths, widths and other measurable formatting and&nbsp;
/// content properties in documents whereas MS Office uses inches.
public int getMeasureUnit()
public void setMeasureUnit(int value)

Use case:

Document doc = new Document(dataDir + "Document.doc");
OdtSaveOptions saveOptions = new OdtSaveOptions();
saveOptions.setMeasureUnit(OdtSaveMeasureUnit.INCHES); + "MeasureUnit_out.odt", saveOptions);

Added Public Method StructuredDocumentTag.Clear

Ability to clear contents of a content control with displaying a placeholder is implemented.

/// <summary>
/// Clears contents of this structured document tag and displays a placeholder if it is defined.
/// </summary>
public void clear()

It is not possible to clear contents of a content control if it has revisions. Also, the method does nothing for row-level content controls that have more than one cell (limitation of MS Word). If a content control has no placeholder, five spaces are inserted like in MS Word (except repeating sections, repeating section items, groups, checkboxes, citations). If a content control is mapped to custom XML, the referenced XML node is cleared.

Example of use:

Document doc = new Document(myDir + "document1.docx");
StructuredDocumentTag sdt = (StructuredDocumentTag) doc.getChild(NodeType.STRUCTURED_DOCUMENT_TAG, 0, true);
sdt.clear(); + "document1.docx");

Added Public Property List.IsRestartAtEachSection.

Related issue: WORDSNET-15054

Public property added to the List class to support backward compatibility upon Mail Merge, please see WORDSNET-15054.

/// <summary>
/// Specifies whether list should be restarted at each section.
/// Default value is <b>false</b>.
/// </summary>
/// <remarks>
/// <p>This option is supported only in RTF, DOC and DOCX document formats.</p>
/// <p>This option will be written to DOCX only if <see cref="OoxmlCompliance"/> is higher then <see cref="OoxmlComplianceCore.Ecma376"/>.</p>
/// </remarks>
public boolean isRestartAtEachSection()
public void isRestartAtEachSection(boolean value)

Use case:

Document doc = new Document();
com.aspose.words.List list = doc.getLists().get(0);

// Set true to specify that the list has to be restarted at each section.
DocumentBuilder builder = new DocumentBuilder(doc);
for (int i = 1; i < 45; i++) {
    builder.writeln(String.format("List Item " + i));

    // Insert section break.
    if (i == 15)

// IsRestartAtEachSection will be written only if compliance is higher then OoxmlComplianceCore.Ecma376
OoxmlSaveOptions options = new OoxmlSaveOptions();
doc.Save("out.docx", options);

Here is the code snippet for backward compatibility upon Mail Merge:

Dictionary<List, bool> lists = new Dictionary<List, bool>();
foreach (List list in document.Lists)
	lists[list] = list.IsRestartAtEachSection;
foreach (KeyValuePair<List, bool> pair in lists)
	pair.Key.IsRestartAtEachSection = pair.Value

Added SaveOptions.UpdateLastSavedTimeProperty Property

Reference: WORDSNET-7912

While working on WORDSNET-7912, we have added the SaveOptions.UpdateLastSavedTimeProperty property that controls whether to update the corresponding built-in document property on document save.

/// <summary>
/// Gets or sets a value determining whether the <see cref="BuiltInDocumentProperties.LastSavedTime" /> property is updated before saving.
/// </summary>
public boolean getUpdateLastSavedTimeProperty()
public void    setUpdateLastSavedTimeProperty(boolean value)
Document doc = new Document(myDir + "Document.doc");
OoxmlSaveOptions options = new OoxmlSaveOptions();

// Save the document to disk."output.doc", options);