Find a page from text content

Posted by: philippe.carret on 21 March 2025, 6:47 am EST

  • Posted 21 March 2025, 6:47 am EST - Updated 21 March 2025, 7:11 am EST

    Subject: Navigating to a Specific Page in WPF Viewer Using Hidden GUIDs

    Hi everyone,

    I’m working with a report that consists of 4 pages loaded into a WPF Viewer (AR v15.2). To help users navigate through the report, I’m using an independent tree control where each tree item represents a page.

    For navigation, I’ve embedded a unique hidden text (GUID) on each page—for example: guid1, guid2, guid3, and guid4. My plan is to jump directly to the corresponding page when a user clicks a tree item.

    I intend to achieve this with the following pseudo-code:

    int pageIndex = wpfViewer.FindFirstPageFromText("guid3");
    wpfViewer.GoToPage(pageIndex);


    This approach searches for the hidden GUID in the report and navigates to that page.

    However, **FindFirstPageFromText **method does not exist, how can we achieve this basic navigation.

    Any insights or right approaches would be greatly appreciated!

    Thanks in advance.

  • Posted 25 March 2025, 9:04 am EST

    Hi Philippe,

    AFAIK, there is no public API to all search for the WPF viewer.

    Although, if you already know the page number you can set Viewer.CurrentPage. Sample Code:

    			ReportViewer.CurrentPage = 2;
    
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels