Circle V2 API Docs
    Preparing search index...

    Type Alias PdfViewerProps

    type PdfViewerProps = {
        children?: (page: PageRenderInfo) => ReactNode;
        chunkErrorFallback?: (error: Error, retry: () => void) => ReactNode;
        className?: string;
        fileUrl: string;
        loadingFallback?: ReactNode;
        onCurrentPageChange?: (pageNumber: number) => void;
        onDocumentLoadSuccess?: (info: { numPages: number }) => void;
        onLoadError?: (error: Error) => void;
        onPageRenderSuccess?: (info: PageRenderInfo) => void;
        pageStyle?: CSSProperties;
        pageWidthPx?: number;
        scrollerRef?: RefObject<HTMLDivElement | null>;
        style?: CSSProperties;
        zoom?: number;
    }
    Index

    Properties

    children?: (page: PageRenderInfo) => ReactNode

    Per-page overlay render prop, absolutely positioned over the page. FieldOverlay filters by box.page itself.

    chunkErrorFallback?: (error: Error, retry: () => void) => ReactNode

    Rendered when the viewer chunk fails to load. Document-level failures go to onLoadError.

    className?: string
    fileUrl: string

    URL of the PDF to render — typically a signed storage URL; data: URLs also work.

    loadingFallback?: ReactNode

    Shown while the viewer chunk or the document is loading.

    onCurrentPageChange?: (pageNumber: number) => void

    Fired when the page crossing the middle of the scroll container changes. Requires the viewer's own container to be the scrolling element (give it a bounded height).

    onDocumentLoadSuccess?: (info: { numPages: number }) => void

    Fired after the document loads, with the page count.

    onLoadError?: (error: Error) => void

    Fired when the document (or the viewer chunk itself) fails to load.

    onPageRenderSuccess?: (info: PageRenderInfo) => void

    Fired each time a page's canvas finishes rendering (also re-fires when zoom changes).

    pageStyle?: CSSProperties

    Extra styles for each page wrapper. Spread before the viewer's geometry so padding and position cannot shift field boxes; avoid transform, zoom and box-sizing, which desync PageRenderInfo.

    pageWidthPx?: number

    Render every page at this CSS width, whatever its point size; unset renders at zoom alone.

    scrollerRef?: RefObject<HTMLDivElement | null>

    Receives the viewer's own scroll container once it mounts (a zoom control anchoring the reading position).

    style?: CSSProperties
    zoom?: number

    CSS pixels per PDF point (default 1). With pageWidthPx set it multiplies the sheet scale.