GroupDocs.Editor for Java 20.8 Release Notes

Major Features

Also this release contains:

  • Full support of Presentation format family, that includes PPT, PPTX, PPTM, POT, PPS, and more Presentation formats. Presentation support came with a set of new load/edit/save option classes, formats, its support was also added to the GetDocumentInfo method.
  • Expanded features in the Format-representing structs, which includes parsing from file extension and enumerating over all formats within given format family.
  • New static factory in EditableDocument class, that allows to open EditableDocument from inner content of HTML->BODY element and corresponding resource folder.

New GetDocumentInfo method

Along with new API, GroupDocs.Editor contains new GetDocumentInfo method, that allows to get metainfo about the input document without editing it:

  • Family format and exact document format.
  • Encryption flag.
  • Number of pages/tabs.
  • Size.

New text save options

All previous versions of GroupDocs.Editor don’t contain specialized options, responsible for saving edited document in plain text format — in order to do this user should use WordProcessing save options, which don’t allow to configure parameters while saving into text. This 20.8 version of GroupDocs.Editor contains new TextSaveOptions class, that is responsible especially for saving edited document to the plain text format. TextSaveOptions class contains the next new settings:

  • Ability to specify whether to add bi-directional marks before each BiDi run when exporting in plain text format.
  • Ability to specify whether the program should attempt to preserve layout of tables when saving in the plain text format.

Bugs

  • When performing full roundtrip without editing in Presentation document in trial mode, an exception is thrown.
  • In some cases there are undisposed resources in the EditableDocument class even after calling the “Dispose()” method.
  • Bindings for Aspose components are missed in 19.10.
  • Fixed bug with a document, that was incorrectly rendered to HTML in paginal mode and then incorrectly converted back to WordProcessing.

Improvements

  • Improved XML-comments for the GroupDocs.Editor.Editor main class.
  • Better support of opening HTML document from inner-BODY markup
  • Added support of BUTTON HTML element
  • Added support of MACROBUTTON field in WordProcessing documents
  • Added support of STRIKE HTML element
  • New feature, that allows to set custom class name for all form-fields with corresponding public options.
  • New option, which allows to specify a text direction for the input plain text document (TXT) before its editing.
  • Added support of PDF 1.7 standard while saving edited document to PDF.

All these improvements are “internal”, they do not affect public API.

Other features

Lot of minor and major bug fixes and improvements over all code base.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
EDITORNET-1286New public APIFeature
EDITORNET-1287Implement GetDocumentInfo methodFeature
EDITORNET-1288New TextSaveOptionsFeature
EDITORNET-1317Add Presentations editing supportFeature
EDITORNET-1318Add Presentation support into GetDocumentInfo methodFeature
EDITORNET-1308Setup binding redirects for third-party componentsFeature
EDITORNET-1409Add .NET Standard 2.0 supportFeature
EDITORNET-1448Implement extension parsing for all formatsFeature
EDITORNET-1449Implement possibility to enumerate over all formatsFeature
EDITORNET-1422Implement parsing of inner content from HTML BODY elementFeature
EDITORNET-1423Implement resource fetching and parsing for HTML BODY contentFeature
EDITORNET-1467Add ability to set custom class name for all form-fields with corresponding public optionsFeature
EDITORNET-1512Add support of text direction in input plain text documentFeature
EDITORNET-1320Exception during roundtrip in Presentation module in trial modeBug
EDITORNET-1353Undisposed resources in EditableDocument classBug
EDITORNET-1354Missing bindings for Aspose componentsBug
EDITORNET-1356Error While Getting DOCX document HTMLBug
EDITORNET-1374Fix bug with missing binding for Aspose componentsBug
EDITORNET-1419Bug with duplicated images in EditableDocumentBug
EDITORNET-1418Internal error in Bookmark processorBug
EDITORNET-1414Fix bug with locked HTML resourcesBug
EDITORNET-1380Exception while getting DOCX document HTMLBug
EDITORNET-1430Additional style sheet is not saved in embedded version in WordProcessing paginal modeBug
EDITORNET-1452Bug in HTML attribute parsingBug
EDITORNET-1457Exception while opening DOCX with specific fieldBug
EDITORNET-1458Exception in .NET Standard version of GD.EditorBug
EDITORNET-1450MSI package signature is not applied during release buildBug
EDITORNET-1465Fix bug with locked HTML resourcesBug
EDITORNET-1504WordProcessing document is incorrectly rendered in paginal modeBug
EDITORNET-1355Improve XML-comments in the Editor classImprovement
EDITORNET-1411Updates and improvements in XML comments, documentation and NUSPEC descriptionImprovement
EDITORNET-1410Generate new ProjectGuid and UpgradeCode for MSI packageImprovement
EDITORNET-1420Improve formats-representing typesImprovement
EDITORNET-1421Implement better support of truncated markupImprovement
EDITORNET-1454Improve opening EditableDocument from inner-body markup by supporting a root BODY elementImprovement
EDITORNET-1460Add support of BUTTON elementImprovement
EDITORNET-1461Implement support of MACROBUTTON fieldImprovement
EDITORNET-1464Fix bug and add complete support of obsolete STRIKE HTML elementImprovement
EDITORNET-1505Add support of PDf 1.7Improvement

Public API and Backward Incompatible Changes

New getDocumentInfo method

The new Editor class, which supersedes deprecated EditorHandler, contains a new instance method getDocumentInfo with the next signature:

public IDocumentInfo getDocumentInfo(String password)

