pdfrx_web
    Preparing search index...

    Function usePdfNavigation

    • Current page, page count and the ways to move between them.

      Re-renders when the current page changes (as the user scrolls) and when a document is loaded or its pages are rearranged.

      Returns PdfNavigation

      The current pdf navigation state and actions.

      const { currentPageNumber, pageCount, goToNextPage, canGoNext } = usePdfNavigation();
      return (
      <>
      <span>{currentPageNumber} / {pageCount}</span>
      <button onClick={() => goToNextPage(200)} disabled={!canGoNext}>Next</button>
      </>
      );