Modules

Viewer Namespace

The default `Viewer` export and its static helpers.

Default export shape

The default module export provides a Viewer object with:

Example

import Viewer from '@conekto/papyrium';

const instance = await Viewer.load({
  container: '#viewer',
  document: pdfBytes,
});

const standalone = await Viewer.loadStandalone({
  container: '#standalone-viewer',
  document: pdfBytes,
});

const fitWidth = Viewer.ZoomMode.FIT_TO_WIDTH;
instance.setViewState((state) => state.set('zoom', fitWidth));
Viewer.unload(standalone);