Changed Importing Behavior of Lists, and Improved Removing unused Resources from Document in Aspose.Words for Java 17.7

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

We have released new version of Aspose.Words for Java, 17.7. It includes new features, enhancements and fixes of Java platform along with auto porting of its corresponding .NET version functionality i.e. Aspose.Words for .NET 17.7. Some of the new improvements are to display document title in window title bar of PDF document, removing unused resources from document and improved logic of lists import in document joining/appending. Please check the detailed release notes of this version to get an idea about the new features/enhancements and fixes made in this release.

Furthermore, if you are planning to upgrade the API from any previous version, we strongly recommend you to check the Public API Changes section of current release and other intermediate releases from release notes folder, to know what has been changed since your current revision of the API.

The following sections describe some details regarding these newly added features/enhancements.

Display document title in Window title bar of PDF

We have introduced a new feature in Aspose.Words for .NET 17.7 to control behavior of how document title is presented in output PDF document. A new property DisplayDocTitle is included in PdfSaveOptions class. This property is used to specify whether windows title bar should display the document title, taken from the Title entry of the document information dictionary.

// Load the document.
Document doc = new Document("input.docx");

PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setDisplayDocTitle(true);

// Save the document in PDF format.
doc.save("output.Pdf",saveOptions)

Improved Removing of unused Resources from Document

We have added a new cleanup method in Document class in Aspose.Words for .NET 17.7 to remove unused styles and lists from the document. Now you can remove only lists or styles or both from document. Please note Document.RemoveUnusedResources method is now obsolete.


// Open the document.
Document doc = new Document("Input.doc");

CleanupOptions cleanupoptions = new CleanupOptions();
cleanupoptions.setUnusedLists(false);
cleanupoptions.setUnusedStyles(true);

// cleans unused styles and lists from the document depending on given CleanupOptions.
doc.cleanup(cleanupoptions);
doc.save("Output.docx");

Improved behavior of List import in Document Joining/Appending

We have improved the List import behavior in this release. Previously, list definitions were copied with a new identifier while importing. Now Aspose.Words reuses identical list definitions in the destination. Equality of list definitions in the source and destination is determined by their identifiers. Also Aspose.Words preserves list definition identifiers from the source when equal list definition cannot be found in the destination. This is how MS Word behaves.

Change in AspectRatioLock default value of Image

We have changed Shape.AspectRatioLocked default value of ShapeType.Image to mimic MS Word behavior. Now AspectRatioLocked default value for ShapeType.Image is “true” and false for other types of Shapes.


// Open the document.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape shape = builder.insertImage("Test.png");
shape.setAspectRatioLocked(false);

doc.save("output.doc");

Other Improvements

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

  • Performance of saving to PDF is improved.
  • The proper algorithm for rendering of shapes with automatic size textboxes (i.e. closest to MS Word output) implemented.
  • The rendered PDF documents can now show the document title in the title bar of the viewer. This is controlled by “PdfSaveOptions.DisplayDocTitle” property.
  • Improved font rendering in PDF documents for Adobe Illustrator limitations.
  • Improved rendering of fonts with simulated bold style.
  • Vertical text rendering in DrawingML textboxes improved.
  • Problem with rendering of numbers on horizontal axis in DrawingML Charts fixed.
  • Implemented support for “Wrap trailing spaces to next line” option.
  • Implemented support for footnote continuation notices.
  • Improved text wrapping logic for “2013 and later” documents.
  • Improved non-breaking space width calculation.
  • Improved Asian text justification logic.

Aspose.Words for Java Resources

The following resources will help you work with Aspose.Words for Java:


To keep up with our news, you can follow us on Twitter or follow our Facebook page.

Leave a Reply