Modules

Viewer Namespace

The default `Viewer` export and its static helpers.

Default export shape

The default module export provides a Viewer object with:

  • load
  • unload
  • ViewState
  • SearchState
  • ZoomMode
  • InteractionMode
  • Annotations
  • Color
  • Geometry
  • Immutable
  • BlendMode
  • Error
  • defaultAnnotationPresets
  • I18n
  • Configuration

Example

import Viewer from '@conekto/papyrium';

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

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