pdfrx_web
    Preparing search index...

    Function usePdfPageThumbnail

    • Renders one page as a thumbnail, through a cache shared by the whole provider.

      viewer.renderPageThumbnail() goes to the worker every time and caches nothing, which a scrolling sidebar cannot afford. The cache here is keyed by the page's render key (source page + rotation) rather than its number, so reordering pages costs nothing and only a rotated page is re-rendered.

      Parameters

      • pageNumber: number | null

        1-based page number, or null to render nothing.

      • width: number = 120

        Thumbnail width in CSS pixels. Rendered at device pixel ratio.

      Returns PdfPageThumbnail

      The current pdf page thumbnail state and actions.