Essentials
Document Sources
Supported input types for PDF loading and thumbnail rendering.
Supported source types
Papyrium accepts these source types:
FileBlobArrayBufferUint8Arraystring
Recommended usage
In browser apps, prefer File, Blob, or byte arrays. This keeps behavior explicit and aligns with worker processing.
const bytes = new Uint8Array(await file.arrayBuffer());
await instance.load(bytes);
Thumbnail rendering
Use renderThumbnails for previews or sidebars.
const urls = await instance.renderThumbnails({
maxWidth: 200,
maxHeight: 260,
pageNumbers: [1, 2, 3],
});