Browse our Products

Aspose.Words for Java 19.9 Release Notes

Major Features

  • Advanced typography based on HarfBuzz shaper.
  • Provided API to write and modify VBA macros.
  • Implemented ability to create repeating section structured document tags.
  • Simplified work with XML and CSV data sources for LINQ Reporting Engine.
  • Improved rendering of “Sitka Banner”, “Sitka Display”, “Sitka Heading”, “Sitka Small”, “Sitka Subheading”, “Sitka Text” and “Cambria Math” fonts.
  • Implemented OpenType number spacing.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WORDSJAVA-2120Advanced typography based on HarfBuzz shaper.New Feature
WORDSJAVA-2178XML Data Source on JavaNew Feature
WORDSNET-19120Add support for the Truncate Font Height compatibility optionNew Feature
WORDSNET-18722Simplify working with XML, JSON, and CSV data sources for LINQ Reporting EngineNew Feature
WORDSNET-12480Provide the ability to manipulate VBA macro code (string changes)New Feature
WORDSNET-12655Provide code to programmatically create RepeatingSection SDT using Aspose.WordsNew Feature
WORDSNET-18542Improve macros extract from the documentNew Feature
WORDSNET-1055Implement the “match destination formatting” behaviourNew Feature
WORDSJAVA-2162HTML to DOCX conversion issue with list numberingBug
WORDSJAVA-2166java.lang.Exception: javax.imageio.IIOException is thrown while saving the document to HtmlFixedBug
WORDSJAVA-2183DateTime time zone shift while working with XML Data Source on JavaBug
WORDSNET-19039System.InvalidOperationException is thrown while converting DOCX to PNGBug
WORDSNET-19011RTF-DOCM-RTF roundtrip causes System.NullReferenceExceptionBug
WORDSNET-18210Incorrect number formatting in PDFBug
WORDSNET-18909Empty field values on saving to PDFBug
WORDSNET-18605Inline picture nested inside textframe in 2013 mode isn’t clippedBug
WORDSNET-18607System.NullReferenceException is thrown while saving DOCX to PDFBug
WORDSNET-18912MailMerge.Execute merges the Date field incorrectlyBug
WORDSNET-19015Footnotes missing when saving DOC to DOCBug
WORDSNET-18918System.ArgumentException is thrown while saving DOCX to PDFBug
WORDSNET-18917System.ArgumentException is thrown during  converting DOCX to PDF/PNGBug
WORDSNET-18927Implement clipping for nested inline/floating shapes/pictures/charts/diagrams/WordArtsBug
WORDSNET-19016DOCX is not imported into Aspose.Words’ DOMBug
WORDSNET-18076Nested tables inside row with exact height in inline table aren’t clippedBug
WORDSNET-18793Incorrectly formatted pie charts in PDFBug
WORDSNET-18931Image is converted to red cross in output PDFBug
WORDSNET-19050TxtSaveOptions.PreserveTableLayout does not preserve cell alignmeBug
WORDSNET-18754System.InvalidOperationException is thrown by Document.PageCountBug
WORDSNET-18939System.ArgumentNullException is thrown while saving DOCX to PDFBug
WORDSNET-19024Fail to load an OLE from RTFBug
WORDSNET-11180Shape is not visible after conversion from DOCX to PDF/HTMLBug
WORDSNET-15341Misplaced characters when saving as image or HTMLBug
WORDSNET-19029Aspose.Words.FileCorruptedException occurs upon loading a DOCBug
WORDSNET-18615System.NullReferenceException occurs upon saving DOCX to PDFBug
WORDSNET-18794Incorrectly formatted pie charts in PDFBug
WORDSNET-18795Problem with pie charts format in PDFBug
WORDSNET-19056The document is broken when setting ShowDataLabelsRange to trueBug
WORDSNET-18943After merging documents and updating the fields the TOC formatting changes to Normal styleBug
WORDSNET-11652Frame text overlapped by another frame’s inline shape shows in AW outputBug
WORDSNET-18560Chart’s text is overlapped after conversion from DOCX to PDFBug
WORDSNET-19092DOCX with graphic to PDF conversion issueBug
WORDSNET-18697Improve API to write and modify VBA macrosBug
WORDSNET-18997Shapes saved to DOC no longer editable/moveableBug
WORDSNET-18891Incorrect scaling of the horizontal date axis after conversion to PDFBug
WORDSNET-19006System.IO.EndOfStreamException is thrown while re-saving DOCXBug
WORDSNET-18101Horizontal axis does not render correctly in output PDFBug
WORDSNET-18099DOCX to PDF conversion issue with chart’s renderingBug
WORDSNET-18271A character is not rendered in Word to PDF rendition correctlyBug
WORDSNET-18365Vietnamese text becomes number in PDF - PAGE fieldBug
WORDSNET-18981Data label of the zero point of BarChart is not rendered after conversion to PDFBug
WORDSNET-19123Aspose.Words.Shaping summaries are empty in CHM help fileBug
WORDSNET-18798UpdateFields behaves differently from MS Word update engineBug
WORDSNET-14756Nested table not clipped by outer inline tableBug
WORDSNET-18799Exception when rendering Word document as HTMLBug
WORDSNET-17963Shapes are rendered improperly during DOCX to PDF conversionBug
WORDSNET-18183Floating table content inside cell with vertical text orientation rotated with textBug
WORDSNET-18988Advance field is lost after calling Document.UpdateFields methodBug
WORDSNET-18824The new line characters are missing when loading MHTML filesBug
WORDSNET-18821Empty Bookmark is removed before IF field is evaluated when RemoveEmptyParagraphs is usedBug
WORDSNET-19014Issue with inserting RTF document in text columnsBug
WORDSNET-19044Aspose.Words HTML generation failed due to line drawingBug
WORDSNET-19036The document gets corrupted after saving the DOCX fileBug
WORDSNET-17924InvalidOperationException while resaving to PDFBug
WORDSNET-19003The transparency and size of TextBox error after DOCX to ODTBug
WORDSNET-18953Issues with particular font types after EMF to PDF conversionBug
WORDSNET-18955Position of list number is changed after rendering Image to PDFBug
WORDSNET-18732DOCX to HTMLFixed conversion fails in DOCKER containerBug
WORDSNET-18919System.ArgumentException is thrown while saving DOCX to PDFBug
WORDSNET-18963Content missing in rendered PDFBug
WORDSNET-18934Fix rendering of OfficeMath/EQ Fields/Ruby textBug
WORDSNET-18652Incorrect rtl text wrapping on conversion to PDFBug
WORDSNET-18972Check the first part of suspicious code found by PVS studioBug
WORDSNET-18660Tables are overlapped after conversion from DOC to PDFBug
WORDSNET-18854Header text is changed after performing mail merge and calling Unlink methodBug
WORDSNET-18971Check the second part of suspicious code found by PVS studioBug
WORDSNET-18867Document.Compare generates revisions for same documentsBug
WORDSNET-19063Aspose.Words.FileCorruptedException occurs upon loading a DOCXBug
WORDSNET-1906224bppRgb image is screwed up in .NET coreBug
WORDSNET-18886Value cannot be null exception occurs - DOCX to PDFBug
WORDSNET-19072Texture background is black instead of whiteBug
WORDSNET-19075Image is resized after conversion with ISO29500_2008_Transitional ComplianceBug
WORDSNET-17260Shape’s text is lost after conversion from DOCX to PDFBug
WORDSNET-17449Document.RemoveAllChildren does not remove all nodesBug
WORDSNET-15429Nested tables rendering issueBug
WORDSNET-18397A line shifts in PDF outputBug
WORDSNET-17182Content position is changed in output PDFBug
WORDSNET-18478Merge.Execute throws System.NullReferenceExceptionBug
WORDSNET-10826Saving HTML to PDF takes long timeBug
WORDSNET-14198When Word document is converted to PDF, Japanese characters are moved to the next rowBug
WORDSNET-7478Loading Aspose assemblies is slow on terminal serverBug
WORDSNET-7545System.OutOfMemoryException exception while getting Document.PageCountBug

