Browse our Products

Aspose.Words for Java 20.7 Release Notes

Major Features

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

  • Explicitly set encoding Charset and BOM via TxtSaveOptions.setEncoding(Charset)
  • Added new nodes to handle multi-section structured document tags.
  • Added a new public property MailMerge.RetainFirstSectionStart.
  • RevisionOptions class is extended with new properties.
  • Improved performance of SmartArt cold rendering.

Full List of Issues Covering all Changes in this Release

WORDSJAVA-2327User option to explicitly set encoding Charset and BOM via TxtSaveOptions.setEncoding(Charset)New Feature
WORDSJAVA-2416Update 3rd party software versions, license agreements, etc.New Feature
WORDSNET-9500International characters (Tamil) are not converted correctly from MHTML to PDFNew Feature
WORDSNET-7150SDT controls are getting lost during open/saveNew Feature
WORDSNET-9501International characters (Telugu) are not converted correctly from MHTML to PDFNew Feature
WORDSNET-5713StructuredDocumentTag containing Section Breaks is lost upon loadingNew Feature
WORDSNET-20589PDF to DOCX - footnotesNew Feature
WORDSNET-20480Provide property to enable “strict MS Word behavioral compliance” during mail mergeNew Feature
WORDSNET-9908Preserve RichText Content Control with Section BreakNew Feature
WORDSNET-6773Row contents larger than page size truncate while setting AllowBreakAcrossPages=FalseEnhancement
WORDSNET-20415Maintaining rev bars when converting a DOCX to PDF with track changesEnhancement
WORDSNET-18609A line moves to the previous Page in PDFEnhancement
WORDSJAVA-2260NullPointerException while converting email to PDFBug
WORDSJAVA-2308Random characters added to result in XMLBug
WORDSJAVA-2394readRegistryStringValues() throws EXCEPTION_ACCESS_VIOLATION on JDK11Bug
WORDSJAVA-2404AbstractMethodError while using HarfBuzz TextShaper.Bug
WORDSNET-6721Doc to Pdf conversion issue with a Persian fontBug
WORDSNET-13519Aspose.Words does not import StructuredDocumentTag containing section breakBug
WORDSNET-14750An extra page is added after conversion from DOCX to PDFBug
WORDSNET-15659Some structured document tags have removed after processing with Aspose.WordsBug
WORDSNET-17811Urdu text is lost after conversion from DOC to PDFBug
WORDSNET-19624After conversion to PDF, a part of a table content is wrappingBug
WORDSNET-20478TextBoxes contents appear to align Justified in PDFBug
WORDSNET-19097Content is pushed down to the next page in output PDFBug
WORDSNET-20655System.Collections.Generic.KeyNotFoundException while loading the PDFBug
WORDSNET-20624StructuredDocumentTag.Checked does not workBug
WORDSNET-20659Compare method throws an exception - Unable to cast object of type ‘Aspose.Words.Run’ to type ‘Aspose.Words.ParagraphBug
WORDSNET-11924Thai diacritics (accent) are overlayed in PDFBug
WORDSNET-19685Table’s width issue when AutoFit is FIXED_COLUMN_WIDTHSBug
WORDSNET-20676DOCX to PDF conversion issue with Chart renderingBug
WORDSNET-13908IranNastaliq font issue in PDFBug
WORDSNET-20215Re-work DmlChartPlanePie.CalculateOffsets()Bug
WORDSNET-20484Refactor ZipStream in order to make it more auto portable to javaBug
WORDSNET-20483Conversion to PDF chart issuesBug
WORDSNET-15351Thai Font Not Displayed Correctly When Saved To PDFBug
WORDSNET-20360Table height increased in the rendered documentBug
WORDSNET-20359Diagram of Heart pushed to the next page in the rendered documentBug
WORDSNET-16327Content Control is lost after re-saving DOCXBug
WORDSNET-19017Content control lost during open/save a DOCXBug
WORDSNET-17291Content Control disappear when saving a DOCXBug
WORDSNET-20672IndexOutOfRangeException when convert ODT to TXTBug
WORDSNET-20487DOCX to PDF conversion issue with revision renderingBug
WORDSNET-20504Incorrect line wrapping for a line with a tabulationBug
WORDSNET-20136Aspose Word 20.3 cannot run on a real device (Xamarin iOS, Android)Bug
WORDSNET-13601Aspose.Words does not import content controls containing TableBug
WORDSNET-20508Character unrecognizedBug
WORDSNET-20689LINQ Reporting Engine - Chart legend entries removed in a template appear in a result documentBug
WORDSNET-19127Table height differsBug
WORDSNET-19972Document.Compare generates incorrect revisions for bullet listsBug
WORDSNET-20235Images hide or cut some parts of Table Borders in PDFBug
WORDSNET-20645InvalidOperationException while loading the PDFBug
WORDSNET-19723On Save, Aspose is removing a Content Control from the DOCX fileBug
WORDSNET-19724Provide API to modify Changed Lines to None, Left, Right or Outside BorderBug
WORDSNET-20518System.InvalidOperationException is thrown while saving RTF to HTMLBug
WORDSNET-20520System.InvalidOperationException is thrown while saving RTF to HTMLBug
WORDSNET-20521The mismatched numbering of labels in PDFBug
WORDSNET-19173Content Control gets lost during open/save a DOCXBug
WORDSNET-19177Border of PieChart pieces is changed in output PNGBug
WORDSNET-19164SmartArt to PNG conversion issue with fill colorBug
WORDSNET-18954Watermarks are black and doubled when converting EMF to PDFBug
WORDSNET-20106Problem in ODT format with field Fill-In containing <text:line-break> tag or carriage return character.Bug
WORDSNET-20528Conversion from RTF to PDF - Paragraph borders not imported correctlyBug
WORDSNET-20117Table of Contents does use the wrong styleBug
WORDSNET-20108Language of SDTs is changed from Hebrew to Arabic after DOCX>HTML>DOCXBug
WORDSNET-20334Incorrect export of bold italic text into markdownBug
WORDSNET-13025IranNastaliq font is not rendering correctly in PDFBug
WORDSNET-20424SmartArt object loses 3D effect during open and saves a DOCXBug
WORDSNET-20441Deep nesting depth of an HTML document may cause StackOverflow exception.Bug
WORDSNET-20447Aspose.Words 20.5: Call to UpdatePageLayout on specific document raises NullReferenceExceptionBug
WORDSNET-20452Japanese text does not have a vertical direction in PDFBug
WORDSNET-20457Incorrect height of the script math elementBug
WORDSNET-20124Content is missing after conversion to PDFBug
WORDSNET-17648DOCX to PDF/JPEG conversion issue with Hindi font renderingBug
WORDSNET-20461The file is corrupted after the resaveBug
WORDSNET-4677Lists using the same linked style should not continue on together when appending documentsBug
WORDSNET-20562Aspose.Words.FileCorruptedException occurs upon loading a DOCBug
WORDSNET-20336Styles of a different Language appear in Saved DOCBug
WORDSNET-20570System.NullReferenceException is thrown while saving DOCX to PDFBug
WORDSNET-20574Aspose.Words.FileCorruptedException is thrown while importing DOCBug
WORDSNET-20561Aspose.Words.FileCorruptedException occurs upon loading PDF files using StreamsBug
WORDSNET-20498How to merge and obfuscate Aspose.Words with another external codeBug
WORDSNET-19171Gradient fill color is lost after conversion from Chart to PNGBug
WORDSNET-20609The hyperlink is truncated after XML to DOCX conversionBug
WORDSNET-20618Shape fill is lost during 3D rotationBug
WORDSNET-20620Incorrect position of the Glow effect of SVG shape after applying 3D rotationBug
WORDSNET-20619Incorrect position of the SVG shape after applying 3D rotationBug
WORDSNET-20632Signed DLL’s on the Nuget serverBug
WORDSNET-20374INDEX entries have incorrect Font StyleBug
WORDSNET-20640Incorrect tables layout when converting to DOCBug
WORDSNET-20646System.ObjectDisposedException is thrown when PDF is loaded from a streamBug
WORDSNET-19888Aspose.Words.FileCorruptedException is thrown while loading HTMLBug
WORDSNET-16933Content of text boxes missing in PDFBug
WORDSNET-20529Image is rotated after DOCX to HtmlFixed conversionBug
WORDSNET-16771DOCX to PDF conversion issue with image positionBug
WORDSNET-19403After conversion to PDF, an image is moved a few inches downBug
WORDSNET-20533Multi-Threaded Errors with mail mergeBug
WORDSNET-16907Incorrect line breaks push some content to the next page in PDFBug

