Skip to content
React PDF Viewer

Search

UsePdfDocumentResult reference

State returned by usePdfDocument: the load status, the document once ready, its page count, the error and a reload function.

Used by

Import

import type { UsePdfDocumentResult } from '@kingtech/react-pdf-viewer';

Properties

NameTypeDefaultRequiredDescription
statusPdfDocumentStatus—Yesidle without a source (or after a handled HTTP error).
documentPDFDocumentProxy | null—YesThe document while ready. Never a destroyed document.
numPagesnumber—YesPage count; 0 without a document.
errorPdfViewerError | null—YesThe failure while error.
reload() => void—YesLoad the current source again.

Source

packages/react-pdf-viewer/src/hooks/usePdfDocument.ts

Generated from content/react-pdf-viewer/reference/use-pdf-document-result.schema.json. Do not edit by hand.