TX Text Control .NET Server

Navigation

Topic

Users scroll, jump to pages and follow links in the Document Viewer, and your own navigation next to the viewer, such as a table of contents or a list of sections, can do the same. Your code scrolls to a page, shows the page thumbnails and decides what happens when users click links.

The examples change the view of the ASP.NET Core tutorial. They load App_Data/template.docx, as the tutorial does in "Load a File With DocumentPath"; use a document with several pages and at least one hyperlink.

How Users Navigate

  • Scrolling. Users scroll through the pages of the document.
  • Page thumbnails. The thumbnail sidebar shows a small image of each page. A toolbar button shows and hides it, and the sidebar can be resized.
  • Two-page view. A toolbar button switches between a view with one page and a view with two pages side by side, like an open book, which gives an overview of long documents.
  • Page navigator. A small bar at the bottom of the pages shows the current page and the number of pages, with Previous page and Next page buttons. The status bar shows the same numbers, for example "PAGE 1 OF 5".
  • Links. A click on a document link, such as an entry of a table of contents, scrolls to its target in the document. A click on a hypertext link navigates to its URL.

The following viewer shows a document of five pages in the two-page view, with the thumbnail sidebar on the left and the page navigator at the bottom:

The Document Viewer in the two-page view: four pages of a five-page document side by side, the thumbnail sidebar with pages 1 to 4, the page navigator "1 / 5" and the status bar "PAGE 1 OF 5"

On smaller screens, the viewer shows a mobile-friendly view with its own buttons; see User Interface.

Next Steps

  • Search: find text in the document.
  • Zooming: change the size of the pages.
  • Events: all events of the viewer.