Public API and Backward Incompatible Changes

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

Added a new public property MailMerge.RetainFirstSectionStart

Related issue: WORDSNET-20480

Added a new public property MailMerge.RetainFirstSectionStart:

/ <summary>
 /// Gets or sets a value indicating whether the <see cref="PageSetup.SectionStart"/> of the first document section and its copies for subsequent data source rows
 /// are retained during mail merge or updated according to MS Word behaviour.
 /// </summary>
 /// <remarks>
 /// The default value is <b>true</b>.
 /// </remarks>
 public bool RetainFirstSectionStart { get; set; }

Use Case:

cument document = new Document(path);
 document.MailMerge.RetainFirstSectionStart = false;

Added a new value to public enumeration WarningSource

Related issue: WORDSNET-20334

A new value is added to the public enumeration WarningSource:


/// <summary>
 /// Module that reads/writes Markdown files.
 /// </summary>

Use Case. Explains how to use WarningSource.Markdown enumeration value:

/// <summary>
 Document doc = TestUtil.Open("input.docx");
 WarningInfoCollection warnings = new WarningInfoCollection();
 doc.WarningCallback = warnings;
 foreach (WarningInfo warningInfo in warnings)
    if (warningInfo.Source == WarningSource.Markdown)

Added public property MeasurementUnit in RevisionOptions