Public API and Backward Incompatible Changes

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

Simplified working with XML, JSON, and CSV data sources for LINQ Reporting Engine

Issue: WORDSNET-18722

The following sections of the engine’s documentation were updated/added to describe the changes:

“Building Reports” “Accessing XML Data” “Accessing JSON Data” “Accessing CSV Data”

WORDSNET-12655 - Implemented ability to create repeating section structured document tags

Now it is possible to create structured document tag nodes of the repeating section and repeating section item types. The new item has also been added into the SdtType enumeration type:

public enum SdtType
{

    /// <summary>
    /// The SDT represents repeating section item.
    /// </summary>
    /// <remarks>
    /// This is MS-specific feature available since Office 2013 and not supported by the ISO/IEC 29500 OOXML standard.
    /// </remarks>
    RepeatingSectionItem,

}

Use case to create a table repeating section mapped to a custom XML part:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
CustomXmlPart xmlPart = doc.CustomXmlParts.Add("Books",
    "<books><book><title>Everyday Italian</title><author>Giada De Laurentiis</author></book>" +
    "<book><title>Harry Potter</title><author>J K. Rowling</author></book>" +
    "<book><title>Learning XML</title><author>Erik T. Ray</author></book></books>");
Table table = builder.StartTable();
builder.InsertCell();
builder.Write("Title");
builder.InsertCell();
builder.Write("Author");
builder.EndRow();
builder.EndTable();
StructuredDocumentTag repeatingSectionSdt =
    new StructuredDocumentTag(doc, SdtType.RepeatingSection, MarkupLevel.Row);
repeatingSectionSdt.XmlMapping.SetMapping(xmlPart, "/books[1]/book", "");
table.AppendChild(repeatingSectionSdt);
StructuredDocumentTag repeatingSectionItemSdt =
    new StructuredDocumentTag(doc, SdtType.RepeatingSectionItem, MarkupLevel.Row);
