GroupDocs.Assembly for Java 18.10 Release Notes

Major Features

Supported removal of paragraphs becoming empty after template syntax tags are removed or replaced with empty values for templates of Word Processing, Presentation, and Email file formats.

Full List of Features Covering all Changes in this Release

KeySummaryCategory
ASSEMBLYNET-89 Support removal of paragraphs becoming empty after template syntax tags are removed or replaced with empty values for Word Processing documents Feature 
ASSEMBLYNET-91 Support removal of paragraphs becoming empty after template syntax tags are removed or replaced with empty values for Presentation documents Feature 
ASSEMBLYNET-92 Support removal of paragraphs becoming empty after template syntax tags are removed or replaced with empty values for Email documents Feature 

Public API and Backward Incompatible Changes

Support removal of paragraphs becoming empty after template syntax tags are removed or replaced with empty values

The following new member was added to DocumentAssemblyOptions:

Java

**
  * Specifies that the assembler should remove paragraphs becoming empty after template syntax tags are removed or replaced with empty values.
  * At the moment, this option is supported only for templates of Word Processing, Presentation, and Email file formats.
  */
public static final int REMOVE_EMPTY_PARAGRAPHS

When the new option is applied to **DocumentAssembler **options through DocumentAssembler.setOptions(), the engine additionally removes paragraphs becoming empty after template syntax tags are removed or replaced with empty values as shown in the following examples.

Example 1

Template document.

Prefix
<<[""]>>
Suffix

Result document without the new option applied.

Prefix
 
Suffix

Result document with the new option applied.

Prefix
Suffix

Example 2

Template document.

Prefix
<<if [false]>>
Text to be removed
<</if>>
Suffix

Result document without the new option applied.

Prefix
 
Suffix

Result document with the new option applied.

Prefix
Suffix

Example 3

Template document.

Prefix
<<foreach [in persons]>>
<<[Name]>>
<</foreach>>
Suffix

Result document without the new option applied.

Prefix
 
John Doe
 
Jane Doe
 
John Smith
 
Suffix

Result document with the new option applied.

Prefix
John Doe
Jane Doe
John Smith
Suffix