Available for: UI for ASP.NET MVC | UI for ASP.NET AJAX | UI for Blazor | UI for WPF | UI for WinForms | UI for Xamarin | UI for WinUI | UI for ASP.NET Core | UI for .NET MAUI

New to Telerik Document Processing? Download free 30-day trial

Using NumberingFieldsProvider

The NumberingFieldsProvider is used for calculating the layout of the document. This is necessary when updating the fields values. For example to calculate the total number of pages.

Requirements

To use the default implementation of the NumberingFieldsProvider you need to reference the Telerik.Documents.Flow.FormatProviders.Pdf assembly.

Setting the default implementation

The default provider can be set with the following code:

Example 1: Register the default NumberingFieldsProvider

 Telerik.Windows.Documents.Flow.Extensibility.FlowExtensibilityManager.NumberingFieldsProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.NumberingFieldsProvider(); 

Using the RegisterNumberingStyleConverter

This method allows you to use a custom numbering style converter.

Example 2: Register custom NumberingStyleConverter

Telerik.Windows.Documents.Flow.FormatProviders.Pdf.NumberingFieldsProvider numberingFieldsProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.NumberingFieldsProvider(); 
numberingFieldsProvider.RegisterNumberingStyleConverter(NumberingStyle.ChineseCounting, new NumberingStyleConverter()); 
The NumberingStyleConverter must implement the INumberingStyleConverter interface which has one method that takes a number and converts it to a string.

See Also

In this article