repeatingSectionSdt.AppendChild(repeatingSectionItemSdt);
Row row = new Row(doc);
repeatingSectionItemSdt.AppendChild(row);
StructuredDocumentTag titleSdt =
    new StructuredDocumentTag(doc, SdtType.PlainText, MarkupLevel.Cell);
titleSdt.XmlMapping.SetMapping(xmlPart, "/books[1]/book[1]/title[1]", "");
row.AppendChild(titleSdt);
StructuredDocumentTag authorSdt =
    new StructuredDocumentTag(doc, SdtType.PlainText, MarkupLevel.Cell);
authorSdt.XmlMapping.SetMapping(xmlPart, "/books[1]/book[1]/author[1]", "");
row.AppendChild(authorSdt);
doc.Save(dir + "Document.docx");

WORDSNET-17449 - Implemented SavePictureBullet option for Word 97, which cannot work correctly with PictureBullet data

A new public option has been added to the DocSaveOptions class:

/// <summary>
/// When <c>false</c>, PictureBullet data is not saved to output document.
/// Default value is <b>true</b>.
/// </summary>
/// <remarks>
/// <para>This option is provided for Word 97, which cannot work correctly with PictureBullet data.
/// To remove PictureBullet data, set the option to "false".</para>
/// </remarks>
public bool SavePictureBullet

Use Case. Explains how to remove PictureBullet data from the saving DOC-file:

Document doc = new Document("in.doc");
DocSaveOptions so = (DocSaveOptions)SaveOptions.CreateSaveOptions(SaveFormat.Doc);
so.SavePictureBullet = false;
doc.Save("out.doc", so);

WORDSNET-18210 - Incorrect number formatting in PDF

New elements added to public enumeration Aspose.Words.Shaping.FontFeature.

Currently, these font features are processed and correctly provided to the external shapers.

/// <summary>
/// Replaces figure glyphs set on uniform (tabular) widths with corresponding glyphs set on glyph-specific (proportional) widths.
/// https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-pnum
/// Equivalent OpenType tag: 'pnum'
/// </summary>
ProportionalFigures,
/// <summary>
/// Replaces figure glyphs set on proportional widths with corresponding glyphs set on uniform (tabular) widths.
/// Tabular widths will generally be the default, but this cannot be safely assumed.
/// Of course this feature would not be present in monospaced designs.
/// https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-tnum
/// Equivalent OpenType tag: 'tnum'
/// </summary>
TabularFigures,
/// <summary>
/// This feature changes selected non-lining figures to lining figures.
/// https://docs.microsoft.com/en-us/typography/opentype/spec/features_ko#lnum
/// Equivalent OpenType tag: 'lnum'
/// </summary>
LiningFigures,
/// <summary>
/// This feature changes selected figures from the default or lining style to oldstyle form.
/// https://docs.microsoft.com/en-us/typography/opentype/spec/features_ko#onum
/// Equivalent OpenType tag: 'onum'
/// </summary>
OldstyleFigures

WORDSNET-18369 - Remove License.IsLicensed property

The License.IsLicensed obsolete property has been removed in order to increase anti-hacking resistance. Moreover, this property was useless because of the License.SetLicense(…) throws an exception in case of a wrong license key.

WORDSNET-18697 - Provide API to write and modify VBA macros

A new public setter has been added to the VbaModule.SourceCode property:

/// <summary>
/// Gets or sets VBA project module source code.
/// </summary>
public string SourceCode

Use Case. Explains how to modify macro source code:

Document doc = new Document(@"test.docm");
VbaProject project = doc.VbaProject;
const string newSourceCode = "Test change source code";

// Choose a module, and set a new source code.
project.Modules[0].SourceCode = newSourceCode;

A new public method has been added: CustomDocumentProperties.AddLinkToContent(string, string)

/// <summary>
/// Creates a new linked to content custom document property.
/// </summary>
/// <param name="name">The name of the property.</param>
/// <param name="linkSource">The source of the property.</param>
/// <returns>The newly created property object or null when the linkSource is invalid.</returns>
public DocumentProperty AddLinkToContent(string name, string linkSource)

A new public properties has been added: DocumentProperty.LinkSource, DocumentProperty.IsLinkToContent

/// <summary>
/// Gets the source of a linked custom document property.
/// </summary>
public string LinkSource
/// <summary>
/// Shows whether this property is linked to content or not.
/// </summary>
public bool IsLinkToContent
Document doc = new Document(@"test.docx");

// Retrieve a list of all custom document properties from the file.
CustomDocumentProperties customProperties = doc.CustomDocumentProperties;

// Add linked to content property.
DocumentProperty customProperty = customProperties.AddLinkToContent("PropertyName", "BookmarkName");

// Also, accessing the custom document property can be performed by using the property name.
customProperty = customProperties["PropertyName"];

// Check whether the property is linked to content.
bool isLinkedToContent = customProperty.IsLinkToContent;

// Get the source of the property.
string source = customProperty.LinkSource;

// Get the value of the property.
string value = customProperty.Value;