Related issue: WORDSNET-20487

Added a new public property RevisionOptions.MeasurementUnit:

/// <summary>
 /// Allows to specify the measurement unit for revision comments.
 /// Default value for this property is <see cref="MeasurementUnits.Centimeters"/>
 /// </summary>
 public MeasurementUnits MeasurementUnit

Also, a new public enumeration has been added:

/// <summary>
 /// Specifies a the unit of measurement.
 /// </summary>
 public enum MeasurementUnits
    /// <summary>
    /// Inches.
    /// </summary>
    Inches = 0,
    /// <summary>
    /// Centimeters.
    /// </summary>
    Centimeters = 1,
    /// <summary>
    /// Millimeters.
    /// </summary>
    Millimeters = 2,
    /// <summary>
    /// Points.
    /// </summary>
    Points = 3,
    /// <summary>
    /// Picas (commonly used in traditional typewriter font spacing).
    /// </summary>
    Picas = 4

Use Case:

Document doc = new Document(myDir +"Input.docx");
 doc.LayoutOptions.RevisionOptions.MeasurementUnit = MeasurementUnits.Inches;
 doc.LayoutOptions.RevisionOptions.ShowInBalloons = ShowInBalloons.FormatAndDelete;
 doc.LayoutOptions.ShowComments = true;
 doc.Save(myDir +"Output.pdf");

Added public property RevisionBarsPosition in RevisionOptions

Related issue: WORDSNET-20415, WORDSNET-19724

Added a new public property RevisionOptions.RevisionBarsPosition:

/// <summary>
 /// Gets or sets rendering position of revision bars.
 /// Default value is <see cref="HorizontalAlignment.Outside"/>.
 /// </summary>
 /// <remarks>Values of <see cref="HorizontalAlignment.Center"/> and <see cref="HorizontalAlignment.Inside"/>
 /// are not allowed and will cause <see cref="ArgumentOutOfRangeException"/>.</remarks>

Use Case:

/// <summary>
 Document doc = new Document(myDir +"Input.docx");
 //Renders revision bars on the right side of a page.
 doc.LayoutOptions.RevisionOptions.RevisionBarsPosition = HorizontalAlignment.Right;
 doc.Save(myDir +"Output.pdf");

Added two new nodes to handle multi-section Structured Document Tags

Related issue: WORDSNET-15659

Added new nodes to handle multi-section structured document tags.

The following classes have been added:

// Specifies the PDF standards compliance level. 
 public class StructuredDocumentTagRangeStart : Node
    /// <summary>
    /// Gets the type of this node.
    /// </summary>
    public NodeType NodeType { get; }
    /// <summary>
    /// Gets the level at which this <b>SDT range start</b> occurs in the document tree.
    /// </summary>
    public MarkupLevel Level { get; }
    /// <summary>
    /// Gets type of this <b>Structured document tag</b>.
    /// </summary>
    public SdtType SdtType { get; }
    /// <summary>
    /// <para>Specifies a unique read-only persistent numerical Id for this <b>SDT</b>.</para>
    /// </summary>
    public int Id { get; }
    /// <summary>
    /// When set to true, this property will prohibit a user from deleting this <b>SDT</b>.
    /// </summary>
    public bool LockContentControl { get; }
    /// <summary>
    /// When set to true, this property will prohibit a user from editing the contents of this <b>SDT</b>.
    /// </summary>
    public bool LockContents { get; }
    /// <summary>
    /// Specifies whether the content of this <b>SDT</b> shall be interpreted to contain placeholder text
    /// (as opposed to regular text contents within the SDT).
    /// </summary>
    public bool IsShowingPlaceholderText { get; }
    /// <summary>
    /// Specifies a tag associated with the current SDT node.
    /// </summary>
    public string Tag { get; }
    /// <summary>
    /// Specifies the friendly name associated with this <b>SDT</b>.
    /// </summary>
    public string Title { get; }
    /// <summary>
    /// Specifies end of range if the StructuredDocumentTag is a ranged structured document tag.
    /// </summary>
    public StructuredDocumentTagRangeEnd RangeEnd { get; }
 public class StructuredDocumentTagRangeEnd : Node
    /// <summary>
    /// Gets the type of this node.
    /// </summary>
    public NodeType NodeType { get; }
    /// <summary>
    /// Specifies a unique read-only persistent numerical Id for this structured document tag node.
    /// Corresponding range start node has the same Id.
    /// </summary>
    public int Id { get; }

NOTE: These nodes can be a child of NodeType.Body node only.

NOTE: So far all properties of these nodes are read-only and nodes itself cannot be created by customers.

Use Case:

cument doc = new Document("document containing multi-section SDT");List<StructuredDocumentTagRangeStart> tags =
                doc.GetChildNodes(NodeType.StructuredDocumentTagRangeStart, true).ToList<StructuredDocumentTagRangeStart>();
  foreach(StructuredDocumentTagRangeStart tag in tags)