GroupDocs.Assembly for .NET 19.7 Release Notes
Major Features
Supported dynamic list numbering restart for Word Processing documents and emails with HTML and RTF bodies.
Full List of Features Covering all Changes in this Release
Key | Summary | Category |
---|---|---|
ASSEMBLYNET-116 | Support dynamic list numbering restart for Word Processing documents | Feature |
ASSEMBLYNET-118 | Support dynamic list numbering restart for emails with HTML and RTF bodies | Feature |
ASSEMBLYNET-119 | Support credit-based metered licensing | Feature |
Public API and Backward Incompatible Changes
Supported credit-based metered licensing
From now on, when using metered licensing, GroupDocs.Assembly consumes one credit (along with consumed bytes as previously) for a single document assembly operation.
Added a new method to Metered
The following method was added.
/// <summary>
/// Returns the currently consumed number of credits.
/// </summary>
/// <returns>The currently consumed number of credits.</returns>
public static decimal GetConsumptionCredit();
Supported dynamic list numbering restart
You can restart list numbering within your documents dynamically using restartNum tags. In particular, this feature is useful when working with a nested numbered list within a data band as shown in the following example.
Assume that you have the Order and Service classes defined in your application as follows.
public class Order
{
public String ClientName { get { ... } }
public String ClientAddress { get { ... } }
public IEnumerable<Service> Services { get { ... } }
...
}
public class Service
{
public String Name { get { ... } }
...
}
Given that orders is an enumeration of Order instances, you could try to use the following template to output information on several orders in one document.
<<foreach [order in orders]>><<[order.ClientName]>> (<<[order.ClientAddress]>>)
1. <<foreach [service in order.Services]>><<[service.Name]>>
<</foreach>><</foreach>>
But then, a result document would look as follows.
Jane Doe (445 Mount Eden Road Mount Eden Auckland 1024) 1. Regular Cleaning 2. Oven Cleaning John Smith (43 Vogel Street Roslyn Palmerston North 4414) 3. Regular Cleaning 4. Oven Cleaning 5. Carpet Cleaning
That is, there would be a single numbered list across all orders, which is not applicable for this scenario. However, you can make list numbering to restart for every order by putting a restartNum tag into your template before a corresponding foreach tag as follows.
<<foreach [order in orders]>><<[order.ClientName]>> (<<[order.ClientAddress]>>)
1. <<restartNum>><<foreach [service in order.Services]>><<[service.Name]>>
<</foreach>><</foreach>>
Then, a result document looks as follows.
Jane Doe (445 Mount Eden Road Mount Eden Auckland 1024)
- Regular Cleaning
- Oven Cleaning
John Smith (43 Vogel Street Roslyn Palmerston North 4414)
- Regular Cleaning
- Oven Cleaning
- Carpet Cleaning