New to Telerik Document ProcessingStart a free 30-day trial

PageRef Field

Updated on Jul 15, 2026

The PageRef field inserts the page number of a bookmark for a cross-reference.

To update the PageRef fields within the TOC field, you need to set the FlowExtensibilityManager.NumberingFieldsProvider.

Field Syntax

The following table shows the syntax of a PageRef field:

Syntax
{ PAGEREF Bookmark [\* Format Switch ] }

Switches

Switches are a way for the code fragment to specify formatting for the result of the field. More information is available in the Syntax and Switches section of the Fields article.

The possible switches for a PageRef field are:

SwitchDescription
\hCreates a hyperlink to the bookmarked paragraph.
\pCauses the field to display its position relative to the source bookmark.

Inserting

You can insert this field through the RadFlowDocumentEditor's InsertField() method. It accepts code as the first argument and result as the second argument.

Example 1 demonstrates how you can insert a PageRef field.

Example 1: Insert a PAGEREF field that displays the page number of the mybookmark bookmark

C#
editor.InsertText("Bookmark Page: ");
editor.InsertField("PAGEREF mybookmark", "");

After updating the field, the result is "Bookmark Page: 2" (check Updating Fields).

See Also