pdfrx_web
    Preparing search index...

    Type Alias PagePaintCallback

    PagePaintCallback: (
        ctx: CanvasRenderingContext2D,
        pageRect: Rect,
        page: PdfPage,
    ) => void

    A custom page painter. The canvas is already transformed to document coordinates (the same space as pageRect), and the current scale factor is devicePixelRatio * zoom. Save/restore the context yourself if you change its state.

    Type Declaration

      • (ctx: CanvasRenderingContext2D, pageRect: Rect, page: PdfPage): void
      • Parameters

        • ctx: CanvasRenderingContext2D

          The 2D context, transformed to document space.

        • pageRect: Rect

          The page's rectangle in document coordinates.

        • page: PdfPage

          The PdfPage being painted (for size, rotation, number).

        Returns void