Aspose.Words for Java 20.2 Release Notes

Major Features

  • Performance and memory improvements due to NodeCollectionEnumerator algorithm optimization and loading of Blank Document optimization.
  • IFieldUpdateCultureProvider is accessible from public API now.
  • FieldOptions.setPreProcessCulture() is accessible from public API now.
  • Added support of additional Java Charsets (Charsets that not exist in .NET).
  • Background shape texture image is now rendered the same way as in print layout of MS Word with a 100% scale.
  • Supported dynamic insertion of documents and images from Base64-encoded bytes and dynamic checkbox value setting for the LINQ Reporting Engine.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WORDSJAVA-1970Java public API for IFieldUpdateCultureProviderNew Feature
WORDSJAVA-1985Update ms CultureInfo and DateTimeFormatInfo for public API.New Feature
WORDSJAVA-2271Double relation to the same DataTable with LINQ Reporting EngineNew Feature
WORDSNET-19561Support dynamic checkbox value setting using LINQ Reporting EngineNew Feature
WORDSNET-19750Add features to support field formats when FieldMergingArgs.Text is usedNew Feature
WORDSNET-19556Add feature to append VBA from one document to another using Document.AppendDocumentNew Feature
WORDSNET-18694Add feature to export w:colFirst and w:colLast properties of bookmarkStartNew Feature
WORDSNET-19859LINQ Reporting Engine - Support dynamic image insertion from Base64-encoded bytesNew Feature
WORDSNET-19924Integrate Pdf2Word plugin in Aspose.Words for .NET StandardNew Feature
WORDSJAVA-1966FieldUpdateCultureProvider doesn’t work with some Field codes.Bug
WORDSJAVA-2069setPreProcessCulture() and IFieldUpdateCultureProvider uses internal objectsBug
WORDSJAVA-2238Images are not imported from HTML when href contains escaped percent character (%25)Bug
WORDSJAVA-2266java.io.EOFException: End of file reached occurs upon saving DOC with broken null substream to HTML_Fixed formatBug
WORDSJAVA-2268A Chinese character moves to the next line in the rendered documentBug
WORDSJAVA-2270InvalidConstraintException when evaluating a null-conditional operator on missing related DataRowBug
WORDSJAVA-2279Performance degradation observed when updating from 16.7 to 19.12Bug
WORDSJAVA-2282DataRow.getParentRows works incorrectlyBug
WORDSJAVA-2285Some encoding types are not accepted by TxtLoadOptions.setEncodingBug
WORDSJAVA-2296LINQ Reporting Engine with JsonDataSource generates incorrect output for double valuesBug
WORDSNET-19773Horizontal Line not Shown in Rendered DocumentBug
WORDSNET-18592After conversion to PDF, the content is not in the right placeBug
WORDSNET-11069Shape’s strikethrough issuesBug
WORDSNET-18733Chart Diagram rendered incorrectly in PDFBug
WORDSNET-19783System.NullReferenceException is thrown while saving the first page of the document to imageBug
WORDSNET-19800System.NullReferenceException is thrown while saving DOC to PDF/PNGBug
WORDSNET-19244Different table width between DOCX and ODTBug
WORDSNET-19461Gridlines and images are missing when saving into HTML with HtmlFixedSaveOptionsBug
WORDSNET-14251Table’s cells are lost after re-saving ODTBug
WORDSNET-19710Infinite loop during the call of Document.UpdatePageLayoutBug
WORDSNET-19712Footer Banner Repeats Multiple Times on all Pages in PDFBug
WORDSNET-19563Lettered Bullet Points aren’t preserved when converting from ODT to DOCXBug
WORDSNET-19257DOCX to PDF conversion issue with watermark renderingBug
WORDSNET-19900Unable to load shared library ’libSkiaSharp’ or one of its dependenciesBug
WORDSNET-19813System.NullReferenceException occurs upon calling UpdateFields after UpdatePageLayoutBug
WORDSNET-19814System.NullReferenceException occurs upon saving DOCX to PDF after calling UpdatePageLayout methodBug
WORDSNET-19129Document.Compare throws System.ArgumentOutOfRangeExceptionBug
WORDSNET-19600Order of fonts in the Font Substitution Table is incorrectBug
WORDSNET-19819System.NullReferenceException occurs upon calling UpdateFields after UpdatePageLayoutBug
WORDSNET-8967Clipping inline shapes by lineBug
WORDSNET-19227Table and Frame format is changed after saving .DOT as .ODTBug
WORDSNET-19727Footnote elements out of margins when saved to PDFBug
WORDSNET-19734Word to PDF tab alignment not workingBug
WORDSNET-19801Aspose.Words.FileCorruptedException is thrown while loading DOCBug
WORDSNET-19832FileCorruptedException is thrown while loading RTFBug
WORDSNET-19834Content shifted when saved to PDFBug
WORDSNET-19903Incorrect naming of Document.AutomaticallyUpdateSyles paramBug
WORDSNET-19414Inline image rendering orderBug
WORDSNET-19744System.IndexOutOfRangeException occurs upon DOCX to PDF ConversionBug
WORDSNET-19748Table Cell Shading Lost during RTF to PDF ConversionBug
WORDSNET-19749Watermark angle changes during DOCX conversionBug
WORDSNET-19803System.ArgumentOutOfRangeException is thrown while saving document’s pages to PNGBug
WORDSNET-19848LINQ Reporting Engine - ArgumentException is thrown if image expression returns an empty stringBug
WORDSNET-19743System.NullReferenceException occurs upon saving DOCX to PDFBug
WORDSNET-19418Memory is not released upon conversion document with EMFBug
WORDSNET-19399Setting PreserveFormFields to true cancels the effect of UpdateSdtContentBug
WORDSNET-19916Reset StructureDocumentTag content formatting on comparisonBug
WORDSNET-19534Content in RTF is distortedBug
WORDSNET-19533Content in RTF is distortedBug
WORDSNET-19779Data labels are not rendered in PDFBug
WORDSNET-19782DOCX to PDF - hyphenation not sameBug
WORDSNET-19781System.InvalidCastException is thrown while comparing documentsBug
WORDSNET-19785Word to PDF dotted line problemBug
WORDSNET-19789Content pushed down from original position causing blank page at the end in PDFBug
WORDSNET-19795System.ArgumentOutOfRangeException occurs upon invoking Document.PageCountBug
WORDSNET-14708The content position is changed in output PDFBug
WORDSNET-14961Text is incorrectly positioned in RTL paragraphs inside auto-sized shapesBug
WORDSNET-15064DOCX  to PDF conversion issue with paragraph and shape positionBug
WORDSNET-14843DOCX to PDF conversion issue with image’s positionBug
WORDSNET-14826TextBox Shapes moved to next page during rendering to PDFBug
WORDSNET-18880The issue with table position and UpdateTableLayout methodBug