Once the document was loaded into the Editor class, this method can be called to obtain metainfo about the loaded document without actual opening it for editing.

New TextSaveOptions class

The Options namespace now contains a new TextSaveOptions class, that is responsible for saving EditableDocument with edited document content to the plain text format. It has the next signature:

/// <summary>
/// Allows to specify custom options for generating and saving plain text (TXT) documents
/// </summary>
public final class TextSaveOptions implements ISaveOptions {
    /**
     * Character encoding of the text document, which will be applied for its saving
     */
    public java.nio.charset.Charset getEncoding()

    /**
     * Character encoding of the text document, which will be applied for its saving
     */
    public void setEncoding(java.nio.charset.Charset value)

    /**
     * Specifies whether to add bi-directional marks before each BiDi run when
     * exporting in plain text format
     */
    public boolean getAddBidiMarks()

    /**
     * Specifies whether to add bi-directional marks before each BiDi run when
     * exporting in plain text format
     */
    public void setAddBidiMarks(boolean)

    /**
     * Specifies whether the program should attempt to preserve layout of tables
     * when saving in the plain text format. The default value is false.
     */
    public boolean getPreserveTableLayout()

    /**
     * Specifies whether the program should attempt to preserve layout of tables
     * when saving in the plain text format. The default value is false.
     */
    public void setPreserveTableLayout(boolean )
}

Presentation module - ability to load, open for editing, edit and save Presentation documents. This feature is represented in public API by the next new public types.

Type nameResponsibility
PresentationLoadOptionsAllows to specify custom options for loading documents of all supportable Presentation formats like PPT(X), PPTM, PPS(X) etc.
PresentationEditOptionsAllows to specify custom options for editing documents of all supportable Presentation (PowerPoint-compatible) formats
PresentationSaveOptionsAllows to specify custom options for generating and saving Presentation (PowerPoint-compatible) documents
PresentationDocumentInfoRepresents metadata of one Presentation document
PresentationFormatsEncapsulates all Presentation formats

Represented in public API by the next new public types and methods.

Type nameMember nameResponsibility
WordProcessingFormats.AllEnumerableN/AInternal class, that enables enumeration over all formats within WordProcessingFormats
SpreadsheetFormats.AllEnumerableN/AInternal class, that enables enumeration over all formats within SpreadsheetFormats
PresentationFormats.AllEnumerableN/AInternal class, that enables enumeration over all formats within PresentationFormats
TextualFormats.AllEnumerableN/AInternal class, that enables enumeration over all formats within TextualFormats
WordProcessingFormatsAllStatic readonly field, that returns an WordProcessingFormats.AllEnumerable instance
SpreadsheetFormatsAllStatic readonly field, that returns an SpreadsheetFormats .AllEnumerable instance
PresentationFormatsAllStatic readonly field, that returns an PresentationFormats .AllEnumerable instance
TextualFormatsAllStatic readonly field, that returns an TextualFormats .AllEnumerable instance
WordProcessingFormatsFromExtensionStatic method, that parses a string and returns appropriate WordProcessing format
SpreadsheetFormatsFromExtensionStatic method, that parses a string and returns appropriate Spreadsheet format
PresentationFormatsFromExtensionStatic method, that parses a string and returns appropriate Presentation format
TextualFormatsFromExtensionStatic method, that parses a string and returns appropriate Textual format

Representing by only one new method in the EditableDocument class:

/// <summary>
/// Static factory, that creates an instance of EditableDocument from a specified HTML markup,
/// that doesn't contain an HTML header, but only inner markup of HTML BODY element, and from resources, located in the folder, specified by the full path
/// </summary>
/// <param name="htmlBodyContent">String, that contains raw HTML markup, which is located inside HTML->BODY element (without BODY itself),
/// that should be parsed. Cannot be NULL, empty or invalid.</param>
/// <param name="resourceFolderPath">Mandatory path to the folder with resources. All stylesheets, which are located in this folder, will be used.</param>
/// <returns>New non-null instance of EditableDocument</returns>
public static EditableDocument fromBodyMarkupAndResourceFolder(String htmlBodyContent, String resourceFolderPath)

New property in WordProcessingEditOptions

Implementing a EDITORNET-1467 ticket has a result in form of a new public property in the GroupDocs.Editor.Options.WordProcessingEditOptions class:

public String getInputControlsClassName() 
public void setInputControlsClassName(String)

You can find more info about this feature in the article “Adding class name to input controls”.

New enum and property in TextEditOptions

Implementing a EDITORNET-1512 ticket caused a new enum GroupDocs.Editor.Options.TextDirection:

public final class TextDirection extends Enum {

    private TextDirection() {
    }
    /**
     * Left-to-Right direction, usual text, default value.
     */
    public static final int LeftToRight = 0;

    /**
     * Right-to-Left direction
     */
    public static final int RightToLeft = 1;

    /**
     * Auto-detect direction. When this option is selected and text contains
     * characters belonging to RTL scripts, the document direction will be set
     * automatically to RTL.
     */
    public static final int Auto = 2;    
}

This enum is now used in the GroupDocs.Editor.Options.TextEditOptions class:

public int getDirection()
public void setDirection(int)

New enum value in PdfCompliance enum

The EDITORNET-1505 improvement is represented by a new value in the GroupDocs.Editor.Options.PdfCompliance:

public final class PdfCompliance extends Enum {
    ...
    public static final int Pdf17 = 1;
    ...
}