pdfrx_web
    Preparing search index...

    Function PdfrxProvider

    • Root of every pdfrx React tree: owns the viewer and makes it reachable from the hooks and components below it.

      The viewer itself is not created until a PdfViewerSurface mounts somewhere inside, because the viewer needs a DOM node to paint into. Put exactly one surface in the tree; everything else (toolbar, sidebar, search box) can live wherever the layout calls for.

      Every PdfrxViewerOptions field is accepted as a prop and, except for engine/engineOptions/initialFit (read once at construction), takes effect when it changes.

      Parameters

      • __namedParameters: PdfrxProviderProps

        The destructured component props or operation options.

      Returns ReactNode

      The resulting ReactNode.

      <PdfrxProvider src="/manual.pdf" wasmModulesUrl="/pdfium/">
      <PdfToolbar />
      <div style={{ display: 'flex', flex: 1, minHeight: 0 }}>
      <PdfSidebar />
      <PdfViewerSurface style={{ flex: 1 }} />
      </div>
      </PdfrxProvider>