Optional disableOnly fetch the pages needed to render, instead of background-downloading the
whole file. Makes the first page appear fast for large PDFs served over an
API — provided the server supports HTTP range requests (Accept-Ranges: bytes). Has no effect for servers without range support or for raw bytes.
true
Optional disableDisable progressive streaming of the response.
false
The document to be loaded by PDF.js. If you need to pass HTTP headers, auth parameters, or other pdf settings, do it through here.
Optional enableCache the loaded document so re-opening the same URL (or a StrictMode/ remount) reuses it instead of re-downloading. Only URL-based documents are cached. Disable if the same URL can return different content.
true
Optional httpExtra HTTP headers for the document request (e.g. an auth token).
Optional rangeSize (bytes) of each range request when streaming. PDF.js default ~64KB.
Optional withSend credentials (cookies) with the document request.
Optional workerOptional PDF.js worker source override. By default, PdfLoader resolves the worker from the installed pdfjs-dist package so bundlers can emit it locally.
Optional beforeCallback to render content before the PDF document is loaded. Receives the
PDF.js progress, or null before any progress is known (e.g. a cache hit).
PDF.js progress status, or null.
Optional errorOptional on
The props type for PdfLoader.