Public API and Backward Incompatible Changes

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

FieldMergingArgsBase.FieldValue made settable

Related issue: WORDSNET-19750

The customer was using the FieldMergingArgs.Text property and wanted the provided value to be formatted according to the format specified in the field being merged. We have made the FieldMergingArgsBase.FieldValue property settable so that instead of setting Text the user can set FieldValue which takes formatting into account instead of simply replacing the field.

/// <summary>
/// Gets or sets the value of the field from the data source.
/// </summary>
/// <remarks>
/// This property contains a value that has just been selected from your data source
/// for this field by the mail merge engine. You can also replace the value by setting the property.
/// </remarks>
public object FieldValue
{
    get { return mFieldValue; }
    set { mFieldValue = value; }
}

Supported dynamic insertion of documents and images from Base64-encoded bytes and dynamic checkbox value setting for LINQ Reporting Engine

Issues: WORDSNET-19859 and WORDSNET-19561

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

Word 2019 version set by default

Ref: WORDSNET-19908

Due to the fact that submissions to the support service regarding different default spacing values for the paragraph have become more frequent, it was decided to change the default version of MS Word. Now, this version is MSWordVersion.Word2019. In most cases, the issue appeared when the customers created documents in WPS Office that do not write default spacing values for the paragraph in a document to be saved. When opening such documents in Aspose.Words, the values actual for MSWord 2007 were substituted because it was the default version before this release.

Now the code:

Document doc = new Document("document.docx");

will be identical to:

LoadOptions lo = new LoadOptions();
lo.MswVersion = MsWordVersion.Word2019;
Document doc = new Document("document.docx", lo);

To achieve the previous behavior, it is necessary to explicitly specify the version:

LoadOptions lo = new LoadOptions();
lo.MswVersion = MsWordVersion.Word2007;
Document doc = new Document("document.docx", lo);