Nutrient Web SDK
    Preparing search index...

    The ViewState holds information about the current UI representation of a specific document.

    It is an Immutable.Record and thus can be updated using set(key, value), for example: viewState.set("showToolbar", false).

    An initial ViewState can be set in Configuration.

    Because the ViewState is an immutable data type, you must use Instance#setViewState on the Instance to update it.

    To be notified when NutrientViewer updates the ViewState, you can use the dedicated "viewState.change".

    The following examples show you how to update the ViewState and how to get notified about ViewState changes:

    Adding a listener for the "viewState.change" event

    instance.addEventListener("viewState.change", (viewState) => {
    console.log(viewState.toJS());
    });

    Update values for the immutable state object using NutrientViewer.Instance#setViewState

    const state = instance.viewState;
    const newState = state.set("currentPageIndex", 2);
    instance.setViewState(newState);

    Hierarchy

    • Record<
          {
              allowExport: boolean;
              allowPrinting: boolean;
              canScrollWhileDrawing: boolean;
              commentDisplay: "FITTING"
              | "POPOVER"
              | "FLOATING";
              currentPageIndex: number;
              disablePointSnapping: boolean;
              enableAnnotationToolbar: boolean;
              formDesignMode: boolean;
              instance: null | NutrientViewer.Instance;
              interactionMode:
                  | null
                  | | "TEXT"
                  | "NOTE"
                  | "TEXT_HIGHLIGHTER"
                  | "INK"
                  | "INK_SIGNATURE"
                  | "SIGNATURE"
                  | "STAMP_PICKER"
                  | "STAMP_CUSTOM"
                  | "SHAPE_LINE"
                  | "SHAPE_RECTANGLE"
                  | "SHAPE_ELLIPSE"
                  | "SHAPE_POLYGON"
                  | "SHAPE_POLYLINE"
                  | "INK_ERASER"
                  | "COMMENT_MARKER"
                  | "CALLOUT"
                  | "PAN"
                  | "SEARCH"
                  | "DOCUMENT_EDITOR"
                  | "MARQUEE_ZOOM"
                  | "REDACT_TEXT_HIGHLIGHTER"
                  | "REDACT_SHAPE_RECTANGLE"
                  | "DOCUMENT_CROP"
                  | "BUTTON_WIDGET"
                  | "TEXT_WIDGET"
                  | "RADIO_BUTTON_WIDGET"
                  | "CHECKBOX_WIDGET"
                  | "COMBO_BOX_WIDGET"
                  | "LIST_BOX_WIDGET"
                  | "SIGNATURE_WIDGET"
                  | "DATE_WIDGET"
                  | "FORM_CREATOR"
                  | "LINK"
                  | "DISTANCE"
                  | "PERIMETER"
                  | "RECTANGLE_AREA"
                  | "ELLIPSE_AREA"
                  | "POLYGON_AREA"
                  | "CONTENT_EDITOR"
                  | "MULTI_ANNOTATIONS_SELECTION"
                  | "MEASUREMENT"
                  | "MEASUREMENT_SETTINGS"
                  | "ATTACHMENT_PREVIEW";
              keepFirstSpreadAsSinglePage: boolean;
              keepSelectedTool: boolean;
              layoutMode: "AUTO"
              | "SINGLE"
              | "DOUBLE";
              pageSpacing: number;
              pagesRotation: 0 | 90 | 180 | 270;
              prerenderedPageSpreads: null | number;
              previewRedactionMode: boolean;
              readOnly: boolean;
              resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
              scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
              showAIAssistant: boolean;
              showAnnotationNotes: boolean;
              showAnnotations: boolean;
              showComments: boolean;
              showSignatureValidationStatus:
                  | "IF_SIGNED"
                  | "HAS_WARNINGS"
                  | "HAS_ERRORS"
                  | "NEVER";
              showToolbar: boolean;
              sidebarMode: | undefined
              | null
              | | "CUSTOM"
              | "ANNOTATIONS"
              | "BOOKMARKS"
              | "DOCUMENT_OUTLINE"
              | "THUMBNAILS"
              | "SIGNATURES"
              | "LAYERS"
              | "ATTACHMENTS"
              | string & {};
              sidebarOptions: | { [key: string]: any }
              | { ANNOTATIONS: AnnotationsSidebarOptions }
              | { LAYERS: LayersSidebarOptions }
              | { ATTACHMENTS: AttachmentsSidebarOptions };
              sidebarPlacement: "START" | "END";
              sidebarWidth: number;
              spreadSpacing: number;
              viewportPadding: {
                  horizontal: number;
                  vertical: number;
                  "[iterator]"(): IterableIterator<
                      [keyof { horizontal: number; vertical: number }, number],
                  >;
                  asImmutable(): this;
                  asMutable(): this;
                  clear(): this;
                  delete<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                  ): this;
                  deleteIn(keyPath: Iterable<any>): this;
                  equals(other: any): boolean;
                  get<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      notSetValue?: any,
                  ): { horizontal: number; vertical: number }[K];
                  get<T>(key: string, notSetValue: T): T;
                  getIn(keyPath: Iterable<any>): any;
                  has(key: string): key is "horizontal" | "vertical";
                  hashCode(): number;
                  hasIn(keyPath: Iterable<any>): boolean;
                  merge(
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeDeep(
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                  mergeDeepWith(
                      merger: (oldVal: any, newVal: any, key: any) => any,
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                  mergeWith(
                      merger: (
                          oldVal: any,
                          newVal: any,
                          key: keyof { horizontal: number; vertical: number },
                      ) => any,
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  remove<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                  ): this;
                  removeIn(keyPath: Iterable<any>): this;
                  set<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      value: { horizontal: number; vertical: number }[K],
                  ): this;
                  setIn(keyPath: Iterable<any>, value: any): this;
                  toJS(): { horizontal: any; vertical: any };
                  toJSON(): { horizontal: number; vertical: number };
                  toObject(): { horizontal: number; vertical: number };
                  toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                  update<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      updater: (
                          value: { horizontal: number; vertical: number }[K],
                      ) => { horizontal: number; vertical: number }[K],
                  ): this;
                  updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                  wasAltered(): boolean;
                  withMutations(mutator: (mutable: this) => any): this;
              };
              zoom: | number
              | ZoomConfiguration
              | "AUTO"
              | "FIT_TO_WIDTH"
              | "FIT_TO_VIEWPORT"
              | "CUSTOM";
              zoomStep: number;
          },
          this,
      > & Readonly<
          {
              allowExport: boolean;
              allowPrinting: boolean;
              canScrollWhileDrawing: boolean;
              commentDisplay: "FITTING"
              | "POPOVER"
              | "FLOATING";
              currentPageIndex: number;
              disablePointSnapping: boolean;
              enableAnnotationToolbar: boolean;
              formDesignMode: boolean;
              instance: null | NutrientViewer.Instance;
              interactionMode:
                  | null
                  | | "TEXT"
                  | "NOTE"
                  | "TEXT_HIGHLIGHTER"
                  | "INK"
                  | "INK_SIGNATURE"
                  | "SIGNATURE"
                  | "STAMP_PICKER"
                  | "STAMP_CUSTOM"
                  | "SHAPE_LINE"
                  | "SHAPE_RECTANGLE"
                  | "SHAPE_ELLIPSE"
                  | "SHAPE_POLYGON"
                  | "SHAPE_POLYLINE"
                  | "INK_ERASER"
                  | "COMMENT_MARKER"
                  | "CALLOUT"
                  | "PAN"
                  | "SEARCH"
                  | "DOCUMENT_EDITOR"
                  | "MARQUEE_ZOOM"
                  | "REDACT_TEXT_HIGHLIGHTER"
                  | "REDACT_SHAPE_RECTANGLE"
                  | "DOCUMENT_CROP"
                  | "BUTTON_WIDGET"
                  | "TEXT_WIDGET"
                  | "RADIO_BUTTON_WIDGET"
                  | "CHECKBOX_WIDGET"
                  | "COMBO_BOX_WIDGET"
                  | "LIST_BOX_WIDGET"
                  | "SIGNATURE_WIDGET"
                  | "DATE_WIDGET"
                  | "FORM_CREATOR"
                  | "LINK"
                  | "DISTANCE"
                  | "PERIMETER"
                  | "RECTANGLE_AREA"
                  | "ELLIPSE_AREA"
                  | "POLYGON_AREA"
                  | "CONTENT_EDITOR"
                  | "MULTI_ANNOTATIONS_SELECTION"
                  | "MEASUREMENT"
                  | "MEASUREMENT_SETTINGS"
                  | "ATTACHMENT_PREVIEW";
              keepFirstSpreadAsSinglePage: boolean;
              keepSelectedTool: boolean;
              layoutMode: "AUTO"
              | "SINGLE"
              | "DOUBLE";
              pageSpacing: number;
              pagesRotation: 0 | 90 | 180 | 270;
              prerenderedPageSpreads: null | number;
              previewRedactionMode: boolean;
              readOnly: boolean;
              resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
              scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
              showAIAssistant: boolean;
              showAnnotationNotes: boolean;
              showAnnotations: boolean;
              showComments: boolean;
              showSignatureValidationStatus:
                  | "IF_SIGNED"
                  | "HAS_WARNINGS"
                  | "HAS_ERRORS"
                  | "NEVER";
              showToolbar: boolean;
              sidebarMode: | undefined
              | null
              | | "CUSTOM"
              | "ANNOTATIONS"
              | "BOOKMARKS"
              | "DOCUMENT_OUTLINE"
              | "THUMBNAILS"
              | "SIGNATURES"
              | "LAYERS"
              | "ATTACHMENTS"
              | string & {};
              sidebarOptions: | { [key: string]: any }
              | { ANNOTATIONS: AnnotationsSidebarOptions }
              | { LAYERS: LayersSidebarOptions }
              | { ATTACHMENTS: AttachmentsSidebarOptions };
              sidebarPlacement: "START" | "END";
              sidebarWidth: number;
              spreadSpacing: number;
              viewportPadding: {
                  horizontal: number;
                  vertical: number;
                  "[iterator]"(): IterableIterator<
                      [keyof { horizontal: number; vertical: number }, number],
                  >;
                  asImmutable(): this;
                  asMutable(): this;
                  clear(): this;
                  delete<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                  ): this;
                  deleteIn(keyPath: Iterable<any>): this;
                  equals(other: any): boolean;
                  get<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      notSetValue?: any,
                  ): { horizontal: number; vertical: number }[K];
                  get<T>(key: string, notSetValue: T): T;
                  getIn(keyPath: Iterable<any>): any;
                  has(key: string): key is "horizontal" | "vertical";
                  hashCode(): number;
                  hasIn(keyPath: Iterable<any>): boolean;
                  merge(
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeDeep(
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                  mergeDeepWith(
                      merger: (oldVal: any, newVal: any, key: any) => any,
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                  mergeWith(
                      merger: (
                          oldVal: any,
                          newVal: any,
                          key: keyof { horizontal: number; vertical: number },
                      ) => any,
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  remove<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                  ): this;
                  removeIn(keyPath: Iterable<any>): this;
                  set<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      value: { horizontal: number; vertical: number }[K],
                  ): this;
                  setIn(keyPath: Iterable<any>, value: any): this;
                  toJS(): { horizontal: any; vertical: any };
                  toJSON(): { horizontal: number; vertical: number };
                  toObject(): { horizontal: number; vertical: number };
                  toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                  update<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      updater: (
                          value: { horizontal: number; vertical: number }[K],
                      ) => { horizontal: number; vertical: number }[K],
                  ): this;
                  updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                  wasAltered(): boolean;
                  withMutations(mutator: (mutable: this) => any): this;
              };
              zoom: | number
              | ZoomConfiguration
              | "AUTO"
              | "FIT_TO_WIDTH"
              | "FIT_TO_VIEWPORT"
              | "CUSTOM";
              zoomStep: number;
          },
      >
      • ViewState
    Index

    Constructors

    • Parameters

      • Optionalprops: Partial<
            {
                allowExport: boolean;
                allowPrinting: boolean;
                canScrollWhileDrawing: boolean;
                commentDisplay: "FITTING"
                | "POPOVER"
                | "FLOATING";
                currentPageIndex: number;
                disablePointSnapping: boolean;
                enableAnnotationToolbar: boolean;
                formDesignMode: boolean;
                instance: null | NutrientViewer.Instance;
                interactionMode:
                    | null
                    | | "TEXT"
                    | "NOTE"
                    | "TEXT_HIGHLIGHTER"
                    | "INK"
                    | "INK_SIGNATURE"
                    | "SIGNATURE"
                    | "STAMP_PICKER"
                    | "STAMP_CUSTOM"
                    | "SHAPE_LINE"
                    | "SHAPE_RECTANGLE"
                    | "SHAPE_ELLIPSE"
                    | "SHAPE_POLYGON"
                    | "SHAPE_POLYLINE"
                    | "INK_ERASER"
                    | "COMMENT_MARKER"
                    | "CALLOUT"
                    | "PAN"
                    | "SEARCH"
                    | "DOCUMENT_EDITOR"
                    | "MARQUEE_ZOOM"
                    | "REDACT_TEXT_HIGHLIGHTER"
                    | "REDACT_SHAPE_RECTANGLE"
                    | "DOCUMENT_CROP"
                    | "BUTTON_WIDGET"
                    | "TEXT_WIDGET"
                    | "RADIO_BUTTON_WIDGET"
                    | "CHECKBOX_WIDGET"
                    | "COMBO_BOX_WIDGET"
                    | "LIST_BOX_WIDGET"
                    | "SIGNATURE_WIDGET"
                    | "DATE_WIDGET"
                    | "FORM_CREATOR"
                    | "LINK"
                    | "DISTANCE"
                    | "PERIMETER"
                    | "RECTANGLE_AREA"
                    | "ELLIPSE_AREA"
                    | "POLYGON_AREA"
                    | "CONTENT_EDITOR"
                    | "MULTI_ANNOTATIONS_SELECTION"
                    | "MEASUREMENT"
                    | "MEASUREMENT_SETTINGS"
                    | "ATTACHMENT_PREVIEW";
                keepFirstSpreadAsSinglePage: boolean;
                keepSelectedTool: boolean;
                layoutMode: "AUTO"
                | "SINGLE"
                | "DOUBLE";
                pageSpacing: number;
                pagesRotation: 0 | 90 | 180 | 270;
                prerenderedPageSpreads: null | number;
                previewRedactionMode: boolean;
                readOnly: boolean;
                resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
                showAIAssistant: boolean;
                showAnnotationNotes: boolean;
                showAnnotations: boolean;
                showComments: boolean;
                showSignatureValidationStatus:
                    | "IF_SIGNED"
                    | "HAS_WARNINGS"
                    | "HAS_ERRORS"
                    | "NEVER";
                showToolbar: boolean;
                sidebarMode: | undefined
                | null
                | | "CUSTOM"
                | "ANNOTATIONS"
                | "BOOKMARKS"
                | "DOCUMENT_OUTLINE"
                | "THUMBNAILS"
                | "SIGNATURES"
                | "LAYERS"
                | "ATTACHMENTS"
                | string & {};
                sidebarOptions: | { [key: string]: any }
                | { ANNOTATIONS: AnnotationsSidebarOptions }
                | { LAYERS: LayersSidebarOptions }
                | { ATTACHMENTS: AttachmentsSidebarOptions };
                sidebarPlacement: "START" | "END";
                sidebarWidth: number;
                spreadSpacing: number;
                viewportPadding: {
                    horizontal: number;
                    vertical: number;
                    "[iterator]"(): IterableIterator<
                        [keyof { horizontal: number; vertical: number }, number],
                    >;
                    asImmutable(): this;
                    asMutable(): this;
                    clear(): this;
                    delete<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                    ): this;
                    deleteIn(keyPath: Iterable<any>): this;
                    equals(other: any): boolean;
                    get<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                        notSetValue?: any,
                    ): { horizontal: number; vertical: number }[K];
                    get<T>(key: string, notSetValue: T): T;
                    getIn(keyPath: Iterable<any>): any;
                    has(key: string): key is "horizontal" | "vertical";
                    hashCode(): number;
                    hasIn(keyPath: Iterable<any>): boolean;
                    merge(
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeDeep(
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                    mergeDeepWith(
                        merger: (oldVal: any, newVal: any, key: any) => any,
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                    mergeWith(
                        merger: (
                            oldVal: any,
                            newVal: any,
                            key: keyof { horizontal: number; vertical: number },
                        ) => any,
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    remove<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                    ): this;
                    removeIn(keyPath: Iterable<any>): this;
                    set<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                        value: { horizontal: number; vertical: number }[K],
                    ): this;
                    setIn(keyPath: Iterable<any>, value: any): this;
                    toJS(): { horizontal: any; vertical: any };
                    toJSON(): { horizontal: number; vertical: number };
                    toObject(): { horizontal: number; vertical: number };
                    toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                    update<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                        updater: (
                            value: { horizontal: number; vertical: number }[K],
                        ) => { horizontal: number; vertical: number }[K],
                    ): this;
                    updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                    wasAltered(): boolean;
                    withMutations(mutator: (mutable: this) => any): this;
                };
                zoom: | number
                | ZoomConfiguration
                | "AUTO"
                | "FIT_TO_WIDTH"
                | "FIT_TO_VIEWPORT"
                | "CUSTOM";
                zoomStep: number;
            },
        >

      Returns NutrientViewer.ViewState

    Properties

    allowExport: boolean

    Control whether or not the export PDF button in the toolbar should be disabled. If the user has insufficient permissions, the feature will automatically be disabled.

    This feature requires the download permission in the JWT.

    It is possible to remove the export PDF button with the Toolbar API.

    true
    
    allowPrinting: boolean

    Control whether or not the printing button in the toolbar should be disabled. If the user has insufficient permissions, the feature will automatically be disabled.

    This feature requires the download permission in the JWT, because on some browsers we have to fall back to downloading the PDF in order to allow performant printing.

    It is possible to remove the print button with the Toolbar API.

    true
    
    canScrollWhileDrawing: boolean

    This flag controls whether to enable/disable finger scrolling during Ink Drawing using a pen (safari only)

    • When set to false, (default), scrolling with the finger in drawing mode is disabled.
    • When set to true, once a pen input has been detected, finger input will result in scrolling the document.
    instance.setViewState(viewState => (
    viewState.set("canScrollWhileDrawing", true)
    ));
    false
    
    commentDisplay: "FITTING" | "POPOVER" | "FLOATING"

    Controls how comments are displayed in the viewer in desktop and tablet modes. In mobile devices, comments are always displayed in a drawer a the bottom of the viewport:

    • NutrientViewer.CommentDisplay.FITTING: Comments are displayed in a dialog or floating depending on the available viewport space. This is the default value.
    • NutrientViewer.CommentDisplay.POPOVER: Comments are displayed in a dialog next to their reference annotation marker.
    • NutrientViewer.CommentDisplay.FLOATING: Comments are displayed floating next to the page side, at the same height as their reference annotation marker, except when ViewState#zoom is set to .ZoomeMode#FIT_TO_WIDTH`, in which case they are displayed in a popover dialog instead.
    currentPageIndex: number

    The page index of the page that's currently visible. If there is more than one page visible this will return the page that is using the most space in the viewport. The pageIndex is zero-based and has a maximum value of totalPageCount - 1.

    0
    
    disablePointSnapping: boolean

    Snapping to the nearest point is enabled by default in ur SDK for measurement tools. It can be disabled by this API.

    false
    
    instance.setViewState(viewState =>
    viewState.set("disablePointSnapping", true)
    );
    enableAnnotationToolbar: boolean

    Set this to false if you want NutrientViewer to disable the annotation toolbar when an annotation is being created or modified.

    true
    
    formDesignMode: boolean

    This flag controls what kind of UI interaction is active for widget annotations.

    • When set to false, (default), clicking on a widget annotation will allow to modify its value.
    • When set to true, clicking on a widget annotation will select it and allow moving, resizing and deleting it using the annotation toolbar.

    This flag can only be set to true if the Form Creator component is included in the license and the current backend supports it.

    instance.setViewState(viewState => (
    viewState.set("formDesignMode", true)
    ));
    false
    
    instance: null | NutrientViewer.Instance

    An optional reference to a mounted Instance. This is required to call the following methods on ViewState:

    • {@link ViewState#zoomIn}
    • {@link ViewState#zoomOut}
    • {@link ViewState#nextZoomLevel}
    interactionMode:
        | null
        | | "TEXT"
        | "NOTE"
        | "TEXT_HIGHLIGHTER"
        | "INK"
        | "INK_SIGNATURE"
        | "SIGNATURE"
        | "STAMP_PICKER"
        | "STAMP_CUSTOM"
        | "SHAPE_LINE"
        | "SHAPE_RECTANGLE"
        | "SHAPE_ELLIPSE"
        | "SHAPE_POLYGON"
        | "SHAPE_POLYLINE"
        | "INK_ERASER"
        | "COMMENT_MARKER"
        | "CALLOUT"
        | "PAN"
        | "SEARCH"
        | "DOCUMENT_EDITOR"
        | "MARQUEE_ZOOM"
        | "REDACT_TEXT_HIGHLIGHTER"
        | "REDACT_SHAPE_RECTANGLE"
        | "DOCUMENT_CROP"
        | "BUTTON_WIDGET"
        | "TEXT_WIDGET"
        | "RADIO_BUTTON_WIDGET"
        | "CHECKBOX_WIDGET"
        | "COMBO_BOX_WIDGET"
        | "LIST_BOX_WIDGET"
        | "SIGNATURE_WIDGET"
        | "DATE_WIDGET"
        | "FORM_CREATOR"
        | "LINK"
        | "DISTANCE"
        | "PERIMETER"
        | "RECTANGLE_AREA"
        | "ELLIPSE_AREA"
        | "POLYGON_AREA"
        | "CONTENT_EDITOR"
        | "MULTI_ANNOTATIONS_SELECTION"
        | "MEASUREMENT"
        | "MEASUREMENT_SETTINGS"
        | "ATTACHMENT_PREVIEW"

    Controls the current interaction mode in the viewer. When this value is changed, we will make sure that the state is properly transformed.

    If, for example, the user is currently creating an ink annotation and you change this value to InteractionMode.TEXT, we will delete the current in-memory ink annotation.

    For a list of all available mode, please refer to InteractionMode.

    If this value is null, no interaction mode will be enabled. This corresponds to the default mode that allows text selection and scrolling using the mouse wheel or scrollbars (and panning on mobile devices).

    instance.setViewState(viewState => (
    viewState.set("interactionMode", NutrientViewer.InteractionMode.PAN)
    ));
    null
    
    keepFirstSpreadAsSinglePage: boolean

    When this is enabled, the first spread will always show a single page, even when LayoutMode.DOUBLE is enabled. This is useful for magazines that want to show a cover page before the regular content starts.

    A spread is a container for either one or two pages, based on the configured ViewState#layoutMode.

    false
    
    keepSelectedTool: boolean

    This flag controls whether a selected tool should maintain its selected state after an annotation is created

    • When set to false, (default), after an annotation has been created the tool is not selected anymore.
    • When set to true, the tool used to create the annotation will still be selected and so it'll be possible to keep adding annotations.

    This feature is available for Note Annotation, Text Annotation, Redaction Annotation, Shape Annotation and Comments. Ink Annotation behaves like this by default, the ink tool stays selected until its deselected either programmatically or via the UI.

    instance.setViewState(viewState => (
    viewState.set("keepSelectedTool", true)
    ));
    false
    
    layoutMode: "AUTO" | "SINGLE" | "DOUBLE"

    Controls how pages inside a view are displayed.

    pageSpacing: number

    The spacing between pages in pixels. This value will adjust to the current zoom level, so when you zoom in, it does not appear fixed to the viewport. This spacing only applies for LayoutMode.DOUBLE.

    0
    
    pagesRotation: 0 | 90 | 180 | 270

    The current rotation of all pages. The value is in degrees and describes a clockwise rotation.

    Can either be 0°, 90°, 180°, or 270°. Negative values and values above 270 are normalized to one of the valid rotations.

    When a page rotation is set, the values are not persisted in the PDF. This setting only affects how the PDF is viewed in the application.

    instance.setViewState(viewState => viewState.set("pagesRotation", -450))
    // ... later
    instance.viewState.pagesRotation; // => 270
    0
    
    prerenderedPageSpreads: null | number

    Number of page spreads to prerender.

    Apart from the current page, Nutrient Web SDK prerenders a specific number of page spreads before and after the current page to improve the user experience when scrolling through the document.

    A page spread is a container for either one or two pages, based on the configured layout mode. The number of prerendered page spreads is set to 5 by default, which means that Nutrient Web SDK will prerender 5 page spreads before and after the current page.

    If set to null, all the page spreads in the document will be prerendered. This setting is not recommended for large documents, as it may lead to performance issues.

    // Prerender 10 page spreads
    instance.setViewState(viewState =>
    viewState.set("prerenderedPageSpreads", 10)
    );
    // Prerender all page spreads
    instance.setViewState(viewState =>
    viewState.set("prerenderedPageSpreads", null)
    );
    5
    
    previewRedactionMode: boolean

    This flag controls whether to show the marked state or redacted state for redaction annotations.

    • When set to false, (default), the marked state of redaction annotations will be shown.
    • When set to true, the redacted state of redaction annotations will be used.

    This flag can only be set to true if the Redactions component is included in the license.

    instance.setViewState(viewState => (
    viewState.set("previewRedactionMode", true)
    ));
    false
    
    readOnly: boolean

    When the read only mode is activated, the UI for creating, updating and deleting annotations will be completely hidden. In addition, the user will also no longer be able to select annotations or modify form field values.

    However, it is still possible to add annotations programmatically.

    If a read only mode is specified within the JWT itself or in the PDF document permissions, and NutrientViewer.Options.IGNORE_DOCUMENT_PERMISSIONS is not set, this option cannot be unset.

    false
    
    resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE"

    When in LayoutMode.AUTO mode, this property is set to the actual rendered layout mode, which can either be LayoutMode.SINGLE or LayoutMode.DOUBLE. It can be used to be notified when the layout mode changes while still being in LayoutMode.AUTO mode: if the rendered layout mode changes while in NutrientViewer.LayoutMode.AUTO (because of user UI interactions, for example), the viewState.change event will be dispatched, and this property will hold the updated value.

    instance.addEventListener("viewState.change", (viewState) => {
    console.log(viewState.resolvedLayoutMode);
    });
    scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED"

    Controls how pages can be scrolled.

    showAIAssistant: boolean

    When this is enabled, the AI Assistant chat dialog will be shown. If this is disabled, the chat dialog will not be shown.

    NutrientViewer.load({
    initialViewState: new NutrientViewer.ViewState({
    showAIAssistant: true,
    }),
    });
    false
    
    showAnnotationNotes: boolean

    When this is set to false, annotation notes will no longer be rendered.

    true
    
    showAnnotations: boolean

    When this is set to false, annotations will no longer be rendered.

    This option can also be set to false, when NutrientViewer.ViewState#readOnly mode is enabled.

    true
    
    showComments: boolean

    When this is set to false, comments will no longer be rendered.

    NutrientViewer ignores this value when you haven't purchased the comments component.

    true
    
    showSignatureValidationStatus:
        | "IF_SIGNED"
        | "HAS_WARNINGS"
        | "HAS_ERRORS"
        | "NEVER"

    Controls when the digital signature validation UI will be shown.

    instance.setViewState(viewState => (
    viewState.set("showSignatureValidationStatus", NutrientViewer.ShowSignatureValidationStatusMode.IF_SIGNED)
    ));
    showToolbar: boolean

    Set this to true if you want a toolbar for navigation and annotation controls or false if you don't.

    true
    
    sidebarMode:
        | undefined
        | null
        | | "CUSTOM"
        | "ANNOTATIONS"
        | "BOOKMARKS"
        | "DOCUMENT_OUTLINE"
        | "THUMBNAILS"
        | "SIGNATURES"
        | "LAYERS"
        | "ATTACHMENTS"
        | string & {}

    Controls the current sidebar mode in the viewer.

    For a list of all available mode, please refer to SidebarMode. This can also be set to a custom sidebar ID corresponding to a sidebar passed in ui.sidebar.

    If this value is null, the sidebar is hidden. This corresponds to the default mode.

    instance.setViewState(viewState => (
    viewState.set("sidebarMode", NutrientViewer.SidebarMode.THUMBNAILS)
    ));
    null
    
    sidebarOptions:
        | { [key: string]: any }
        | { ANNOTATIONS: AnnotationsSidebarOptions }
        | { LAYERS: LayersSidebarOptions }
        | { ATTACHMENTS: AttachmentsSidebarOptions }

    Defines specific options that affect each individual sidebar.

    For a list of all available options, please refer to SidebarOptions.

    instance.setViewState(viewState => (
    viewState.set("sidebarOptions", {
    [NutrientViewer.SidebarMode.ANNOTATIONS]: {
    includeContent: [NutrientViewer.Annotations.TextAnnotation, NutrientViewer.Annotations.HighlightAnnotation]
    }
    })
    ));
    sidebarPlacement: "START" | "END"

    Controls the current sidebar placement in the viewer.

    instance.setViewState(viewState => (
    viewState.set("sidebarPlacement", NutrientViewer.SidebarPlacement.END)
    ));
    null
    
    sidebarWidth: number

    Controls the width of the sidebar in client, pixel units. Changing the ViewState.sidebarMode does not affect this value.

    The default value depends on the current viewport width: if the viewport width is less than 768px, the sidebar will take 100% of the viewport width by default. If the viewport width is greater, the sidebar will take 300px by default.

    instance.setViewState(viewState => (
    viewState.set("sidebarWidth", 400)
    ));
    spreadSpacing: number

    The spacing between spreads in pixels. This value will adjust to the current zoom level, so when you zoom in, it does not appear fixed to the viewport. This spacing only applies for ScrollMode.CONTINUOUS.

    A spread is a container for either one or two pages, based on the configured ViewState#layoutMode.

    20
    
    viewportPadding: {
        horizontal: number;
        vertical: number;
        "[iterator]"(): IterableIterator<
            [keyof { horizontal: number; vertical: number }, number],
        >;
        asImmutable(): this;
        asMutable(): this;
        clear(): this;
        delete<K extends keyof { horizontal: number; vertical: number }>(
            key: K,
        ): this;
        deleteIn(keyPath: Iterable<any>): this;
        equals(other: any): boolean;
        get<K extends keyof { horizontal: number; vertical: number }>(
            key: K,
            notSetValue?: any,
        ): { horizontal: number; vertical: number }[K];
        get<T>(key: string, notSetValue: T): T;
        getIn(keyPath: Iterable<any>): any;
        has(key: string): key is "horizontal" | "vertical";
        hashCode(): number;
        hasIn(keyPath: Iterable<any>): boolean;
        merge(
            ...collections: (
                | Iterable<[string, any]>
                | Partial<{ horizontal: number; vertical: number }>
            )[],
        ): this;
        mergeDeep(
            ...collections: (
                | Iterable<[string, any]>
                | Partial<{ horizontal: number; vertical: number }>
            )[],
        ): this;
        mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
        mergeDeepWith(
            merger: (oldVal: any, newVal: any, key: any) => any,
            ...collections: (
                | Iterable<[string, any]>
                | Partial<{ horizontal: number; vertical: number }>
            )[],
        ): this;
        mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
        mergeWith(
            merger: (
                oldVal: any,
                newVal: any,
                key: keyof { horizontal: number; vertical: number },
            ) => any,
            ...collections: (
                | Iterable<[string, any]>
                | Partial<{ horizontal: number; vertical: number }>
            )[],
        ): this;
        remove<K extends keyof { horizontal: number; vertical: number }>(
            key: K,
        ): this;
        removeIn(keyPath: Iterable<any>): this;
        set<K extends keyof { horizontal: number; vertical: number }>(
            key: K,
            value: { horizontal: number; vertical: number }[K],
        ): this;
        setIn(keyPath: Iterable<any>, value: any): this;
        toJS(): { horizontal: any; vertical: any };
        toJSON(): { horizontal: number; vertical: number };
        toObject(): { horizontal: number; vertical: number };
        toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
        update<K extends keyof { horizontal: number; vertical: number }>(
            key: K,
            updater: (
                value: { horizontal: number; vertical: number }[K],
            ) => { horizontal: number; vertical: number }[K],
        ): this;
        updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
        wasAltered(): boolean;
        withMutations(mutator: (mutable: this) => any): this;
    }

    The padding between the viewport and the document in pixels. This value will not increase, when you zoom in.

    The horizontal value will be used as padding-left and padding-right and the vertical value for padding-top and padding-bottom. The same value for both sides will be used, this means that horizontal: 20 is equal to padding-left: 20px; padding-right: 20px;.

    When you set those values to zero, there will be no space between the viewport and the document.

    Type Declaration

    • Readonlyhorizontal: number

      The horizontal padding for left and right in pixel.

    • Readonlyvertical: number

      The vertical padding for top and bottom in pixel.

    • [iterator]: function
      • Returns IterableIterator<[keyof { horizontal: number; vertical: number }, number]>

    • asImmutable: function
      • Returns this

        Map#asImmutable

    • asMutable: function
      • Returns this

        Map#asMutable

    • clear: function
      • Returns a new instance of this Record type with all values set to their default values.

        Returns this

    • delete: function
      • Returns a new instance of this Record type with the value for the specific key set to its default value.

        Type Parameters

        • K extends keyof { horizontal: number; vertical: number }

        Parameters

        • key: K

        Returns this

        remove

    • deleteIn: function
      • Parameters

        Returns this

        removeIn

    • equals: function
      • Parameters

        • other: any

        Returns boolean

    • get: function
      • Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.

        If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.

        Type Parameters

        • K extends keyof { horizontal: number; vertical: number }

        Parameters

        • key: K
        • OptionalnotSetValue: any

        Returns { horizontal: number; vertical: number }[K]

      • Type Parameters

        • T

        Parameters

        • key: string
        • notSetValue: T

        Returns T

    • getIn: function
    • has: function
      • Parameters

        • key: string

        Returns key is "horizontal" | "vertical"

    • hashCode: function
      • Returns number

    • hasIn: function
      • Parameters

        Returns boolean

    • merge: function
      • Parameters

        • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

        Returns this

    • mergeDeep: function
      • Parameters

        • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

        Returns this

    • mergeDeepIn: function
      • Parameters

        • keyPath: Iterable<any>
        • ...collections: any[]

        Returns this

    • mergeDeepWith: function
      • Parameters

        • merger: (oldVal: any, newVal: any, key: any) => any
        • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

        Returns this

    • mergeIn: function
      • Parameters

        • keyPath: Iterable<any>
        • ...collections: any[]

        Returns this

    • mergeWith: function
      • Parameters

        • merger: (
              oldVal: any,
              newVal: any,
              key: keyof { horizontal: number; vertical: number },
          ) => any
        • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

        Returns this

    • remove: function
      • Type Parameters

        • K extends keyof { horizontal: number; vertical: number }

        Parameters

        • key: K

        Returns this

    • removeIn: function
      • Parameters

        Returns this

    • set: function
      • Type Parameters

        • K extends keyof { horizontal: number; vertical: number }

        Parameters

        • key: K
        • value: { horizontal: number; vertical: number }[K]

        Returns this

    • setIn: function
      • Parameters

        Returns this

    • toJS: function
      • Deeply converts this Record to equivalent native JavaScript Object.

        Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.

        Returns { horizontal: any; vertical: any }

        • horizontal: any

          The horizontal padding for left and right in pixel.

        • vertical: any

          The vertical padding for top and bottom in pixel.

    • toJSON: function
      • Shallowly converts this Record to equivalent native JavaScript Object.

        Returns { horizontal: number; vertical: number }

        • horizontal: number

          The horizontal padding for left and right in pixel.

        • vertical: number

          The vertical padding for top and bottom in pixel.

    • toObject: function
      • Shallowly converts this Record to equivalent JavaScript Object.

        Returns { horizontal: number; vertical: number }

        • horizontal: number

          The horizontal padding for left and right in pixel.

        • vertical: number

          The vertical padding for top and bottom in pixel.

    • toSeq: function
      • Returns Keyed<keyof { horizontal: number; vertical: number }, number>

    • update: function
      • Type Parameters

        • K extends keyof { horizontal: number; vertical: number }

        Parameters

        • key: K
        • updater: (
              value: { horizontal: number; vertical: number }[K],
          ) => { horizontal: number; vertical: number }[K]

        Returns this

    • updateIn: function
      • Parameters

        • keyPath: Iterable<any>
        • updater: (value: any) => any

        Returns this

    • wasAltered: function
      • Returns boolean

        Map#wasAltered

    • withMutations: function
      • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

        Parameters

        • mutator: (mutable: this) => any

        Returns this

        Map#withMutations

    { horizontal: 20, vertical: 20 }
    
    zoom:
        | number
        | ZoomConfiguration
        | "AUTO"
        | "FIT_TO_WIDTH"
        | "FIT_TO_VIEWPORT"
        | "CUSTOM"

    Controls the current zoom factor. This could either be a number multiplier or a ZoomConfiguration or a ZoomMode.

    If a number value is used, it must be between Instance#minimumZoomLevel and Instance#maximumZoomLevel.

    Note: Using a ZoomMode} will override the padding set using ViewState#viewportPadding

    {
    * zoomMode: NutrientViewer.ZoomMode.AUTO,
    * wheelZoomMode: NutrientViewer.WheelZoomMode.WITH_CTRL,
    * options: {
    * enableKeyboardZoom: true,
    * enableGestureZoom: true,
    * },
    * }
    zoomStep: number

    Controls the zoom step when zooming in or out using the toolbar buttons.

    1.25
    
    instance.setViewState(viewState => (
    viewState.set("zoomStep", 1.1)
    ));

    Methods

    • Returns IterableIterator<
          [
              keyof {
                  allowExport: boolean;
                  allowPrinting: boolean;
                  canScrollWhileDrawing: boolean;
                  commentDisplay: "FITTING"
                  | "POPOVER"
                  | "FLOATING";
                  currentPageIndex: number;
                  disablePointSnapping: boolean;
                  enableAnnotationToolbar: boolean;
                  formDesignMode: boolean;
                  instance: null | NutrientViewer.Instance;
                  interactionMode: IInteractionMode | null;
                  keepFirstSpreadAsSinglePage: boolean;
                  keepSelectedTool: boolean;
                  layoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                  pageSpacing: number;
                  pagesRotation: 0 | 90 | 180 | 270;
                  prerenderedPageSpreads: null | number;
                  previewRedactionMode: boolean;
                  readOnly: boolean;
                  resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                  scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
                  showAIAssistant: boolean;
                  showAnnotationNotes: boolean;
                  showAnnotations: boolean;
                  showComments: boolean;
                  showSignatureValidationStatus:
                      | "IF_SIGNED"
                      | "HAS_WARNINGS"
                      | "HAS_ERRORS"
                      | "NEVER";
                  showToolbar: boolean;
                  sidebarMode: ISidebarMode | null | undefined;
                  sidebarOptions: | { [key: string]: any }
                  | { ANNOTATIONS: AnnotationsSidebarOptions }
                  | { LAYERS: LayersSidebarOptions }
                  | { ATTACHMENTS: AttachmentsSidebarOptions };
                  sidebarPlacement: "START" | "END";
                  sidebarWidth: number;
                  spreadSpacing: number;
                  viewportPadding: {
                      horizontal: number;
                      vertical: number;
                      "[iterator]"(): IterableIterator<[(keyof ViewportPaddingProps), number]>;
                      asImmutable(): this;
                      asMutable(): this;
                      clear(): this;
                      delete<K extends keyof ViewportPaddingProps>(key: K): this;
                      deleteIn(keyPath: Iterable<any>): this;
                      equals(other: any): boolean;
                      get<K extends keyof ViewportPaddingProps>(
                          key: K,
                          notSetValue?: any,
                      ): { horizontal: number; vertical: number }[K];
                      get<T>(key: string, notSetValue: T): T;
                      getIn(keyPath: Iterable<any>): any;
                      has(key: string): key is "horizontal" | "vertical";
                      hashCode(): number;
                      hasIn(keyPath: Iterable<any>): boolean;
                      merge(
                          ...collections: (
                              | Iterable<[string, any]>
                              | Partial<{ horizontal: number; vertical: number }>
                          )[],
                      ): this;
                      mergeDeep(
                          ...collections: (
                              | Iterable<[string, any]>
                              | Partial<{ horizontal: number; vertical: number }>
                          )[],
                      ): this;
                      mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                      mergeDeepWith(
                          merger: (oldVal: any, newVal: any, key: any) => any,
                          ...collections: (
                              | Iterable<[string, any]>
                              | Partial<{ horizontal: number; vertical: number }>
                          )[],
                      ): this;
                      mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                      mergeWith(
                          merger: (
                              oldVal: any,
                              newVal: any,
                              key: keyof ViewportPaddingProps,
                          ) => any,
                          ...collections: (
                              | Iterable<[string, any]>
                              | Partial<{ horizontal: number; vertical: number }>
                          )[],
                      ): this;
                      remove<K extends keyof ViewportPaddingProps>(key: K): this;
                      removeIn(keyPath: Iterable<any>): this;
                      set<K extends keyof ViewportPaddingProps>(
                          key: K,
                          value: { horizontal: number; vertical: number }[K],
                      ): this;
                      setIn(keyPath: Iterable<any>, value: any): this;
                      toJS(): { horizontal: any; vertical: any };
                      toJSON(): { horizontal: number; vertical: number };
                      toObject(): { horizontal: number; vertical: number };
                      toSeq(): Keyed<(keyof ViewportPaddingProps), number>;
                      update<K extends keyof ViewportPaddingProps>(
                          key: K,
                          updater: (
                              value: { horizontal: number; vertical: number }[K],
                          ) => { horizontal: number; vertical: number }[K],
                      ): this;
                      updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                      wasAltered(): boolean;
                      withMutations(mutator: (mutable: this) => any): this;
                  };
                  zoom: number | ZoomConfiguration | IZoomMode;
                  zoomStep: number;
              },
              | undefined
              | null
              | number
              | boolean
              | { [key: string]: any }
              | "TEXT"
              | NutrientViewer.Instance
              | "NOTE"
              | ZoomConfiguration
              | "AUTO"
              | "FIT_TO_WIDTH"
              | "FIT_TO_VIEWPORT"
              | "CUSTOM"
              | "FITTING"
              | "POPOVER"
              | "FLOATING"
              | "SINGLE"
              | "DOUBLE"
              | "CONTINUOUS"
              | "PER_SPREAD"
              | "DISABLED"
              | "TEXT_HIGHLIGHTER"
              | "INK"
              | "INK_SIGNATURE"
              | "SIGNATURE"
              | "STAMP_PICKER"
              | "STAMP_CUSTOM"
              | "SHAPE_LINE"
              | "SHAPE_RECTANGLE"
              | "SHAPE_ELLIPSE"
              | "SHAPE_POLYGON"
              | "SHAPE_POLYLINE"
              | "INK_ERASER"
              | "COMMENT_MARKER"
              | "CALLOUT"
              | "PAN"
              | "SEARCH"
              | "DOCUMENT_EDITOR"
              | "MARQUEE_ZOOM"
              | "REDACT_TEXT_HIGHLIGHTER"
              | "REDACT_SHAPE_RECTANGLE"
              | "DOCUMENT_CROP"
              | "BUTTON_WIDGET"
              | "TEXT_WIDGET"
              | "RADIO_BUTTON_WIDGET"
              | "CHECKBOX_WIDGET"
              | "COMBO_BOX_WIDGET"
              | "LIST_BOX_WIDGET"
              | "SIGNATURE_WIDGET"
              | "DATE_WIDGET"
              | "FORM_CREATOR"
              | "LINK"
              | "DISTANCE"
              | "PERIMETER"
              | "RECTANGLE_AREA"
              | "ELLIPSE_AREA"
              | "POLYGON_AREA"
              | "CONTENT_EDITOR"
              | "MULTI_ANNOTATIONS_SELECTION"
              | "MEASUREMENT"
              | "MEASUREMENT_SETTINGS"
              | "ATTACHMENT_PREVIEW"
              | "ANNOTATIONS"
              | "BOOKMARKS"
              | "DOCUMENT_OUTLINE"
              | "THUMBNAILS"
              | "SIGNATURES"
              | "LAYERS"
              | "ATTACHMENTS"
              | string & {}
              | { ANNOTATIONS: AnnotationsSidebarOptions }
              | { LAYERS: LayersSidebarOptions }
              | { ATTACHMENTS: AttachmentsSidebarOptions }
              | "START"
              | "END"
              | {
                  horizontal: number;
                  vertical: number;
                  "[iterator]"(): IterableIterator<
                      [keyof { horizontal: number; vertical: number }, number],
                  >;
                  asImmutable(): this;
                  asMutable(): this;
                  clear(): this;
                  delete<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                  ): this;
                  deleteIn(keyPath: Iterable<any>): this;
                  equals(other: any): boolean;
                  get<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      notSetValue?: any,
                  ): { horizontal: number; vertical: number }[K];
                  get<T>(key: string, notSetValue: T): T;
                  getIn(keyPath: Iterable<any>): any;
                  has(key: string): key is "horizontal" | "vertical";
                  hashCode(): number;
                  hasIn(keyPath: Iterable<any>): boolean;
                  merge(
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeDeep(
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                  mergeDeepWith(
                      merger: (oldVal: any, newVal: any, key: any) => any,
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                  mergeWith(
                      merger: (
                          oldVal: any,
                          newVal: any,
                          key: keyof { horizontal: number; vertical: number },
                      ) => any,
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  remove<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                  ): this;
                  removeIn(keyPath: Iterable<any>): this;
                  set<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      value: { horizontal: number; vertical: number }[K],
                  ): this;
                  setIn(keyPath: Iterable<any>, value: any): this;
                  toJS(): { horizontal: any; vertical: any };
                  toJSON(): { horizontal: number; vertical: number };
                  toObject(): { horizontal: number; vertical: number };
                  toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                  update<K extends keyof { horizontal: number; vertical: number }>(
                      key: K,
                      updater: (
                          value: { horizontal: number; vertical: number }[K],
                      ) => { horizontal: number; vertical: number }[K],
                  ): this;
                  updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                  wasAltered(): boolean;
                  withMutations(mutator: (mutable: this) => any): this;
              }
              | "IF_SIGNED"
              | "HAS_WARNINGS"
              | "HAS_ERRORS"
              | "NEVER",
          ],
      >

    • Returns this

      Map#asImmutable

    • Returns this

      Map#asMutable

    • Returns a new instance of this Record type with all values set to their default values.

      Returns this

    • Returns a new instance of this Record type with the value for the specific key set to its default value.

      Type Parameters

      • K extends keyof {
            allowExport: boolean;
            allowPrinting: boolean;
            canScrollWhileDrawing: boolean;
            commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
            currentPageIndex: number;
            disablePointSnapping: boolean;
            enableAnnotationToolbar: boolean;
            formDesignMode: boolean;
            instance: null | NutrientViewer.Instance;
            interactionMode: IInteractionMode | null;
            keepFirstSpreadAsSinglePage: boolean;
            keepSelectedTool: boolean;
            layoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            pageSpacing: number;
            pagesRotation: 0 | 90 | 180 | 270;
            prerenderedPageSpreads: null | number;
            previewRedactionMode: boolean;
            readOnly: boolean;
            resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
            showAIAssistant: boolean;
            showAnnotationNotes: boolean;
            showAnnotations: boolean;
            showComments: boolean;
            showSignatureValidationStatus:
                | "IF_SIGNED"
                | "HAS_WARNINGS"
                | "HAS_ERRORS"
                | "NEVER";
            showToolbar: boolean;
            sidebarMode: ISidebarMode | null | undefined;
            sidebarOptions: | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions };
            sidebarPlacement: "START" | "END";
            sidebarWidth: number;
            spreadSpacing: number;
            viewportPadding: {
                horizontal: number;
                vertical: number;
                "[iterator]"(): IterableIterator<[(keyof ViewportPaddingProps), number]>;
                asImmutable(): this;
                asMutable(): this;
                clear(): this;
                delete<K extends keyof ViewportPaddingProps>(key: K): this;
                deleteIn(keyPath: Iterable<any>): this;
                equals(other: any): boolean;
                get<K extends keyof ViewportPaddingProps>(
                    key: K,
                    notSetValue?: any,
                ): { horizontal: number; vertical: number }[K];
                get<T>(key: string, notSetValue: T): T;
                getIn(keyPath: Iterable<any>): any;
                has(key: string): key is "horizontal" | "vertical";
                hashCode(): number;
                hasIn(keyPath: Iterable<any>): boolean;
                merge(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeep(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeDeepWith(
                    merger: (oldVal: any, newVal: any, key: any) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeWith(
                    merger: (
                        oldVal: any,
                        newVal: any,
                        key: keyof ViewportPaddingProps,
                    ) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                remove<K extends keyof ViewportPaddingProps>(key: K): this;
                removeIn(keyPath: Iterable<any>): this;
                set<K extends keyof ViewportPaddingProps>(
                    key: K,
                    value: { horizontal: number; vertical: number }[K],
                ): this;
                setIn(keyPath: Iterable<any>, value: any): this;
                toJS(): { horizontal: any; vertical: any };
                toJSON(): { horizontal: number; vertical: number };
                toObject(): { horizontal: number; vertical: number };
                toSeq(): Keyed<(keyof ViewportPaddingProps), number>;
                update<K extends keyof ViewportPaddingProps>(
                    key: K,
                    updater: (
                        value: { horizontal: number; vertical: number }[K],
                    ) => { horizontal: number; vertical: number }[K],
                ): this;
                updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                wasAltered(): boolean;
                withMutations(mutator: (mutable: this) => any): this;
            };
            zoom: number | ZoomConfiguration | IZoomMode;
            zoomStep: number;
        }

      Parameters

      • key: K

      Returns this

      remove

    • Parameters

      Returns this

      removeIn

    • Parameters

      • other: any

      Returns boolean

    • Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.

      If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.

      Type Parameters

      • K extends keyof {
            allowExport: boolean;
            allowPrinting: boolean;
            canScrollWhileDrawing: boolean;
            commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
            currentPageIndex: number;
            disablePointSnapping: boolean;
            enableAnnotationToolbar: boolean;
            formDesignMode: boolean;
            instance: null | NutrientViewer.Instance;
            interactionMode: IInteractionMode | null;
            keepFirstSpreadAsSinglePage: boolean;
            keepSelectedTool: boolean;
            layoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            pageSpacing: number;
            pagesRotation: 0 | 90 | 180 | 270;
            prerenderedPageSpreads: null | number;
            previewRedactionMode: boolean;
            readOnly: boolean;
            resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
            showAIAssistant: boolean;
            showAnnotationNotes: boolean;
            showAnnotations: boolean;
            showComments: boolean;
            showSignatureValidationStatus:
                | "IF_SIGNED"
                | "HAS_WARNINGS"
                | "HAS_ERRORS"
                | "NEVER";
            showToolbar: boolean;
            sidebarMode: ISidebarMode | null | undefined;
            sidebarOptions: | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions };
            sidebarPlacement: "START" | "END";
            sidebarWidth: number;
            spreadSpacing: number;
            viewportPadding: {
                horizontal: number;
                vertical: number;
                "[iterator]"(): IterableIterator<[(keyof ViewportPaddingProps), number]>;
                asImmutable(): this;
                asMutable(): this;
                clear(): this;
                delete<K extends keyof ViewportPaddingProps>(key: K): this;
                deleteIn(keyPath: Iterable<any>): this;
                equals(other: any): boolean;
                get<K extends keyof ViewportPaddingProps>(
                    key: K,
                    notSetValue?: any,
                ): { horizontal: number; vertical: number }[K];
                get<T>(key: string, notSetValue: T): T;
                getIn(keyPath: Iterable<any>): any;
                has(key: string): key is "horizontal" | "vertical";
                hashCode(): number;
                hasIn(keyPath: Iterable<any>): boolean;
                merge(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeep(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeDeepWith(
                    merger: (oldVal: any, newVal: any, key: any) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeWith(
                    merger: (
                        oldVal: any,
                        newVal: any,
                        key: keyof ViewportPaddingProps,
                    ) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                remove<K extends keyof ViewportPaddingProps>(key: K): this;
                removeIn(keyPath: Iterable<any>): this;
                set<K extends keyof ViewportPaddingProps>(
                    key: K,
                    value: { horizontal: number; vertical: number }[K],
                ): this;
                setIn(keyPath: Iterable<any>, value: any): this;
                toJS(): { horizontal: any; vertical: any };
                toJSON(): { horizontal: number; vertical: number };
                toObject(): { horizontal: number; vertical: number };
                toSeq(): Keyed<(keyof ViewportPaddingProps), number>;
                update<K extends keyof ViewportPaddingProps>(
                    key: K,
                    updater: (
                        value: { horizontal: number; vertical: number }[K],
                    ) => { horizontal: number; vertical: number }[K],
                ): this;
                updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                wasAltered(): boolean;
                withMutations(mutator: (mutable: this) => any): this;
            };
            zoom: number | ZoomConfiguration | IZoomMode;
            zoomStep: number;
        }

      Parameters

      • key: K
      • OptionalnotSetValue: any

      Returns {
          allowExport: boolean;
          allowPrinting: boolean;
          canScrollWhileDrawing: boolean;
          commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
          currentPageIndex: number;
          disablePointSnapping: boolean;
          enableAnnotationToolbar: boolean;
          formDesignMode: boolean;
          instance: null | NutrientViewer.Instance;
          interactionMode:
              | null
              | | "TEXT"
              | "NOTE"
              | "TEXT_HIGHLIGHTER"
              | "INK"
              | "INK_SIGNATURE"
              | "SIGNATURE"
              | "STAMP_PICKER"
              | "STAMP_CUSTOM"
              | "SHAPE_LINE"
              | "SHAPE_RECTANGLE"
              | "SHAPE_ELLIPSE"
              | "SHAPE_POLYGON"
              | "SHAPE_POLYLINE"
              | "INK_ERASER"
              | "COMMENT_MARKER"
              | "CALLOUT"
              | "PAN"
              | "SEARCH"
              | "DOCUMENT_EDITOR"
              | "MARQUEE_ZOOM"
              | "REDACT_TEXT_HIGHLIGHTER"
              | "REDACT_SHAPE_RECTANGLE"
              | "DOCUMENT_CROP"
              | "BUTTON_WIDGET"
              | "TEXT_WIDGET"
              | "RADIO_BUTTON_WIDGET"
              | "CHECKBOX_WIDGET"
              | "COMBO_BOX_WIDGET"
              | "LIST_BOX_WIDGET"
              | "SIGNATURE_WIDGET"
              | "DATE_WIDGET"
              | "FORM_CREATOR"
              | "LINK"
              | "DISTANCE"
              | "PERIMETER"
              | "RECTANGLE_AREA"
              | "ELLIPSE_AREA"
              | "POLYGON_AREA"
              | "CONTENT_EDITOR"
              | "MULTI_ANNOTATIONS_SELECTION"
              | "MEASUREMENT"
              | "MEASUREMENT_SETTINGS"
              | "ATTACHMENT_PREVIEW";
          keepFirstSpreadAsSinglePage: boolean;
          keepSelectedTool: boolean;
          layoutMode: "AUTO"
          | "SINGLE"
          | "DOUBLE";
          pageSpacing: number;
          pagesRotation: 0 | 90 | 180 | 270;
          prerenderedPageSpreads: null | number;
          previewRedactionMode: boolean;
          readOnly: boolean;
          resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
          scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
          showAIAssistant: boolean;
          showAnnotationNotes: boolean;
          showAnnotations: boolean;
          showComments: boolean;
          showSignatureValidationStatus:
              | "IF_SIGNED"
              | "HAS_WARNINGS"
              | "HAS_ERRORS"
              | "NEVER";
          showToolbar: boolean;
          sidebarMode: | undefined
          | null
          | | "CUSTOM"
          | "ANNOTATIONS"
          | "BOOKMARKS"
          | "DOCUMENT_OUTLINE"
          | "THUMBNAILS"
          | "SIGNATURES"
          | "LAYERS"
          | "ATTACHMENTS"
          | string & {};
          sidebarOptions: | { [key: string]: any }
          | { ANNOTATIONS: AnnotationsSidebarOptions }
          | { LAYERS: LayersSidebarOptions }
          | { ATTACHMENTS: AttachmentsSidebarOptions };
          sidebarPlacement: "START" | "END";
          sidebarWidth: number;
          spreadSpacing: number;
          viewportPadding: {
              horizontal: number;
              vertical: number;
              "[iterator]"(): IterableIterator<
                  [keyof { horizontal: number; vertical: number }, number],
              >;
              asImmutable(): this;
              asMutable(): this;
              clear(): this;
              delete<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
              ): this;
              deleteIn(keyPath: Iterable<any>): this;
              equals(other: any): boolean;
              get<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  notSetValue?: any,
              ): { horizontal: number; vertical: number }[K];
              get<T>(key: string, notSetValue: T): T;
              getIn(keyPath: Iterable<any>): any;
              has(key: string): key is "horizontal" | "vertical";
              hashCode(): number;
              hasIn(keyPath: Iterable<any>): boolean;
              merge(
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeDeep(
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
              mergeDeepWith(
                  merger: (oldVal: any, newVal: any, key: any) => any,
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
              mergeWith(
                  merger: (
                      oldVal: any,
                      newVal: any,
                      key: keyof { horizontal: number; vertical: number },
                  ) => any,
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              remove<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
              ): this;
              removeIn(keyPath: Iterable<any>): this;
              set<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  value: { horizontal: number; vertical: number }[K],
              ): this;
              setIn(keyPath: Iterable<any>, value: any): this;
              toJS(): { horizontal: any; vertical: any };
              toJSON(): { horizontal: number; vertical: number };
              toObject(): { horizontal: number; vertical: number };
              toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
              update<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  updater: (
                      value: { horizontal: number; vertical: number }[K],
                  ) => { horizontal: number; vertical: number }[K],
              ): this;
              updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
              wasAltered(): boolean;
              withMutations(mutator: (mutable: this) => any): this;
          };
          zoom: | number
          | ZoomConfiguration
          | "AUTO"
          | "FIT_TO_WIDTH"
          | "FIT_TO_VIEWPORT"
          | "CUSTOM";
          zoomStep: number;
      }[K]

    • Type Parameters

      • T

      Parameters

      • key: string
      • notSetValue: T

      Returns T

    • Parameters

      Returns any

    • Creates a new ViewState with a currentPageIndex decreased by one.

      When you hit 0, it will not update the state.

      Returns NutrientViewer.ViewState

      New ViewState with an updated zoom property.

      instance.setViewState(viewState => viewState.goToPreviousPage());
      

      When this method is called on a self-constructed instance of ViewState.

    • Parameters

      • key: string

      Returns key is
          | "readOnly"
          | "interactionMode"
          | "sidebarMode"
          | "sidebarOptions"
          | "sidebarPlacement"
          | "showSignatureValidationStatus"
          | "formDesignMode"
          | "showAnnotations"
          | "showComments"
          | "showAnnotationNotes"
          | "showToolbar"
          | "enableAnnotationToolbar"
          | "previewRedactionMode"
          | "canScrollWhileDrawing"
          | "keepSelectedTool"
          | "instance"
          | "sidebarWidth"
          | "allowPrinting"
          | "allowExport"
          | "currentPageIndex"
          | "keepFirstSpreadAsSinglePage"
          | "layoutMode"
          | "pageSpacing"
          | "pagesRotation"
          | "scrollMode"
          | "spreadSpacing"
          | "viewportPadding"
          | "zoom"
          | "commentDisplay"
          | "zoomStep"
          | "resolvedLayoutMode"
          | "disablePointSnapping"
          | "forceRenderWidgetsInAnnotationsOrder"
          | "prerenderedPageSpreads"
          | "showAIAssistant"

    • Returns number

    • Parameters

      Returns boolean

    • Parameters

      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    allowExport: boolean;
                    allowPrinting: boolean;
                    canScrollWhileDrawing: boolean;
                    commentDisplay: "FITTING"
                    | "POPOVER"
                    | "FLOATING";
                    currentPageIndex: number;
                    disablePointSnapping: boolean;
                    enableAnnotationToolbar: boolean;
                    formDesignMode: boolean;
                    instance: null | NutrientViewer.Instance;
                    interactionMode:
                        | null
                        | | "TEXT"
                        | "NOTE"
                        | "TEXT_HIGHLIGHTER"
                        | "INK"
                        | "INK_SIGNATURE"
                        | "SIGNATURE"
                        | "STAMP_PICKER"
                        | "STAMP_CUSTOM"
                        | "SHAPE_LINE"
                        | "SHAPE_RECTANGLE"
                        | "SHAPE_ELLIPSE"
                        | "SHAPE_POLYGON"
                        | "SHAPE_POLYLINE"
                        | "INK_ERASER"
                        | "COMMENT_MARKER"
                        | "CALLOUT"
                        | "PAN"
                        | "SEARCH"
                        | "DOCUMENT_EDITOR"
                        | "MARQUEE_ZOOM"
                        | "REDACT_TEXT_HIGHLIGHTER"
                        | "REDACT_SHAPE_RECTANGLE"
                        | "DOCUMENT_CROP"
                        | "BUTTON_WIDGET"
                        | "TEXT_WIDGET"
                        | "RADIO_BUTTON_WIDGET"
                        | "CHECKBOX_WIDGET"
                        | "COMBO_BOX_WIDGET"
                        | "LIST_BOX_WIDGET"
                        | "SIGNATURE_WIDGET"
                        | "DATE_WIDGET"
                        | "FORM_CREATOR"
                        | "LINK"
                        | "DISTANCE"
                        | "PERIMETER"
                        | "RECTANGLE_AREA"
                        | "ELLIPSE_AREA"
                        | "POLYGON_AREA"
                        | "CONTENT_EDITOR"
                        | "MULTI_ANNOTATIONS_SELECTION"
                        | "MEASUREMENT"
                        | "MEASUREMENT_SETTINGS"
                        | "ATTACHMENT_PREVIEW";
                    keepFirstSpreadAsSinglePage: boolean;
                    keepSelectedTool: boolean;
                    layoutMode: "AUTO"
                    | "SINGLE"
                    | "DOUBLE";
                    pageSpacing: number;
                    pagesRotation: 0 | 90 | 180 | 270;
                    prerenderedPageSpreads: null | number;
                    previewRedactionMode: boolean;
                    readOnly: boolean;
                    resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                    scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
                    showAIAssistant: boolean;
                    showAnnotationNotes: boolean;
                    showAnnotations: boolean;
                    showComments: boolean;
                    showSignatureValidationStatus:
                        | "IF_SIGNED"
                        | "HAS_WARNINGS"
                        | "HAS_ERRORS"
                        | "NEVER";
                    showToolbar: boolean;
                    sidebarMode: | undefined
                    | null
                    | | "CUSTOM"
                    | "ANNOTATIONS"
                    | "BOOKMARKS"
                    | "DOCUMENT_OUTLINE"
                    | "THUMBNAILS"
                    | "SIGNATURES"
                    | "LAYERS"
                    | "ATTACHMENTS"
                    | string & {};
                    sidebarOptions: | { [key: string]: any }
                    | { ANNOTATIONS: AnnotationsSidebarOptions }
                    | { LAYERS: LayersSidebarOptions }
                    | { ATTACHMENTS: AttachmentsSidebarOptions };
                    sidebarPlacement: "START" | "END";
                    sidebarWidth: number;
                    spreadSpacing: number;
                    viewportPadding: {
                        horizontal: number;
                        vertical: number;
                        "[iterator]"(): IterableIterator<
                            [keyof { horizontal: number; vertical: number }, number],
                        >;
                        asImmutable(): this;
                        asMutable(): this;
                        clear(): this;
                        delete<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                        ): this;
                        deleteIn(keyPath: Iterable<any>): this;
                        equals(other: any): boolean;
                        get<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            notSetValue?: any,
                        ): { horizontal: number; vertical: number }[K];
                        get<T>(key: string, notSetValue: T): T;
                        getIn(keyPath: Iterable<any>): any;
                        has(key: string): key is "horizontal" | "vertical";
                        hashCode(): number;
                        hasIn(keyPath: Iterable<any>): boolean;
                        merge(
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeDeep(
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                        mergeDeepWith(
                            merger: (oldVal: any, newVal: any, key: any) => any,
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                        mergeWith(
                            merger: (
                                oldVal: any,
                                newVal: any,
                                key: keyof { horizontal: number; vertical: number },
                            ) => any,
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        remove<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                        ): this;
                        removeIn(keyPath: Iterable<any>): this;
                        set<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            value: { horizontal: number; vertical: number }[K],
                        ): this;
                        setIn(keyPath: Iterable<any>, value: any): this;
                        toJS(): { horizontal: any; vertical: any };
                        toJSON(): { horizontal: number; vertical: number };
                        toObject(): { horizontal: number; vertical: number };
                        toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                        update<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            updater: (
                                value: { horizontal: number; vertical: number }[K],
                            ) => { horizontal: number; vertical: number }[K],
                        ): this;
                        updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                        wasAltered(): boolean;
                        withMutations(mutator: (mutable: this) => any): this;
                    };
                    zoom: | number
                    | ZoomConfiguration
                    | "AUTO"
                    | "FIT_TO_WIDTH"
                    | "FIT_TO_VIEWPORT"
                    | "CUSTOM";
                    zoomStep: number;
                },
            >
        )[]

      Returns this

    • Parameters

      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    allowExport: boolean;
                    allowPrinting: boolean;
                    canScrollWhileDrawing: boolean;
                    commentDisplay: "FITTING"
                    | "POPOVER"
                    | "FLOATING";
                    currentPageIndex: number;
                    disablePointSnapping: boolean;
                    enableAnnotationToolbar: boolean;
                    formDesignMode: boolean;
                    instance: null | NutrientViewer.Instance;
                    interactionMode:
                        | null
                        | | "TEXT"
                        | "NOTE"
                        | "TEXT_HIGHLIGHTER"
                        | "INK"
                        | "INK_SIGNATURE"
                        | "SIGNATURE"
                        | "STAMP_PICKER"
                        | "STAMP_CUSTOM"
                        | "SHAPE_LINE"
                        | "SHAPE_RECTANGLE"
                        | "SHAPE_ELLIPSE"
                        | "SHAPE_POLYGON"
                        | "SHAPE_POLYLINE"
                        | "INK_ERASER"
                        | "COMMENT_MARKER"
                        | "CALLOUT"
                        | "PAN"
                        | "SEARCH"
                        | "DOCUMENT_EDITOR"
                        | "MARQUEE_ZOOM"
                        | "REDACT_TEXT_HIGHLIGHTER"
                        | "REDACT_SHAPE_RECTANGLE"
                        | "DOCUMENT_CROP"
                        | "BUTTON_WIDGET"
                        | "TEXT_WIDGET"
                        | "RADIO_BUTTON_WIDGET"
                        | "CHECKBOX_WIDGET"
                        | "COMBO_BOX_WIDGET"
                        | "LIST_BOX_WIDGET"
                        | "SIGNATURE_WIDGET"
                        | "DATE_WIDGET"
                        | "FORM_CREATOR"
                        | "LINK"
                        | "DISTANCE"
                        | "PERIMETER"
                        | "RECTANGLE_AREA"
                        | "ELLIPSE_AREA"
                        | "POLYGON_AREA"
                        | "CONTENT_EDITOR"
                        | "MULTI_ANNOTATIONS_SELECTION"
                        | "MEASUREMENT"
                        | "MEASUREMENT_SETTINGS"
                        | "ATTACHMENT_PREVIEW";
                    keepFirstSpreadAsSinglePage: boolean;
                    keepSelectedTool: boolean;
                    layoutMode: "AUTO"
                    | "SINGLE"
                    | "DOUBLE";
                    pageSpacing: number;
                    pagesRotation: 0 | 90 | 180 | 270;
                    prerenderedPageSpreads: null | number;
                    previewRedactionMode: boolean;
                    readOnly: boolean;
                    resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                    scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
                    showAIAssistant: boolean;
                    showAnnotationNotes: boolean;
                    showAnnotations: boolean;
                    showComments: boolean;
                    showSignatureValidationStatus:
                        | "IF_SIGNED"
                        | "HAS_WARNINGS"
                        | "HAS_ERRORS"
                        | "NEVER";
                    showToolbar: boolean;
                    sidebarMode: | undefined
                    | null
                    | | "CUSTOM"
                    | "ANNOTATIONS"
                    | "BOOKMARKS"
                    | "DOCUMENT_OUTLINE"
                    | "THUMBNAILS"
                    | "SIGNATURES"
                    | "LAYERS"
                    | "ATTACHMENTS"
                    | string & {};
                    sidebarOptions: | { [key: string]: any }
                    | { ANNOTATIONS: AnnotationsSidebarOptions }
                    | { LAYERS: LayersSidebarOptions }
                    | { ATTACHMENTS: AttachmentsSidebarOptions };
                    sidebarPlacement: "START" | "END";
                    sidebarWidth: number;
                    spreadSpacing: number;
                    viewportPadding: {
                        horizontal: number;
                        vertical: number;
                        "[iterator]"(): IterableIterator<
                            [keyof { horizontal: number; vertical: number }, number],
                        >;
                        asImmutable(): this;
                        asMutable(): this;
                        clear(): this;
                        delete<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                        ): this;
                        deleteIn(keyPath: Iterable<any>): this;
                        equals(other: any): boolean;
                        get<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            notSetValue?: any,
                        ): { horizontal: number; vertical: number }[K];
                        get<T>(key: string, notSetValue: T): T;
                        getIn(keyPath: Iterable<any>): any;
                        has(key: string): key is "horizontal" | "vertical";
                        hashCode(): number;
                        hasIn(keyPath: Iterable<any>): boolean;
                        merge(
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeDeep(
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                        mergeDeepWith(
                            merger: (oldVal: any, newVal: any, key: any) => any,
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                        mergeWith(
                            merger: (
                                oldVal: any,
                                newVal: any,
                                key: keyof { horizontal: number; vertical: number },
                            ) => any,
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        remove<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                        ): this;
                        removeIn(keyPath: Iterable<any>): this;
                        set<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            value: { horizontal: number; vertical: number }[K],
                        ): this;
                        setIn(keyPath: Iterable<any>, value: any): this;
                        toJS(): { horizontal: any; vertical: any };
                        toJSON(): { horizontal: number; vertical: number };
                        toObject(): { horizontal: number; vertical: number };
                        toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                        update<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            updater: (
                                value: { horizontal: number; vertical: number }[K],
                            ) => { horizontal: number; vertical: number }[K],
                        ): this;
                        updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                        wasAltered(): boolean;
                        withMutations(mutator: (mutable: this) => any): this;
                    };
                    zoom: | number
                    | ZoomConfiguration
                    | "AUTO"
                    | "FIT_TO_WIDTH"
                    | "FIT_TO_VIEWPORT"
                    | "CUSTOM";
                    zoomStep: number;
                },
            >
        )[]

      Returns this

    • Parameters

      • keyPath: Iterable<any>
      • ...collections: any[]

      Returns this

    • Parameters

      • merger: (oldVal: any, newVal: any, key: any) => any
      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    allowExport: boolean;
                    allowPrinting: boolean;
                    canScrollWhileDrawing: boolean;
                    commentDisplay: "FITTING"
                    | "POPOVER"
                    | "FLOATING";
                    currentPageIndex: number;
                    disablePointSnapping: boolean;
                    enableAnnotationToolbar: boolean;
                    formDesignMode: boolean;
                    instance: null | NutrientViewer.Instance;
                    interactionMode:
                        | null
                        | | "TEXT"
                        | "NOTE"
                        | "TEXT_HIGHLIGHTER"
                        | "INK"
                        | "INK_SIGNATURE"
                        | "SIGNATURE"
                        | "STAMP_PICKER"
                        | "STAMP_CUSTOM"
                        | "SHAPE_LINE"
                        | "SHAPE_RECTANGLE"
                        | "SHAPE_ELLIPSE"
                        | "SHAPE_POLYGON"
                        | "SHAPE_POLYLINE"
                        | "INK_ERASER"
                        | "COMMENT_MARKER"
                        | "CALLOUT"
                        | "PAN"
                        | "SEARCH"
                        | "DOCUMENT_EDITOR"
                        | "MARQUEE_ZOOM"
                        | "REDACT_TEXT_HIGHLIGHTER"
                        | "REDACT_SHAPE_RECTANGLE"
                        | "DOCUMENT_CROP"
                        | "BUTTON_WIDGET"
                        | "TEXT_WIDGET"
                        | "RADIO_BUTTON_WIDGET"
                        | "CHECKBOX_WIDGET"
                        | "COMBO_BOX_WIDGET"
                        | "LIST_BOX_WIDGET"
                        | "SIGNATURE_WIDGET"
                        | "DATE_WIDGET"
                        | "FORM_CREATOR"
                        | "LINK"
                        | "DISTANCE"
                        | "PERIMETER"
                        | "RECTANGLE_AREA"
                        | "ELLIPSE_AREA"
                        | "POLYGON_AREA"
                        | "CONTENT_EDITOR"
                        | "MULTI_ANNOTATIONS_SELECTION"
                        | "MEASUREMENT"
                        | "MEASUREMENT_SETTINGS"
                        | "ATTACHMENT_PREVIEW";
                    keepFirstSpreadAsSinglePage: boolean;
                    keepSelectedTool: boolean;
                    layoutMode: "AUTO"
                    | "SINGLE"
                    | "DOUBLE";
                    pageSpacing: number;
                    pagesRotation: 0 | 90 | 180 | 270;
                    prerenderedPageSpreads: null | number;
                    previewRedactionMode: boolean;
                    readOnly: boolean;
                    resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                    scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
                    showAIAssistant: boolean;
                    showAnnotationNotes: boolean;
                    showAnnotations: boolean;
                    showComments: boolean;
                    showSignatureValidationStatus:
                        | "IF_SIGNED"
                        | "HAS_WARNINGS"
                        | "HAS_ERRORS"
                        | "NEVER";
                    showToolbar: boolean;
                    sidebarMode: | undefined
                    | null
                    | | "CUSTOM"
                    | "ANNOTATIONS"
                    | "BOOKMARKS"
                    | "DOCUMENT_OUTLINE"
                    | "THUMBNAILS"
                    | "SIGNATURES"
                    | "LAYERS"
                    | "ATTACHMENTS"
                    | string & {};
                    sidebarOptions: | { [key: string]: any }
                    | { ANNOTATIONS: AnnotationsSidebarOptions }
                    | { LAYERS: LayersSidebarOptions }
                    | { ATTACHMENTS: AttachmentsSidebarOptions };
                    sidebarPlacement: "START" | "END";
                    sidebarWidth: number;
                    spreadSpacing: number;
                    viewportPadding: {
                        horizontal: number;
                        vertical: number;
                        "[iterator]"(): IterableIterator<
                            [keyof { horizontal: number; vertical: number }, number],
                        >;
                        asImmutable(): this;
                        asMutable(): this;
                        clear(): this;
                        delete<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                        ): this;
                        deleteIn(keyPath: Iterable<any>): this;
                        equals(other: any): boolean;
                        get<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            notSetValue?: any,
                        ): { horizontal: number; vertical: number }[K];
                        get<T>(key: string, notSetValue: T): T;
                        getIn(keyPath: Iterable<any>): any;
                        has(key: string): key is "horizontal" | "vertical";
                        hashCode(): number;
                        hasIn(keyPath: Iterable<any>): boolean;
                        merge(
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeDeep(
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                        mergeDeepWith(
                            merger: (oldVal: any, newVal: any, key: any) => any,
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                        mergeWith(
                            merger: (
                                oldVal: any,
                                newVal: any,
                                key: keyof { horizontal: number; vertical: number },
                            ) => any,
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        remove<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                        ): this;
                        removeIn(keyPath: Iterable<any>): this;
                        set<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            value: { horizontal: number; vertical: number }[K],
                        ): this;
                        setIn(keyPath: Iterable<any>, value: any): this;
                        toJS(): { horizontal: any; vertical: any };
                        toJSON(): { horizontal: number; vertical: number };
                        toObject(): { horizontal: number; vertical: number };
                        toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                        update<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            updater: (
                                value: { horizontal: number; vertical: number }[K],
                            ) => { horizontal: number; vertical: number }[K],
                        ): this;
                        updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                        wasAltered(): boolean;
                        withMutations(mutator: (mutable: this) => any): this;
                    };
                    zoom: | number
                    | ZoomConfiguration
                    | "AUTO"
                    | "FIT_TO_WIDTH"
                    | "FIT_TO_VIEWPORT"
                    | "CUSTOM";
                    zoomStep: number;
                },
            >
        )[]

      Returns this

    • Parameters

      • keyPath: Iterable<any>
      • ...collections: any[]

      Returns this

    • Parameters

      • merger: (
            oldVal: any,
            newVal: any,
            key: keyof {
                allowExport: boolean;
                allowPrinting: boolean;
                canScrollWhileDrawing: boolean;
                commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
                currentPageIndex: number;
                disablePointSnapping: boolean;
                enableAnnotationToolbar: boolean;
                formDesignMode: boolean;
                instance: null | NutrientViewer.Instance;
                interactionMode: IInteractionMode | null;
                keepFirstSpreadAsSinglePage: boolean;
                keepSelectedTool: boolean;
                layoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                pageSpacing: number;
                pagesRotation: 0 | 90 | 180 | 270;
                prerenderedPageSpreads: null | number;
                previewRedactionMode: boolean;
                readOnly: boolean;
                resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
                showAIAssistant: boolean;
                showAnnotationNotes: boolean;
                showAnnotations: boolean;
                showComments: boolean;
                showSignatureValidationStatus:
                    | "IF_SIGNED"
                    | "HAS_WARNINGS"
                    | "HAS_ERRORS"
                    | "NEVER";
                showToolbar: boolean;
                sidebarMode: ISidebarMode | null | undefined;
                sidebarOptions: | { [key: string]: any }
                | { ANNOTATIONS: AnnotationsSidebarOptions }
                | { LAYERS: LayersSidebarOptions }
                | { ATTACHMENTS: AttachmentsSidebarOptions };
                sidebarPlacement: "START" | "END";
                sidebarWidth: number;
                spreadSpacing: number;
                viewportPadding: {
                    horizontal: number;
                    vertical: number;
                    "[iterator]"(): IterableIterator<[(keyof ViewportPaddingProps), number]>;
                    asImmutable(): this;
                    asMutable(): this;
                    clear(): this;
                    delete<K extends keyof ViewportPaddingProps>(key: K): this;
                    deleteIn(keyPath: Iterable<any>): this;
                    equals(other: any): boolean;
                    get<K extends keyof ViewportPaddingProps>(
                        key: K,
                        notSetValue?: any,
                    ): { horizontal: number; vertical: number }[K];
                    get<T>(key: string, notSetValue: T): T;
                    getIn(keyPath: Iterable<any>): any;
                    has(key: string): key is "horizontal" | "vertical";
                    hashCode(): number;
                    hasIn(keyPath: Iterable<any>): boolean;
                    merge(
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeDeep(
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                    mergeDeepWith(
                        merger: (oldVal: any, newVal: any, key: any) => any,
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                    mergeWith(
                        merger: (
                            oldVal: any,
                            newVal: any,
                            key: keyof ViewportPaddingProps,
                        ) => any,
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    remove<K extends keyof ViewportPaddingProps>(key: K): this;
                    removeIn(keyPath: Iterable<any>): this;
                    set<K extends keyof ViewportPaddingProps>(
                        key: K,
                        value: { horizontal: number; vertical: number }[K],
                    ): this;
                    setIn(keyPath: Iterable<any>, value: any): this;
                    toJS(): { horizontal: any; vertical: any };
                    toJSON(): { horizontal: number; vertical: number };
                    toObject(): { horizontal: number; vertical: number };
                    toSeq(): Keyed<(keyof ViewportPaddingProps), number>;
                    update<K extends keyof ViewportPaddingProps>(
                        key: K,
                        updater: (
                            value: { horizontal: number; vertical: number }[K],
                        ) => { horizontal: number; vertical: number }[K],
                    ): this;
                    updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                    wasAltered(): boolean;
                    withMutations(mutator: (mutable: this) => any): this;
                };
                zoom: number | ZoomConfiguration | IZoomMode;
                zoomStep: number;
            },
        ) => any
      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    allowExport: boolean;
                    allowPrinting: boolean;
                    canScrollWhileDrawing: boolean;
                    commentDisplay: "FITTING"
                    | "POPOVER"
                    | "FLOATING";
                    currentPageIndex: number;
                    disablePointSnapping: boolean;
                    enableAnnotationToolbar: boolean;
                    formDesignMode: boolean;
                    instance: null | NutrientViewer.Instance;
                    interactionMode:
                        | null
                        | | "TEXT"
                        | "NOTE"
                        | "TEXT_HIGHLIGHTER"
                        | "INK"
                        | "INK_SIGNATURE"
                        | "SIGNATURE"
                        | "STAMP_PICKER"
                        | "STAMP_CUSTOM"
                        | "SHAPE_LINE"
                        | "SHAPE_RECTANGLE"
                        | "SHAPE_ELLIPSE"
                        | "SHAPE_POLYGON"
                        | "SHAPE_POLYLINE"
                        | "INK_ERASER"
                        | "COMMENT_MARKER"
                        | "CALLOUT"
                        | "PAN"
                        | "SEARCH"
                        | "DOCUMENT_EDITOR"
                        | "MARQUEE_ZOOM"
                        | "REDACT_TEXT_HIGHLIGHTER"
                        | "REDACT_SHAPE_RECTANGLE"
                        | "DOCUMENT_CROP"
                        | "BUTTON_WIDGET"
                        | "TEXT_WIDGET"
                        | "RADIO_BUTTON_WIDGET"
                        | "CHECKBOX_WIDGET"
                        | "COMBO_BOX_WIDGET"
                        | "LIST_BOX_WIDGET"
                        | "SIGNATURE_WIDGET"
                        | "DATE_WIDGET"
                        | "FORM_CREATOR"
                        | "LINK"
                        | "DISTANCE"
                        | "PERIMETER"
                        | "RECTANGLE_AREA"
                        | "ELLIPSE_AREA"
                        | "POLYGON_AREA"
                        | "CONTENT_EDITOR"
                        | "MULTI_ANNOTATIONS_SELECTION"
                        | "MEASUREMENT"
                        | "MEASUREMENT_SETTINGS"
                        | "ATTACHMENT_PREVIEW";
                    keepFirstSpreadAsSinglePage: boolean;
                    keepSelectedTool: boolean;
                    layoutMode: "AUTO"
                    | "SINGLE"
                    | "DOUBLE";
                    pageSpacing: number;
                    pagesRotation: 0 | 90 | 180 | 270;
                    prerenderedPageSpreads: null | number;
                    previewRedactionMode: boolean;
                    readOnly: boolean;
                    resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                    scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
                    showAIAssistant: boolean;
                    showAnnotationNotes: boolean;
                    showAnnotations: boolean;
                    showComments: boolean;
                    showSignatureValidationStatus:
                        | "IF_SIGNED"
                        | "HAS_WARNINGS"
                        | "HAS_ERRORS"
                        | "NEVER";
                    showToolbar: boolean;
                    sidebarMode: | undefined
                    | null
                    | | "CUSTOM"
                    | "ANNOTATIONS"
                    | "BOOKMARKS"
                    | "DOCUMENT_OUTLINE"
                    | "THUMBNAILS"
                    | "SIGNATURES"
                    | "LAYERS"
                    | "ATTACHMENTS"
                    | string & {};
                    sidebarOptions: | { [key: string]: any }
                    | { ANNOTATIONS: AnnotationsSidebarOptions }
                    | { LAYERS: LayersSidebarOptions }
                    | { ATTACHMENTS: AttachmentsSidebarOptions };
                    sidebarPlacement: "START" | "END";
                    sidebarWidth: number;
                    spreadSpacing: number;
                    viewportPadding: {
                        horizontal: number;
                        vertical: number;
                        "[iterator]"(): IterableIterator<
                            [keyof { horizontal: number; vertical: number }, number],
                        >;
                        asImmutable(): this;
                        asMutable(): this;
                        clear(): this;
                        delete<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                        ): this;
                        deleteIn(keyPath: Iterable<any>): this;
                        equals(other: any): boolean;
                        get<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            notSetValue?: any,
                        ): { horizontal: number; vertical: number }[K];
                        get<T>(key: string, notSetValue: T): T;
                        getIn(keyPath: Iterable<any>): any;
                        has(key: string): key is "horizontal" | "vertical";
                        hashCode(): number;
                        hasIn(keyPath: Iterable<any>): boolean;
                        merge(
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeDeep(
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                        mergeDeepWith(
                            merger: (oldVal: any, newVal: any, key: any) => any,
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                        mergeWith(
                            merger: (
                                oldVal: any,
                                newVal: any,
                                key: keyof { horizontal: number; vertical: number },
                            ) => any,
                            ...collections: (
                                | Iterable<[string, any]>
                                | Partial<{ horizontal: number; vertical: number }>
                            )[],
                        ): this;
                        remove<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                        ): this;
                        removeIn(keyPath: Iterable<any>): this;
                        set<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            value: { horizontal: number; vertical: number }[K],
                        ): this;
                        setIn(keyPath: Iterable<any>, value: any): this;
                        toJS(): { horizontal: any; vertical: any };
                        toJSON(): { horizontal: number; vertical: number };
                        toObject(): { horizontal: number; vertical: number };
                        toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                        update<K extends keyof { horizontal: number; vertical: number }>(
                            key: K,
                            updater: (
                                value: { horizontal: number; vertical: number }[K],
                            ) => { horizontal: number; vertical: number }[K],
                        ): this;
                        updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                        wasAltered(): boolean;
                        withMutations(mutator: (mutable: this) => any): this;
                    };
                    zoom: | number
                    | ZoomConfiguration
                    | "AUTO"
                    | "FIT_TO_WIDTH"
                    | "FIT_TO_VIEWPORT"
                    | "CUSTOM";
                    zoomStep: number;
                },
            >
        )[]

      Returns this

    • Type Parameters

      • K extends keyof {
            allowExport: boolean;
            allowPrinting: boolean;
            canScrollWhileDrawing: boolean;
            commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
            currentPageIndex: number;
            disablePointSnapping: boolean;
            enableAnnotationToolbar: boolean;
            formDesignMode: boolean;
            instance: null | NutrientViewer.Instance;
            interactionMode: IInteractionMode | null;
            keepFirstSpreadAsSinglePage: boolean;
            keepSelectedTool: boolean;
            layoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            pageSpacing: number;
            pagesRotation: 0 | 90 | 180 | 270;
            prerenderedPageSpreads: null | number;
            previewRedactionMode: boolean;
            readOnly: boolean;
            resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
            showAIAssistant: boolean;
            showAnnotationNotes: boolean;
            showAnnotations: boolean;
            showComments: boolean;
            showSignatureValidationStatus:
                | "IF_SIGNED"
                | "HAS_WARNINGS"
                | "HAS_ERRORS"
                | "NEVER";
            showToolbar: boolean;
            sidebarMode: ISidebarMode | null | undefined;
            sidebarOptions: | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions };
            sidebarPlacement: "START" | "END";
            sidebarWidth: number;
            spreadSpacing: number;
            viewportPadding: {
                horizontal: number;
                vertical: number;
                "[iterator]"(): IterableIterator<[(keyof ViewportPaddingProps), number]>;
                asImmutable(): this;
                asMutable(): this;
                clear(): this;
                delete<K extends keyof ViewportPaddingProps>(key: K): this;
                deleteIn(keyPath: Iterable<any>): this;
                equals(other: any): boolean;
                get<K extends keyof ViewportPaddingProps>(
                    key: K,
                    notSetValue?: any,
                ): { horizontal: number; vertical: number }[K];
                get<T>(key: string, notSetValue: T): T;
                getIn(keyPath: Iterable<any>): any;
                has(key: string): key is "horizontal" | "vertical";
                hashCode(): number;
                hasIn(keyPath: Iterable<any>): boolean;
                merge(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeep(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeDeepWith(
                    merger: (oldVal: any, newVal: any, key: any) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeWith(
                    merger: (
                        oldVal: any,
                        newVal: any,
                        key: keyof ViewportPaddingProps,
                    ) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                remove<K extends keyof ViewportPaddingProps>(key: K): this;
                removeIn(keyPath: Iterable<any>): this;
                set<K extends keyof ViewportPaddingProps>(
                    key: K,
                    value: { horizontal: number; vertical: number }[K],
                ): this;
                setIn(keyPath: Iterable<any>, value: any): this;
                toJS(): { horizontal: any; vertical: any };
                toJSON(): { horizontal: number; vertical: number };
                toObject(): { horizontal: number; vertical: number };
                toSeq(): Keyed<(keyof ViewportPaddingProps), number>;
                update<K extends keyof ViewportPaddingProps>(
                    key: K,
                    updater: (
                        value: { horizontal: number; vertical: number }[K],
                    ) => { horizontal: number; vertical: number }[K],
                ): this;
                updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                wasAltered(): boolean;
                withMutations(mutator: (mutable: this) => any): this;
            };
            zoom: number | ZoomConfiguration | IZoomMode;
            zoomStep: number;
        }

      Parameters

      • key: K

      Returns this

    • Parameters

      Returns this

    • Type Parameters

      • K extends keyof {
            allowExport: boolean;
            allowPrinting: boolean;
            canScrollWhileDrawing: boolean;
            commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
            currentPageIndex: number;
            disablePointSnapping: boolean;
            enableAnnotationToolbar: boolean;
            formDesignMode: boolean;
            instance: null | NutrientViewer.Instance;
            interactionMode: IInteractionMode | null;
            keepFirstSpreadAsSinglePage: boolean;
            keepSelectedTool: boolean;
            layoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            pageSpacing: number;
            pagesRotation: 0 | 90 | 180 | 270;
            prerenderedPageSpreads: null | number;
            previewRedactionMode: boolean;
            readOnly: boolean;
            resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
            showAIAssistant: boolean;
            showAnnotationNotes: boolean;
            showAnnotations: boolean;
            showComments: boolean;
            showSignatureValidationStatus:
                | "IF_SIGNED"
                | "HAS_WARNINGS"
                | "HAS_ERRORS"
                | "NEVER";
            showToolbar: boolean;
            sidebarMode: ISidebarMode | null | undefined;
            sidebarOptions: | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions };
            sidebarPlacement: "START" | "END";
            sidebarWidth: number;
            spreadSpacing: number;
            viewportPadding: {
                horizontal: number;
                vertical: number;
                "[iterator]"(): IterableIterator<[(keyof ViewportPaddingProps), number]>;
                asImmutable(): this;
                asMutable(): this;
                clear(): this;
                delete<K extends keyof ViewportPaddingProps>(key: K): this;
                deleteIn(keyPath: Iterable<any>): this;
                equals(other: any): boolean;
                get<K extends keyof ViewportPaddingProps>(
                    key: K,
                    notSetValue?: any,
                ): { horizontal: number; vertical: number }[K];
                get<T>(key: string, notSetValue: T): T;
                getIn(keyPath: Iterable<any>): any;
                has(key: string): key is "horizontal" | "vertical";
                hashCode(): number;
                hasIn(keyPath: Iterable<any>): boolean;
                merge(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeep(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeDeepWith(
                    merger: (oldVal: any, newVal: any, key: any) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeWith(
                    merger: (
                        oldVal: any,
                        newVal: any,
                        key: keyof ViewportPaddingProps,
                    ) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                remove<K extends keyof ViewportPaddingProps>(key: K): this;
                removeIn(keyPath: Iterable<any>): this;
                set<K extends keyof ViewportPaddingProps>(
                    key: K,
                    value: { horizontal: number; vertical: number }[K],
                ): this;
                setIn(keyPath: Iterable<any>, value: any): this;
                toJS(): { horizontal: any; vertical: any };
                toJSON(): { horizontal: number; vertical: number };
                toObject(): { horizontal: number; vertical: number };
                toSeq(): Keyed<(keyof ViewportPaddingProps), number>;
                update<K extends keyof ViewportPaddingProps>(
                    key: K,
                    updater: (
                        value: { horizontal: number; vertical: number }[K],
                    ) => { horizontal: number; vertical: number }[K],
                ): this;
                updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                wasAltered(): boolean;
                withMutations(mutator: (mutable: this) => any): this;
            };
            zoom: number | ZoomConfiguration | IZoomMode;
            zoomStep: number;
        }

      Parameters

      • key: K
      • value: {
            allowExport: boolean;
            allowPrinting: boolean;
            canScrollWhileDrawing: boolean;
            commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
            currentPageIndex: number;
            disablePointSnapping: boolean;
            enableAnnotationToolbar: boolean;
            formDesignMode: boolean;
            instance: null | NutrientViewer.Instance;
            interactionMode:
                | null
                | | "TEXT"
                | "NOTE"
                | "TEXT_HIGHLIGHTER"
                | "INK"
                | "INK_SIGNATURE"
                | "SIGNATURE"
                | "STAMP_PICKER"
                | "STAMP_CUSTOM"
                | "SHAPE_LINE"
                | "SHAPE_RECTANGLE"
                | "SHAPE_ELLIPSE"
                | "SHAPE_POLYGON"
                | "SHAPE_POLYLINE"
                | "INK_ERASER"
                | "COMMENT_MARKER"
                | "CALLOUT"
                | "PAN"
                | "SEARCH"
                | "DOCUMENT_EDITOR"
                | "MARQUEE_ZOOM"
                | "REDACT_TEXT_HIGHLIGHTER"
                | "REDACT_SHAPE_RECTANGLE"
                | "DOCUMENT_CROP"
                | "BUTTON_WIDGET"
                | "TEXT_WIDGET"
                | "RADIO_BUTTON_WIDGET"
                | "CHECKBOX_WIDGET"
                | "COMBO_BOX_WIDGET"
                | "LIST_BOX_WIDGET"
                | "SIGNATURE_WIDGET"
                | "DATE_WIDGET"
                | "FORM_CREATOR"
                | "LINK"
                | "DISTANCE"
                | "PERIMETER"
                | "RECTANGLE_AREA"
                | "ELLIPSE_AREA"
                | "POLYGON_AREA"
                | "CONTENT_EDITOR"
                | "MULTI_ANNOTATIONS_SELECTION"
                | "MEASUREMENT"
                | "MEASUREMENT_SETTINGS"
                | "ATTACHMENT_PREVIEW";
            keepFirstSpreadAsSinglePage: boolean;
            keepSelectedTool: boolean;
            layoutMode: "AUTO"
            | "SINGLE"
            | "DOUBLE";
            pageSpacing: number;
            pagesRotation: 0 | 90 | 180 | 270;
            prerenderedPageSpreads: null | number;
            previewRedactionMode: boolean;
            readOnly: boolean;
            resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
            showAIAssistant: boolean;
            showAnnotationNotes: boolean;
            showAnnotations: boolean;
            showComments: boolean;
            showSignatureValidationStatus:
                | "IF_SIGNED"
                | "HAS_WARNINGS"
                | "HAS_ERRORS"
                | "NEVER";
            showToolbar: boolean;
            sidebarMode: | undefined
            | null
            | | "CUSTOM"
            | "ANNOTATIONS"
            | "BOOKMARKS"
            | "DOCUMENT_OUTLINE"
            | "THUMBNAILS"
            | "SIGNATURES"
            | "LAYERS"
            | "ATTACHMENTS"
            | string & {};
            sidebarOptions: | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions };
            sidebarPlacement: "START" | "END";
            sidebarWidth: number;
            spreadSpacing: number;
            viewportPadding: {
                horizontal: number;
                vertical: number;
                "[iterator]"(): IterableIterator<
                    [keyof { horizontal: number; vertical: number }, number],
                >;
                asImmutable(): this;
                asMutable(): this;
                clear(): this;
                delete<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                ): this;
                deleteIn(keyPath: Iterable<any>): this;
                equals(other: any): boolean;
                get<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                    notSetValue?: any,
                ): { horizontal: number; vertical: number }[K];
                get<T>(key: string, notSetValue: T): T;
                getIn(keyPath: Iterable<any>): any;
                has(key: string): key is "horizontal" | "vertical";
                hashCode(): number;
                hasIn(keyPath: Iterable<any>): boolean;
                merge(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeep(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeDeepWith(
                    merger: (oldVal: any, newVal: any, key: any) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeWith(
                    merger: (
                        oldVal: any,
                        newVal: any,
                        key: keyof { horizontal: number; vertical: number },
                    ) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                remove<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                ): this;
                removeIn(keyPath: Iterable<any>): this;
                set<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                    value: { horizontal: number; vertical: number }[K],
                ): this;
                setIn(keyPath: Iterable<any>, value: any): this;
                toJS(): { horizontal: any; vertical: any };
                toJSON(): { horizontal: number; vertical: number };
                toObject(): { horizontal: number; vertical: number };
                toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                update<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                    updater: (
                        value: { horizontal: number; vertical: number }[K],
                    ) => { horizontal: number; vertical: number }[K],
                ): this;
                updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                wasAltered(): boolean;
                withMutations(mutator: (mutable: this) => any): this;
            };
            zoom: | number
            | ZoomConfiguration
            | "AUTO"
            | "FIT_TO_WIDTH"
            | "FIT_TO_VIEWPORT"
            | "CUSTOM";
            zoomStep: number;
        }[K]

      Returns this

    • Parameters

      Returns this

    • Deeply converts this Record to equivalent native JavaScript Object.

      Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.

      Returns {
          allowExport: any;
          allowPrinting: any;
          canScrollWhileDrawing: any;
          commentDisplay: any;
          currentPageIndex: any;
          disablePointSnapping: any;
          enableAnnotationToolbar: any;
          formDesignMode: any;
          instance: any;
          interactionMode: any;
          keepFirstSpreadAsSinglePage: any;
          keepSelectedTool: any;
          layoutMode: any;
          pageSpacing: any;
          pagesRotation: any;
          prerenderedPageSpreads: any;
          previewRedactionMode: any;
          readOnly: any;
          resolvedLayoutMode: any;
          scrollMode: any;
          showAIAssistant: any;
          showAnnotationNotes: any;
          showAnnotations: any;
          showComments: any;
          showSignatureValidationStatus: any;
          showToolbar: any;
          sidebarMode: any;
          sidebarOptions: any;
          sidebarPlacement: any;
          sidebarWidth: any;
          spreadSpacing: any;
          viewportPadding: any;
          zoom: any;
          zoomStep: any;
      }

      • allowExport: any

        Control whether or not the export PDF button in the toolbar should be disabled. If the user has insufficient permissions, the feature will automatically be disabled.

        This feature requires the download permission in the JWT.

        It is possible to remove the export PDF button with the Toolbar API.

        true
        
      • allowPrinting: any

        Control whether or not the printing button in the toolbar should be disabled. If the user has insufficient permissions, the feature will automatically be disabled.

        This feature requires the download permission in the JWT, because on some browsers we have to fall back to downloading the PDF in order to allow performant printing.

        It is possible to remove the print button with the Toolbar API.

        true
        
      • canScrollWhileDrawing: any

        This flag controls whether to enable/disable finger scrolling during Ink Drawing using a pen (safari only)

        • When set to false, (default), scrolling with the finger in drawing mode is disabled.
        • When set to true, once a pen input has been detected, finger input will result in scrolling the document.
        instance.setViewState(viewState => (
        viewState.set("canScrollWhileDrawing", true)
        ));
        false
        
      • commentDisplay: any

        Controls how comments are displayed in the viewer in desktop and tablet modes. In mobile devices, comments are always displayed in a drawer a the bottom of the viewport:

        • NutrientViewer.CommentDisplay.FITTING: Comments are displayed in a dialog or floating depending on the available viewport space. This is the default value.
        • NutrientViewer.CommentDisplay.POPOVER: Comments are displayed in a dialog next to their reference annotation marker.
        • NutrientViewer.CommentDisplay.FLOATING: Comments are displayed floating next to the page side, at the same height as their reference annotation marker, except when ViewState#zoom is set to .ZoomeMode#FIT_TO_WIDTH`, in which case they are displayed in a popover dialog instead.
      • currentPageIndex: any

        The page index of the page that's currently visible. If there is more than one page visible this will return the page that is using the most space in the viewport. The pageIndex is zero-based and has a maximum value of totalPageCount - 1.

        0
        
      • disablePointSnapping: any

        Snapping to the nearest point is enabled by default in ur SDK for measurement tools. It can be disabled by this API.

        false
        
        instance.setViewState(viewState =>
        viewState.set("disablePointSnapping", true)
        );
      • enableAnnotationToolbar: any

        Set this to false if you want NutrientViewer to disable the annotation toolbar when an annotation is being created or modified.

        true
        
      • formDesignMode: any

        This flag controls what kind of UI interaction is active for widget annotations.

        • When set to false, (default), clicking on a widget annotation will allow to modify its value.
        • When set to true, clicking on a widget annotation will select it and allow moving, resizing and deleting it using the annotation toolbar.

        This flag can only be set to true if the Form Creator component is included in the license and the current backend supports it.

        instance.setViewState(viewState => (
        viewState.set("formDesignMode", true)
        ));
        false
        
      • instance: any

        An optional reference to a mounted Instance. This is required to call the following methods on ViewState:

        • {@link ViewState#zoomIn}
        • {@link ViewState#zoomOut}
        • {@link ViewState#nextZoomLevel}
      • interactionMode: any

        Controls the current interaction mode in the viewer. When this value is changed, we will make sure that the state is properly transformed.

        If, for example, the user is currently creating an ink annotation and you change this value to InteractionMode.TEXT, we will delete the current in-memory ink annotation.

        For a list of all available mode, please refer to InteractionMode.

        If this value is null, no interaction mode will be enabled. This corresponds to the default mode that allows text selection and scrolling using the mouse wheel or scrollbars (and panning on mobile devices).

        instance.setViewState(viewState => (
        viewState.set("interactionMode", NutrientViewer.InteractionMode.PAN)
        ));
        null
        
      • keepFirstSpreadAsSinglePage: any

        When this is enabled, the first spread will always show a single page, even when LayoutMode.DOUBLE is enabled. This is useful for magazines that want to show a cover page before the regular content starts.

        A spread is a container for either one or two pages, based on the configured ViewState#layoutMode.

        false
        
      • keepSelectedTool: any

        This flag controls whether a selected tool should maintain its selected state after an annotation is created

        • When set to false, (default), after an annotation has been created the tool is not selected anymore.
        • When set to true, the tool used to create the annotation will still be selected and so it'll be possible to keep adding annotations.

        This feature is available for Note Annotation, Text Annotation, Redaction Annotation, Shape Annotation and Comments. Ink Annotation behaves like this by default, the ink tool stays selected until its deselected either programmatically or via the UI.

        instance.setViewState(viewState => (
        viewState.set("keepSelectedTool", true)
        ));
        false
        
      • layoutMode: any

        Controls how pages inside a view are displayed.

      • pageSpacing: any

        The spacing between pages in pixels. This value will adjust to the current zoom level, so when you zoom in, it does not appear fixed to the viewport. This spacing only applies for LayoutMode.DOUBLE.

        0
        
      • pagesRotation: any

        The current rotation of all pages. The value is in degrees and describes a clockwise rotation.

        Can either be 0°, 90°, 180°, or 270°. Negative values and values above 270 are normalized to one of the valid rotations.

        When a page rotation is set, the values are not persisted in the PDF. This setting only affects how the PDF is viewed in the application.

        instance.setViewState(viewState => viewState.set("pagesRotation", -450))
        // ... later
        instance.viewState.pagesRotation; // => 270
        0
        
      • prerenderedPageSpreads: any

        Number of page spreads to prerender.

        Apart from the current page, Nutrient Web SDK prerenders a specific number of page spreads before and after the current page to improve the user experience when scrolling through the document.

        A page spread is a container for either one or two pages, based on the configured layout mode. The number of prerendered page spreads is set to 5 by default, which means that Nutrient Web SDK will prerender 5 page spreads before and after the current page.

        If set to null, all the page spreads in the document will be prerendered. This setting is not recommended for large documents, as it may lead to performance issues.

        // Prerender 10 page spreads
        instance.setViewState(viewState =>
        viewState.set("prerenderedPageSpreads", 10)
        );
        // Prerender all page spreads
        instance.setViewState(viewState =>
        viewState.set("prerenderedPageSpreads", null)
        );
        5
        
      • previewRedactionMode: any

        This flag controls whether to show the marked state or redacted state for redaction annotations.

        • When set to false, (default), the marked state of redaction annotations will be shown.
        • When set to true, the redacted state of redaction annotations will be used.

        This flag can only be set to true if the Redactions component is included in the license.

        instance.setViewState(viewState => (
        viewState.set("previewRedactionMode", true)
        ));
        false
        
      • readOnly: any

        When the read only mode is activated, the UI for creating, updating and deleting annotations will be completely hidden. In addition, the user will also no longer be able to select annotations or modify form field values.

        However, it is still possible to add annotations programmatically.

        If a read only mode is specified within the JWT itself or in the PDF document permissions, and NutrientViewer.Options.IGNORE_DOCUMENT_PERMISSIONS is not set, this option cannot be unset.

        false
        
      • resolvedLayoutMode: any

        When in LayoutMode.AUTO mode, this property is set to the actual rendered layout mode, which can either be LayoutMode.SINGLE or LayoutMode.DOUBLE. It can be used to be notified when the layout mode changes while still being in LayoutMode.AUTO mode: if the rendered layout mode changes while in NutrientViewer.LayoutMode.AUTO (because of user UI interactions, for example), the viewState.change event will be dispatched, and this property will hold the updated value.

        instance.addEventListener("viewState.change", (viewState) => {
        console.log(viewState.resolvedLayoutMode);
        });
      • scrollMode: any

        Controls how pages can be scrolled.

      • showAIAssistant: any

        When this is enabled, the AI Assistant chat dialog will be shown. If this is disabled, the chat dialog will not be shown.

        NutrientViewer.load({
        initialViewState: new NutrientViewer.ViewState({
        showAIAssistant: true,
        }),
        });
        false
        
      • showAnnotationNotes: any

        When this is set to false, annotation notes will no longer be rendered.

        true
        
      • showAnnotations: any

        When this is set to false, annotations will no longer be rendered.

        This option can also be set to false, when NutrientViewer.ViewState#readOnly mode is enabled.

        true
        
      • showComments: any

        When this is set to false, comments will no longer be rendered.

        NutrientViewer ignores this value when you haven't purchased the comments component.

        true
        
      • showSignatureValidationStatus: any

        Controls when the digital signature validation UI will be shown.

        instance.setViewState(viewState => (
        viewState.set("showSignatureValidationStatus", NutrientViewer.ShowSignatureValidationStatusMode.IF_SIGNED)
        ));
      • showToolbar: any

        Set this to true if you want a toolbar for navigation and annotation controls or false if you don't.

        true
        
      • sidebarMode: any

        Controls the current sidebar mode in the viewer.

        For a list of all available mode, please refer to SidebarMode. This can also be set to a custom sidebar ID corresponding to a sidebar passed in ui.sidebar.

        If this value is null, the sidebar is hidden. This corresponds to the default mode.

        instance.setViewState(viewState => (
        viewState.set("sidebarMode", NutrientViewer.SidebarMode.THUMBNAILS)
        ));
        null
        
      • sidebarOptions: any

        Defines specific options that affect each individual sidebar.

        For a list of all available options, please refer to SidebarOptions.

        instance.setViewState(viewState => (
        viewState.set("sidebarOptions", {
        [NutrientViewer.SidebarMode.ANNOTATIONS]: {
        includeContent: [NutrientViewer.Annotations.TextAnnotation, NutrientViewer.Annotations.HighlightAnnotation]
        }
        })
        ));
      • sidebarPlacement: any

        Controls the current sidebar placement in the viewer.

        instance.setViewState(viewState => (
        viewState.set("sidebarPlacement", NutrientViewer.SidebarPlacement.END)
        ));
        null
        
      • sidebarWidth: any

        Controls the width of the sidebar in client, pixel units. Changing the ViewState.sidebarMode does not affect this value.

        The default value depends on the current viewport width: if the viewport width is less than 768px, the sidebar will take 100% of the viewport width by default. If the viewport width is greater, the sidebar will take 300px by default.

        instance.setViewState(viewState => (
        viewState.set("sidebarWidth", 400)
        ));
      • spreadSpacing: any

        The spacing between spreads in pixels. This value will adjust to the current zoom level, so when you zoom in, it does not appear fixed to the viewport. This spacing only applies for ScrollMode.CONTINUOUS.

        A spread is a container for either one or two pages, based on the configured ViewState#layoutMode.

        20
        
      • viewportPadding: any

        The padding between the viewport and the document in pixels. This value will not increase, when you zoom in.

        The horizontal value will be used as padding-left and padding-right and the vertical value for padding-top and padding-bottom. The same value for both sides will be used, this means that horizontal: 20 is equal to padding-left: 20px; padding-right: 20px;.

        When you set those values to zero, there will be no space between the viewport and the document.

        { horizontal: 20, vertical: 20 }
        
      • zoom: any

        Controls the current zoom factor. This could either be a number multiplier or a ZoomConfiguration or a ZoomMode.

        If a number value is used, it must be between Instance#minimumZoomLevel and Instance#maximumZoomLevel.

        Note: Using a ZoomMode} will override the padding set using ViewState#viewportPadding

        {
        * zoomMode: NutrientViewer.ZoomMode.AUTO,
        * wheelZoomMode: NutrientViewer.WheelZoomMode.WITH_CTRL,
        * options: {
        * enableKeyboardZoom: true,
        * enableGestureZoom: true,
        * },
        * }
      • zoomStep: any

        Controls the zoom step when zooming in or out using the toolbar buttons.

        1.25
        
        instance.setViewState(viewState => (
        viewState.set("zoomStep", 1.1)
        ));
    • Shallowly converts this Record to equivalent native JavaScript Object.

      Returns {
          allowExport: boolean;
          allowPrinting: boolean;
          canScrollWhileDrawing: boolean;
          commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
          currentPageIndex: number;
          disablePointSnapping: boolean;
          enableAnnotationToolbar: boolean;
          formDesignMode: boolean;
          instance: null | NutrientViewer.Instance;
          interactionMode:
              | null
              | | "TEXT"
              | "NOTE"
              | "TEXT_HIGHLIGHTER"
              | "INK"
              | "INK_SIGNATURE"
              | "SIGNATURE"
              | "STAMP_PICKER"
              | "STAMP_CUSTOM"
              | "SHAPE_LINE"
              | "SHAPE_RECTANGLE"
              | "SHAPE_ELLIPSE"
              | "SHAPE_POLYGON"
              | "SHAPE_POLYLINE"
              | "INK_ERASER"
              | "COMMENT_MARKER"
              | "CALLOUT"
              | "PAN"
              | "SEARCH"
              | "DOCUMENT_EDITOR"
              | "MARQUEE_ZOOM"
              | "REDACT_TEXT_HIGHLIGHTER"
              | "REDACT_SHAPE_RECTANGLE"
              | "DOCUMENT_CROP"
              | "BUTTON_WIDGET"
              | "TEXT_WIDGET"
              | "RADIO_BUTTON_WIDGET"
              | "CHECKBOX_WIDGET"
              | "COMBO_BOX_WIDGET"
              | "LIST_BOX_WIDGET"
              | "SIGNATURE_WIDGET"
              | "DATE_WIDGET"
              | "FORM_CREATOR"
              | "LINK"
              | "DISTANCE"
              | "PERIMETER"
              | "RECTANGLE_AREA"
              | "ELLIPSE_AREA"
              | "POLYGON_AREA"
              | "CONTENT_EDITOR"
              | "MULTI_ANNOTATIONS_SELECTION"
              | "MEASUREMENT"
              | "MEASUREMENT_SETTINGS"
              | "ATTACHMENT_PREVIEW";
          keepFirstSpreadAsSinglePage: boolean;
          keepSelectedTool: boolean;
          layoutMode: "AUTO"
          | "SINGLE"
          | "DOUBLE";
          pageSpacing: number;
          pagesRotation: 0 | 90 | 180 | 270;
          prerenderedPageSpreads: null | number;
          previewRedactionMode: boolean;
          readOnly: boolean;
          resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
          scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
          showAIAssistant: boolean;
          showAnnotationNotes: boolean;
          showAnnotations: boolean;
          showComments: boolean;
          showSignatureValidationStatus:
              | "IF_SIGNED"
              | "HAS_WARNINGS"
              | "HAS_ERRORS"
              | "NEVER";
          showToolbar: boolean;
          sidebarMode: | undefined
          | null
          | | "CUSTOM"
          | "ANNOTATIONS"
          | "BOOKMARKS"
          | "DOCUMENT_OUTLINE"
          | "THUMBNAILS"
          | "SIGNATURES"
          | "LAYERS"
          | "ATTACHMENTS"
          | string & {};
          sidebarOptions: | { [key: string]: any }
          | { ANNOTATIONS: AnnotationsSidebarOptions }
          | { LAYERS: LayersSidebarOptions }
          | { ATTACHMENTS: AttachmentsSidebarOptions };
          sidebarPlacement: "START" | "END";
          sidebarWidth: number;
          spreadSpacing: number;
          viewportPadding: {
              horizontal: number;
              vertical: number;
              "[iterator]"(): IterableIterator<
                  [keyof { horizontal: number; vertical: number }, number],
              >;
              asImmutable(): this;
              asMutable(): this;
              clear(): this;
              delete<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
              ): this;
              deleteIn(keyPath: Iterable<any>): this;
              equals(other: any): boolean;
              get<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  notSetValue?: any,
              ): { horizontal: number; vertical: number }[K];
              get<T>(key: string, notSetValue: T): T;
              getIn(keyPath: Iterable<any>): any;
              has(key: string): key is "horizontal" | "vertical";
              hashCode(): number;
              hasIn(keyPath: Iterable<any>): boolean;
              merge(
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeDeep(
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
              mergeDeepWith(
                  merger: (oldVal: any, newVal: any, key: any) => any,
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
              mergeWith(
                  merger: (
                      oldVal: any,
                      newVal: any,
                      key: keyof { horizontal: number; vertical: number },
                  ) => any,
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              remove<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
              ): this;
              removeIn(keyPath: Iterable<any>): this;
              set<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  value: { horizontal: number; vertical: number }[K],
              ): this;
              setIn(keyPath: Iterable<any>, value: any): this;
              toJS(): { horizontal: any; vertical: any };
              toJSON(): { horizontal: number; vertical: number };
              toObject(): { horizontal: number; vertical: number };
              toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
              update<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  updater: (
                      value: { horizontal: number; vertical: number }[K],
                  ) => { horizontal: number; vertical: number }[K],
              ): this;
              updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
              wasAltered(): boolean;
              withMutations(mutator: (mutable: this) => any): this;
          };
          zoom: | number
          | ZoomConfiguration
          | "AUTO"
          | "FIT_TO_WIDTH"
          | "FIT_TO_VIEWPORT"
          | "CUSTOM";
          zoomStep: number;
      }

      • allowExport: boolean

        Control whether or not the export PDF button in the toolbar should be disabled. If the user has insufficient permissions, the feature will automatically be disabled.

        This feature requires the download permission in the JWT.

        It is possible to remove the export PDF button with the Toolbar API.

        true
        
      • allowPrinting: boolean

        Control whether or not the printing button in the toolbar should be disabled. If the user has insufficient permissions, the feature will automatically be disabled.

        This feature requires the download permission in the JWT, because on some browsers we have to fall back to downloading the PDF in order to allow performant printing.

        It is possible to remove the print button with the Toolbar API.

        true
        
      • canScrollWhileDrawing: boolean

        This flag controls whether to enable/disable finger scrolling during Ink Drawing using a pen (safari only)

        • When set to false, (default), scrolling with the finger in drawing mode is disabled.
        • When set to true, once a pen input has been detected, finger input will result in scrolling the document.
        instance.setViewState(viewState => (
        viewState.set("canScrollWhileDrawing", true)
        ));
        false
        
      • commentDisplay: "FITTING" | "POPOVER" | "FLOATING"

        Controls how comments are displayed in the viewer in desktop and tablet modes. In mobile devices, comments are always displayed in a drawer a the bottom of the viewport:

        • NutrientViewer.CommentDisplay.FITTING: Comments are displayed in a dialog or floating depending on the available viewport space. This is the default value.
        • NutrientViewer.CommentDisplay.POPOVER: Comments are displayed in a dialog next to their reference annotation marker.
        • NutrientViewer.CommentDisplay.FLOATING: Comments are displayed floating next to the page side, at the same height as their reference annotation marker, except when ViewState#zoom is set to .ZoomeMode#FIT_TO_WIDTH`, in which case they are displayed in a popover dialog instead.
      • currentPageIndex: number

        The page index of the page that's currently visible. If there is more than one page visible this will return the page that is using the most space in the viewport. The pageIndex is zero-based and has a maximum value of totalPageCount - 1.

        0
        
      • disablePointSnapping: boolean

        Snapping to the nearest point is enabled by default in ur SDK for measurement tools. It can be disabled by this API.

        false
        
        instance.setViewState(viewState =>
        viewState.set("disablePointSnapping", true)
        );
      • enableAnnotationToolbar: boolean

        Set this to false if you want NutrientViewer to disable the annotation toolbar when an annotation is being created or modified.

        true
        
      • formDesignMode: boolean

        This flag controls what kind of UI interaction is active for widget annotations.

        • When set to false, (default), clicking on a widget annotation will allow to modify its value.
        • When set to true, clicking on a widget annotation will select it and allow moving, resizing and deleting it using the annotation toolbar.

        This flag can only be set to true if the Form Creator component is included in the license and the current backend supports it.

        instance.setViewState(viewState => (
        viewState.set("formDesignMode", true)
        ));
        false
        
      • instance: null | NutrientViewer.Instance

        An optional reference to a mounted Instance. This is required to call the following methods on ViewState:

        • {@link ViewState#zoomIn}
        • {@link ViewState#zoomOut}
        • {@link ViewState#nextZoomLevel}
      • interactionMode:
            | null
            | | "TEXT"
            | "NOTE"
            | "TEXT_HIGHLIGHTER"
            | "INK"
            | "INK_SIGNATURE"
            | "SIGNATURE"
            | "STAMP_PICKER"
            | "STAMP_CUSTOM"
            | "SHAPE_LINE"
            | "SHAPE_RECTANGLE"
            | "SHAPE_ELLIPSE"
            | "SHAPE_POLYGON"
            | "SHAPE_POLYLINE"
            | "INK_ERASER"
            | "COMMENT_MARKER"
            | "CALLOUT"
            | "PAN"
            | "SEARCH"
            | "DOCUMENT_EDITOR"
            | "MARQUEE_ZOOM"
            | "REDACT_TEXT_HIGHLIGHTER"
            | "REDACT_SHAPE_RECTANGLE"
            | "DOCUMENT_CROP"
            | "BUTTON_WIDGET"
            | "TEXT_WIDGET"
            | "RADIO_BUTTON_WIDGET"
            | "CHECKBOX_WIDGET"
            | "COMBO_BOX_WIDGET"
            | "LIST_BOX_WIDGET"
            | "SIGNATURE_WIDGET"
            | "DATE_WIDGET"
            | "FORM_CREATOR"
            | "LINK"
            | "DISTANCE"
            | "PERIMETER"
            | "RECTANGLE_AREA"
            | "ELLIPSE_AREA"
            | "POLYGON_AREA"
            | "CONTENT_EDITOR"
            | "MULTI_ANNOTATIONS_SELECTION"
            | "MEASUREMENT"
            | "MEASUREMENT_SETTINGS"
            | "ATTACHMENT_PREVIEW"

        Controls the current interaction mode in the viewer. When this value is changed, we will make sure that the state is properly transformed.

        If, for example, the user is currently creating an ink annotation and you change this value to InteractionMode.TEXT, we will delete the current in-memory ink annotation.

        For a list of all available mode, please refer to InteractionMode.

        If this value is null, no interaction mode will be enabled. This corresponds to the default mode that allows text selection and scrolling using the mouse wheel or scrollbars (and panning on mobile devices).

        instance.setViewState(viewState => (
        viewState.set("interactionMode", NutrientViewer.InteractionMode.PAN)
        ));
        null
        
      • keepFirstSpreadAsSinglePage: boolean

        When this is enabled, the first spread will always show a single page, even when LayoutMode.DOUBLE is enabled. This is useful for magazines that want to show a cover page before the regular content starts.

        A spread is a container for either one or two pages, based on the configured ViewState#layoutMode.

        false
        
      • keepSelectedTool: boolean

        This flag controls whether a selected tool should maintain its selected state after an annotation is created

        • When set to false, (default), after an annotation has been created the tool is not selected anymore.
        • When set to true, the tool used to create the annotation will still be selected and so it'll be possible to keep adding annotations.

        This feature is available for Note Annotation, Text Annotation, Redaction Annotation, Shape Annotation and Comments. Ink Annotation behaves like this by default, the ink tool stays selected until its deselected either programmatically or via the UI.

        instance.setViewState(viewState => (
        viewState.set("keepSelectedTool", true)
        ));
        false
        
      • layoutMode: "AUTO" | "SINGLE" | "DOUBLE"

        Controls how pages inside a view are displayed.

      • pageSpacing: number

        The spacing between pages in pixels. This value will adjust to the current zoom level, so when you zoom in, it does not appear fixed to the viewport. This spacing only applies for LayoutMode.DOUBLE.

        0
        
      • pagesRotation: 0 | 90 | 180 | 270

        The current rotation of all pages. The value is in degrees and describes a clockwise rotation.

        Can either be 0°, 90°, 180°, or 270°. Negative values and values above 270 are normalized to one of the valid rotations.

        When a page rotation is set, the values are not persisted in the PDF. This setting only affects how the PDF is viewed in the application.

        instance.setViewState(viewState => viewState.set("pagesRotation", -450))
        // ... later
        instance.viewState.pagesRotation; // => 270
        0
        
      • prerenderedPageSpreads: null | number

        Number of page spreads to prerender.

        Apart from the current page, Nutrient Web SDK prerenders a specific number of page spreads before and after the current page to improve the user experience when scrolling through the document.

        A page spread is a container for either one or two pages, based on the configured layout mode. The number of prerendered page spreads is set to 5 by default, which means that Nutrient Web SDK will prerender 5 page spreads before and after the current page.

        If set to null, all the page spreads in the document will be prerendered. This setting is not recommended for large documents, as it may lead to performance issues.

        // Prerender 10 page spreads
        instance.setViewState(viewState =>
        viewState.set("prerenderedPageSpreads", 10)
        );
        // Prerender all page spreads
        instance.setViewState(viewState =>
        viewState.set("prerenderedPageSpreads", null)
        );
        5
        
      • previewRedactionMode: boolean

        This flag controls whether to show the marked state or redacted state for redaction annotations.

        • When set to false, (default), the marked state of redaction annotations will be shown.
        • When set to true, the redacted state of redaction annotations will be used.

        This flag can only be set to true if the Redactions component is included in the license.

        instance.setViewState(viewState => (
        viewState.set("previewRedactionMode", true)
        ));
        false
        
      • readOnly: boolean

        When the read only mode is activated, the UI for creating, updating and deleting annotations will be completely hidden. In addition, the user will also no longer be able to select annotations or modify form field values.

        However, it is still possible to add annotations programmatically.

        If a read only mode is specified within the JWT itself or in the PDF document permissions, and NutrientViewer.Options.IGNORE_DOCUMENT_PERMISSIONS is not set, this option cannot be unset.

        false
        
      • resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE"

        When in LayoutMode.AUTO mode, this property is set to the actual rendered layout mode, which can either be LayoutMode.SINGLE or LayoutMode.DOUBLE. It can be used to be notified when the layout mode changes while still being in LayoutMode.AUTO mode: if the rendered layout mode changes while in NutrientViewer.LayoutMode.AUTO (because of user UI interactions, for example), the viewState.change event will be dispatched, and this property will hold the updated value.

        instance.addEventListener("viewState.change", (viewState) => {
        console.log(viewState.resolvedLayoutMode);
        });
      • scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED"

        Controls how pages can be scrolled.

      • showAIAssistant: boolean

        When this is enabled, the AI Assistant chat dialog will be shown. If this is disabled, the chat dialog will not be shown.

        NutrientViewer.load({
        initialViewState: new NutrientViewer.ViewState({
        showAIAssistant: true,
        }),
        });
        false
        
      • showAnnotationNotes: boolean

        When this is set to false, annotation notes will no longer be rendered.

        true
        
      • showAnnotations: boolean

        When this is set to false, annotations will no longer be rendered.

        This option can also be set to false, when NutrientViewer.ViewState#readOnly mode is enabled.

        true
        
      • showComments: boolean

        When this is set to false, comments will no longer be rendered.

        NutrientViewer ignores this value when you haven't purchased the comments component.

        true
        
      • showSignatureValidationStatus: "IF_SIGNED" | "HAS_WARNINGS" | "HAS_ERRORS" | "NEVER"

        Controls when the digital signature validation UI will be shown.

        instance.setViewState(viewState => (
        viewState.set("showSignatureValidationStatus", NutrientViewer.ShowSignatureValidationStatusMode.IF_SIGNED)
        ));
      • showToolbar: boolean

        Set this to true if you want a toolbar for navigation and annotation controls or false if you don't.

        true
        
      • sidebarMode:
            | undefined
            | null
            | | "CUSTOM"
            | "ANNOTATIONS"
            | "BOOKMARKS"
            | "DOCUMENT_OUTLINE"
            | "THUMBNAILS"
            | "SIGNATURES"
            | "LAYERS"
            | "ATTACHMENTS"
            | string & {}

        Controls the current sidebar mode in the viewer.

        For a list of all available mode, please refer to SidebarMode. This can also be set to a custom sidebar ID corresponding to a sidebar passed in ui.sidebar.

        If this value is null, the sidebar is hidden. This corresponds to the default mode.

        instance.setViewState(viewState => (
        viewState.set("sidebarMode", NutrientViewer.SidebarMode.THUMBNAILS)
        ));
        null
        
      • sidebarOptions:
            | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions }

        Defines specific options that affect each individual sidebar.

        For a list of all available options, please refer to SidebarOptions.

        instance.setViewState(viewState => (
        viewState.set("sidebarOptions", {
        [NutrientViewer.SidebarMode.ANNOTATIONS]: {
        includeContent: [NutrientViewer.Annotations.TextAnnotation, NutrientViewer.Annotations.HighlightAnnotation]
        }
        })
        ));
      • sidebarPlacement: "START" | "END"

        Controls the current sidebar placement in the viewer.

        instance.setViewState(viewState => (
        viewState.set("sidebarPlacement", NutrientViewer.SidebarPlacement.END)
        ));
        null
        
      • sidebarWidth: number

        Controls the width of the sidebar in client, pixel units. Changing the ViewState.sidebarMode does not affect this value.

        The default value depends on the current viewport width: if the viewport width is less than 768px, the sidebar will take 100% of the viewport width by default. If the viewport width is greater, the sidebar will take 300px by default.

        instance.setViewState(viewState => (
        viewState.set("sidebarWidth", 400)
        ));
      • spreadSpacing: number

        The spacing between spreads in pixels. This value will adjust to the current zoom level, so when you zoom in, it does not appear fixed to the viewport. This spacing only applies for ScrollMode.CONTINUOUS.

        A spread is a container for either one or two pages, based on the configured ViewState#layoutMode.

        20
        
      • viewportPadding: {
            horizontal: number;
            vertical: number;
            "[iterator]"(): IterableIterator<
                [keyof { horizontal: number; vertical: number }, number],
            >;
            asImmutable(): this;
            asMutable(): this;
            clear(): this;
            delete<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
            ): this;
            deleteIn(keyPath: Iterable<any>): this;
            equals(other: any): boolean;
            get<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
                notSetValue?: any,
            ): { horizontal: number; vertical: number }[K];
            get<T>(key: string, notSetValue: T): T;
            getIn(keyPath: Iterable<any>): any;
            has(key: string): key is "horizontal" | "vertical";
            hashCode(): number;
            hasIn(keyPath: Iterable<any>): boolean;
            merge(
                ...collections: (
                    | Iterable<[string, any]>
                    | Partial<{ horizontal: number; vertical: number }>
                )[],
            ): this;
            mergeDeep(
                ...collections: (
                    | Iterable<[string, any]>
                    | Partial<{ horizontal: number; vertical: number }>
                )[],
            ): this;
            mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
            mergeDeepWith(
                merger: (oldVal: any, newVal: any, key: any) => any,
                ...collections: (
                    | Iterable<[string, any]>
                    | Partial<{ horizontal: number; vertical: number }>
                )[],
            ): this;
            mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
            mergeWith(
                merger: (
                    oldVal: any,
                    newVal: any,
                    key: keyof { horizontal: number; vertical: number },
                ) => any,
                ...collections: (
                    | Iterable<[string, any]>
                    | Partial<{ horizontal: number; vertical: number }>
                )[],
            ): this;
            remove<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
            ): this;
            removeIn(keyPath: Iterable<any>): this;
            set<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
                value: { horizontal: number; vertical: number }[K],
            ): this;
            setIn(keyPath: Iterable<any>, value: any): this;
            toJS(): { horizontal: any; vertical: any };
            toJSON(): { horizontal: number; vertical: number };
            toObject(): { horizontal: number; vertical: number };
            toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
            update<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
                updater: (
                    value: { horizontal: number; vertical: number }[K],
                ) => { horizontal: number; vertical: number }[K],
            ): this;
            updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
            wasAltered(): boolean;
            withMutations(mutator: (mutable: this) => any): this;
        }

        The padding between the viewport and the document in pixels. This value will not increase, when you zoom in.

        The horizontal value will be used as padding-left and padding-right and the vertical value for padding-top and padding-bottom. The same value for both sides will be used, this means that horizontal: 20 is equal to padding-left: 20px; padding-right: 20px;.

        When you set those values to zero, there will be no space between the viewport and the document.

        { horizontal: 20, vertical: 20 }
        
        • Readonlyhorizontal: number

          The horizontal padding for left and right in pixel.

        • Readonlyvertical: number

          The vertical padding for top and bottom in pixel.

        • [iterator]: function
          • Returns IterableIterator<[keyof { horizontal: number; vertical: number }, number]>

        • asImmutable: function
          • Returns this

            Map#asImmutable

        • asMutable: function
          • Returns this

            Map#asMutable

        • clear: function
          • Returns a new instance of this Record type with all values set to their default values.

            Returns this

        • delete: function
          • Returns a new instance of this Record type with the value for the specific key set to its default value.

            Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K

            Returns this

            remove

        • deleteIn: function
          • Parameters

            Returns this

            removeIn

        • equals: function
          • Parameters

            • other: any

            Returns boolean

        • get: function
          • Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.

            If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.

            Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K
            • OptionalnotSetValue: any

            Returns { horizontal: number; vertical: number }[K]

          • Type Parameters

            • T

            Parameters

            • key: string
            • notSetValue: T

            Returns T

        • getIn: function
        • has: function
          • Parameters

            • key: string

            Returns key is "horizontal" | "vertical"

        • hashCode: function
          • Returns number

        • hasIn: function
          • Parameters

            Returns boolean

        • merge: function
          • Parameters

            • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

            Returns this

        • mergeDeep: function
          • Parameters

            • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

            Returns this

        • mergeDeepIn: function
          • Parameters

            • keyPath: Iterable<any>
            • ...collections: any[]

            Returns this

        • mergeDeepWith: function
          • Parameters

            • merger: (oldVal: any, newVal: any, key: any) => any
            • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

            Returns this

        • mergeIn: function
          • Parameters

            • keyPath: Iterable<any>
            • ...collections: any[]

            Returns this

        • mergeWith: function
          • Parameters

            • merger: (
                  oldVal: any,
                  newVal: any,
                  key: keyof { horizontal: number; vertical: number },
              ) => any
            • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

            Returns this

        • remove: function
          • Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K

            Returns this

        • removeIn: function
          • Parameters

            Returns this

        • set: function
          • Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K
            • value: { horizontal: number; vertical: number }[K]

            Returns this

        • setIn: function
          • Parameters

            Returns this

        • toJS: function
          • Deeply converts this Record to equivalent native JavaScript Object.

            Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.

            Returns { horizontal: any; vertical: any }

            • horizontal: any

              The horizontal padding for left and right in pixel.

            • vertical: any

              The vertical padding for top and bottom in pixel.

        • toJSON: function
          • Shallowly converts this Record to equivalent native JavaScript Object.

            Returns { horizontal: number; vertical: number }

            • horizontal: number

              The horizontal padding for left and right in pixel.

            • vertical: number

              The vertical padding for top and bottom in pixel.

        • toObject: function
          • Shallowly converts this Record to equivalent JavaScript Object.

            Returns { horizontal: number; vertical: number }

            • horizontal: number

              The horizontal padding for left and right in pixel.

            • vertical: number

              The vertical padding for top and bottom in pixel.

        • toSeq: function
          • Returns Keyed<keyof { horizontal: number; vertical: number }, number>

        • update: function
          • Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K
            • updater: (
                  value: { horizontal: number; vertical: number }[K],
              ) => { horizontal: number; vertical: number }[K]

            Returns this

        • updateIn: function
          • Parameters

            • keyPath: Iterable<any>
            • updater: (value: any) => any

            Returns this

        • wasAltered: function
          • Returns boolean

            Map#wasAltered

        • withMutations: function
          • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

            Parameters

            • mutator: (mutable: this) => any

            Returns this

            Map#withMutations

      • zoom:
            | number
            | ZoomConfiguration
            | "AUTO"
            | "FIT_TO_WIDTH"
            | "FIT_TO_VIEWPORT"
            | "CUSTOM"

        Controls the current zoom factor. This could either be a number multiplier or a ZoomConfiguration or a ZoomMode.

        If a number value is used, it must be between Instance#minimumZoomLevel and Instance#maximumZoomLevel.

        Note: Using a ZoomMode} will override the padding set using ViewState#viewportPadding

        {
        * zoomMode: NutrientViewer.ZoomMode.AUTO,
        * wheelZoomMode: NutrientViewer.WheelZoomMode.WITH_CTRL,
        * options: {
        * enableKeyboardZoom: true,
        * enableGestureZoom: true,
        * },
        * }
      • zoomStep: number

        Controls the zoom step when zooming in or out using the toolbar buttons.

        1.25
        
        instance.setViewState(viewState => (
        viewState.set("zoomStep", 1.1)
        ));
    • Shallowly converts this Record to equivalent JavaScript Object.

      Returns {
          allowExport: boolean;
          allowPrinting: boolean;
          canScrollWhileDrawing: boolean;
          commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
          currentPageIndex: number;
          disablePointSnapping: boolean;
          enableAnnotationToolbar: boolean;
          formDesignMode: boolean;
          instance: null | NutrientViewer.Instance;
          interactionMode:
              | null
              | | "TEXT"
              | "NOTE"
              | "TEXT_HIGHLIGHTER"
              | "INK"
              | "INK_SIGNATURE"
              | "SIGNATURE"
              | "STAMP_PICKER"
              | "STAMP_CUSTOM"
              | "SHAPE_LINE"
              | "SHAPE_RECTANGLE"
              | "SHAPE_ELLIPSE"
              | "SHAPE_POLYGON"
              | "SHAPE_POLYLINE"
              | "INK_ERASER"
              | "COMMENT_MARKER"
              | "CALLOUT"
              | "PAN"
              | "SEARCH"
              | "DOCUMENT_EDITOR"
              | "MARQUEE_ZOOM"
              | "REDACT_TEXT_HIGHLIGHTER"
              | "REDACT_SHAPE_RECTANGLE"
              | "DOCUMENT_CROP"
              | "BUTTON_WIDGET"
              | "TEXT_WIDGET"
              | "RADIO_BUTTON_WIDGET"
              | "CHECKBOX_WIDGET"
              | "COMBO_BOX_WIDGET"
              | "LIST_BOX_WIDGET"
              | "SIGNATURE_WIDGET"
              | "DATE_WIDGET"
              | "FORM_CREATOR"
              | "LINK"
              | "DISTANCE"
              | "PERIMETER"
              | "RECTANGLE_AREA"
              | "ELLIPSE_AREA"
              | "POLYGON_AREA"
              | "CONTENT_EDITOR"
              | "MULTI_ANNOTATIONS_SELECTION"
              | "MEASUREMENT"
              | "MEASUREMENT_SETTINGS"
              | "ATTACHMENT_PREVIEW";
          keepFirstSpreadAsSinglePage: boolean;
          keepSelectedTool: boolean;
          layoutMode: "AUTO"
          | "SINGLE"
          | "DOUBLE";
          pageSpacing: number;
          pagesRotation: 0 | 90 | 180 | 270;
          prerenderedPageSpreads: null | number;
          previewRedactionMode: boolean;
          readOnly: boolean;
          resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
          scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
          showAIAssistant: boolean;
          showAnnotationNotes: boolean;
          showAnnotations: boolean;
          showComments: boolean;
          showSignatureValidationStatus:
              | "IF_SIGNED"
              | "HAS_WARNINGS"
              | "HAS_ERRORS"
              | "NEVER";
          showToolbar: boolean;
          sidebarMode: | undefined
          | null
          | | "CUSTOM"
          | "ANNOTATIONS"
          | "BOOKMARKS"
          | "DOCUMENT_OUTLINE"
          | "THUMBNAILS"
          | "SIGNATURES"
          | "LAYERS"
          | "ATTACHMENTS"
          | string & {};
          sidebarOptions: | { [key: string]: any }
          | { ANNOTATIONS: AnnotationsSidebarOptions }
          | { LAYERS: LayersSidebarOptions }
          | { ATTACHMENTS: AttachmentsSidebarOptions };
          sidebarPlacement: "START" | "END";
          sidebarWidth: number;
          spreadSpacing: number;
          viewportPadding: {
              horizontal: number;
              vertical: number;
              "[iterator]"(): IterableIterator<
                  [keyof { horizontal: number; vertical: number }, number],
              >;
              asImmutable(): this;
              asMutable(): this;
              clear(): this;
              delete<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
              ): this;
              deleteIn(keyPath: Iterable<any>): this;
              equals(other: any): boolean;
              get<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  notSetValue?: any,
              ): { horizontal: number; vertical: number }[K];
              get<T>(key: string, notSetValue: T): T;
              getIn(keyPath: Iterable<any>): any;
              has(key: string): key is "horizontal" | "vertical";
              hashCode(): number;
              hasIn(keyPath: Iterable<any>): boolean;
              merge(
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeDeep(
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
              mergeDeepWith(
                  merger: (oldVal: any, newVal: any, key: any) => any,
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
              mergeWith(
                  merger: (
                      oldVal: any,
                      newVal: any,
                      key: keyof { horizontal: number; vertical: number },
                  ) => any,
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              remove<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
              ): this;
              removeIn(keyPath: Iterable<any>): this;
              set<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  value: { horizontal: number; vertical: number }[K],
              ): this;
              setIn(keyPath: Iterable<any>, value: any): this;
              toJS(): { horizontal: any; vertical: any };
              toJSON(): { horizontal: number; vertical: number };
              toObject(): { horizontal: number; vertical: number };
              toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
              update<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  updater: (
                      value: { horizontal: number; vertical: number }[K],
                  ) => { horizontal: number; vertical: number }[K],
              ): this;
              updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
              wasAltered(): boolean;
              withMutations(mutator: (mutable: this) => any): this;
          };
          zoom: | number
          | ZoomConfiguration
          | "AUTO"
          | "FIT_TO_WIDTH"
          | "FIT_TO_VIEWPORT"
          | "CUSTOM";
          zoomStep: number;
      }

      • allowExport: boolean

        Control whether or not the export PDF button in the toolbar should be disabled. If the user has insufficient permissions, the feature will automatically be disabled.

        This feature requires the download permission in the JWT.

        It is possible to remove the export PDF button with the Toolbar API.

        true
        
      • allowPrinting: boolean

        Control whether or not the printing button in the toolbar should be disabled. If the user has insufficient permissions, the feature will automatically be disabled.

        This feature requires the download permission in the JWT, because on some browsers we have to fall back to downloading the PDF in order to allow performant printing.

        It is possible to remove the print button with the Toolbar API.

        true
        
      • canScrollWhileDrawing: boolean

        This flag controls whether to enable/disable finger scrolling during Ink Drawing using a pen (safari only)

        • When set to false, (default), scrolling with the finger in drawing mode is disabled.
        • When set to true, once a pen input has been detected, finger input will result in scrolling the document.
        instance.setViewState(viewState => (
        viewState.set("canScrollWhileDrawing", true)
        ));
        false
        
      • commentDisplay: "FITTING" | "POPOVER" | "FLOATING"

        Controls how comments are displayed in the viewer in desktop and tablet modes. In mobile devices, comments are always displayed in a drawer a the bottom of the viewport:

        • NutrientViewer.CommentDisplay.FITTING: Comments are displayed in a dialog or floating depending on the available viewport space. This is the default value.
        • NutrientViewer.CommentDisplay.POPOVER: Comments are displayed in a dialog next to their reference annotation marker.
        • NutrientViewer.CommentDisplay.FLOATING: Comments are displayed floating next to the page side, at the same height as their reference annotation marker, except when ViewState#zoom is set to .ZoomeMode#FIT_TO_WIDTH`, in which case they are displayed in a popover dialog instead.
      • currentPageIndex: number

        The page index of the page that's currently visible. If there is more than one page visible this will return the page that is using the most space in the viewport. The pageIndex is zero-based and has a maximum value of totalPageCount - 1.

        0
        
      • disablePointSnapping: boolean

        Snapping to the nearest point is enabled by default in ur SDK for measurement tools. It can be disabled by this API.

        false
        
        instance.setViewState(viewState =>
        viewState.set("disablePointSnapping", true)
        );
      • enableAnnotationToolbar: boolean

        Set this to false if you want NutrientViewer to disable the annotation toolbar when an annotation is being created or modified.

        true
        
      • formDesignMode: boolean

        This flag controls what kind of UI interaction is active for widget annotations.

        • When set to false, (default), clicking on a widget annotation will allow to modify its value.
        • When set to true, clicking on a widget annotation will select it and allow moving, resizing and deleting it using the annotation toolbar.

        This flag can only be set to true if the Form Creator component is included in the license and the current backend supports it.

        instance.setViewState(viewState => (
        viewState.set("formDesignMode", true)
        ));
        false
        
      • instance: null | NutrientViewer.Instance

        An optional reference to a mounted Instance. This is required to call the following methods on ViewState:

        • {@link ViewState#zoomIn}
        • {@link ViewState#zoomOut}
        • {@link ViewState#nextZoomLevel}
      • interactionMode:
            | null
            | | "TEXT"
            | "NOTE"
            | "TEXT_HIGHLIGHTER"
            | "INK"
            | "INK_SIGNATURE"
            | "SIGNATURE"
            | "STAMP_PICKER"
            | "STAMP_CUSTOM"
            | "SHAPE_LINE"
            | "SHAPE_RECTANGLE"
            | "SHAPE_ELLIPSE"
            | "SHAPE_POLYGON"
            | "SHAPE_POLYLINE"
            | "INK_ERASER"
            | "COMMENT_MARKER"
            | "CALLOUT"
            | "PAN"
            | "SEARCH"
            | "DOCUMENT_EDITOR"
            | "MARQUEE_ZOOM"
            | "REDACT_TEXT_HIGHLIGHTER"
            | "REDACT_SHAPE_RECTANGLE"
            | "DOCUMENT_CROP"
            | "BUTTON_WIDGET"
            | "TEXT_WIDGET"
            | "RADIO_BUTTON_WIDGET"
            | "CHECKBOX_WIDGET"
            | "COMBO_BOX_WIDGET"
            | "LIST_BOX_WIDGET"
            | "SIGNATURE_WIDGET"
            | "DATE_WIDGET"
            | "FORM_CREATOR"
            | "LINK"
            | "DISTANCE"
            | "PERIMETER"
            | "RECTANGLE_AREA"
            | "ELLIPSE_AREA"
            | "POLYGON_AREA"
            | "CONTENT_EDITOR"
            | "MULTI_ANNOTATIONS_SELECTION"
            | "MEASUREMENT"
            | "MEASUREMENT_SETTINGS"
            | "ATTACHMENT_PREVIEW"

        Controls the current interaction mode in the viewer. When this value is changed, we will make sure that the state is properly transformed.

        If, for example, the user is currently creating an ink annotation and you change this value to InteractionMode.TEXT, we will delete the current in-memory ink annotation.

        For a list of all available mode, please refer to InteractionMode.

        If this value is null, no interaction mode will be enabled. This corresponds to the default mode that allows text selection and scrolling using the mouse wheel or scrollbars (and panning on mobile devices).

        instance.setViewState(viewState => (
        viewState.set("interactionMode", NutrientViewer.InteractionMode.PAN)
        ));
        null
        
      • keepFirstSpreadAsSinglePage: boolean

        When this is enabled, the first spread will always show a single page, even when LayoutMode.DOUBLE is enabled. This is useful for magazines that want to show a cover page before the regular content starts.

        A spread is a container for either one or two pages, based on the configured ViewState#layoutMode.

        false
        
      • keepSelectedTool: boolean

        This flag controls whether a selected tool should maintain its selected state after an annotation is created

        • When set to false, (default), after an annotation has been created the tool is not selected anymore.
        • When set to true, the tool used to create the annotation will still be selected and so it'll be possible to keep adding annotations.

        This feature is available for Note Annotation, Text Annotation, Redaction Annotation, Shape Annotation and Comments. Ink Annotation behaves like this by default, the ink tool stays selected until its deselected either programmatically or via the UI.

        instance.setViewState(viewState => (
        viewState.set("keepSelectedTool", true)
        ));
        false
        
      • layoutMode: "AUTO" | "SINGLE" | "DOUBLE"

        Controls how pages inside a view are displayed.

      • pageSpacing: number

        The spacing between pages in pixels. This value will adjust to the current zoom level, so when you zoom in, it does not appear fixed to the viewport. This spacing only applies for LayoutMode.DOUBLE.

        0
        
      • pagesRotation: 0 | 90 | 180 | 270

        The current rotation of all pages. The value is in degrees and describes a clockwise rotation.

        Can either be 0°, 90°, 180°, or 270°. Negative values and values above 270 are normalized to one of the valid rotations.

        When a page rotation is set, the values are not persisted in the PDF. This setting only affects how the PDF is viewed in the application.

        instance.setViewState(viewState => viewState.set("pagesRotation", -450))
        // ... later
        instance.viewState.pagesRotation; // => 270
        0
        
      • prerenderedPageSpreads: null | number

        Number of page spreads to prerender.

        Apart from the current page, Nutrient Web SDK prerenders a specific number of page spreads before and after the current page to improve the user experience when scrolling through the document.

        A page spread is a container for either one or two pages, based on the configured layout mode. The number of prerendered page spreads is set to 5 by default, which means that Nutrient Web SDK will prerender 5 page spreads before and after the current page.

        If set to null, all the page spreads in the document will be prerendered. This setting is not recommended for large documents, as it may lead to performance issues.

        // Prerender 10 page spreads
        instance.setViewState(viewState =>
        viewState.set("prerenderedPageSpreads", 10)
        );
        // Prerender all page spreads
        instance.setViewState(viewState =>
        viewState.set("prerenderedPageSpreads", null)
        );
        5
        
      • previewRedactionMode: boolean

        This flag controls whether to show the marked state or redacted state for redaction annotations.

        • When set to false, (default), the marked state of redaction annotations will be shown.
        • When set to true, the redacted state of redaction annotations will be used.

        This flag can only be set to true if the Redactions component is included in the license.

        instance.setViewState(viewState => (
        viewState.set("previewRedactionMode", true)
        ));
        false
        
      • readOnly: boolean

        When the read only mode is activated, the UI for creating, updating and deleting annotations will be completely hidden. In addition, the user will also no longer be able to select annotations or modify form field values.

        However, it is still possible to add annotations programmatically.

        If a read only mode is specified within the JWT itself or in the PDF document permissions, and NutrientViewer.Options.IGNORE_DOCUMENT_PERMISSIONS is not set, this option cannot be unset.

        false
        
      • resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE"

        When in LayoutMode.AUTO mode, this property is set to the actual rendered layout mode, which can either be LayoutMode.SINGLE or LayoutMode.DOUBLE. It can be used to be notified when the layout mode changes while still being in LayoutMode.AUTO mode: if the rendered layout mode changes while in NutrientViewer.LayoutMode.AUTO (because of user UI interactions, for example), the viewState.change event will be dispatched, and this property will hold the updated value.

        instance.addEventListener("viewState.change", (viewState) => {
        console.log(viewState.resolvedLayoutMode);
        });
      • scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED"

        Controls how pages can be scrolled.

      • showAIAssistant: boolean

        When this is enabled, the AI Assistant chat dialog will be shown. If this is disabled, the chat dialog will not be shown.

        NutrientViewer.load({
        initialViewState: new NutrientViewer.ViewState({
        showAIAssistant: true,
        }),
        });
        false
        
      • showAnnotationNotes: boolean

        When this is set to false, annotation notes will no longer be rendered.

        true
        
      • showAnnotations: boolean

        When this is set to false, annotations will no longer be rendered.

        This option can also be set to false, when NutrientViewer.ViewState#readOnly mode is enabled.

        true
        
      • showComments: boolean

        When this is set to false, comments will no longer be rendered.

        NutrientViewer ignores this value when you haven't purchased the comments component.

        true
        
      • showSignatureValidationStatus: "IF_SIGNED" | "HAS_WARNINGS" | "HAS_ERRORS" | "NEVER"

        Controls when the digital signature validation UI will be shown.

        instance.setViewState(viewState => (
        viewState.set("showSignatureValidationStatus", NutrientViewer.ShowSignatureValidationStatusMode.IF_SIGNED)
        ));
      • showToolbar: boolean

        Set this to true if you want a toolbar for navigation and annotation controls or false if you don't.

        true
        
      • sidebarMode:
            | undefined
            | null
            | | "CUSTOM"
            | "ANNOTATIONS"
            | "BOOKMARKS"
            | "DOCUMENT_OUTLINE"
            | "THUMBNAILS"
            | "SIGNATURES"
            | "LAYERS"
            | "ATTACHMENTS"
            | string & {}

        Controls the current sidebar mode in the viewer.

        For a list of all available mode, please refer to SidebarMode. This can also be set to a custom sidebar ID corresponding to a sidebar passed in ui.sidebar.

        If this value is null, the sidebar is hidden. This corresponds to the default mode.

        instance.setViewState(viewState => (
        viewState.set("sidebarMode", NutrientViewer.SidebarMode.THUMBNAILS)
        ));
        null
        
      • sidebarOptions:
            | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions }

        Defines specific options that affect each individual sidebar.

        For a list of all available options, please refer to SidebarOptions.

        instance.setViewState(viewState => (
        viewState.set("sidebarOptions", {
        [NutrientViewer.SidebarMode.ANNOTATIONS]: {
        includeContent: [NutrientViewer.Annotations.TextAnnotation, NutrientViewer.Annotations.HighlightAnnotation]
        }
        })
        ));
      • sidebarPlacement: "START" | "END"

        Controls the current sidebar placement in the viewer.

        instance.setViewState(viewState => (
        viewState.set("sidebarPlacement", NutrientViewer.SidebarPlacement.END)
        ));
        null
        
      • sidebarWidth: number

        Controls the width of the sidebar in client, pixel units. Changing the ViewState.sidebarMode does not affect this value.

        The default value depends on the current viewport width: if the viewport width is less than 768px, the sidebar will take 100% of the viewport width by default. If the viewport width is greater, the sidebar will take 300px by default.

        instance.setViewState(viewState => (
        viewState.set("sidebarWidth", 400)
        ));
      • spreadSpacing: number

        The spacing between spreads in pixels. This value will adjust to the current zoom level, so when you zoom in, it does not appear fixed to the viewport. This spacing only applies for ScrollMode.CONTINUOUS.

        A spread is a container for either one or two pages, based on the configured ViewState#layoutMode.

        20
        
      • viewportPadding: {
            horizontal: number;
            vertical: number;
            "[iterator]"(): IterableIterator<
                [keyof { horizontal: number; vertical: number }, number],
            >;
            asImmutable(): this;
            asMutable(): this;
            clear(): this;
            delete<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
            ): this;
            deleteIn(keyPath: Iterable<any>): this;
            equals(other: any): boolean;
            get<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
                notSetValue?: any,
            ): { horizontal: number; vertical: number }[K];
            get<T>(key: string, notSetValue: T): T;
            getIn(keyPath: Iterable<any>): any;
            has(key: string): key is "horizontal" | "vertical";
            hashCode(): number;
            hasIn(keyPath: Iterable<any>): boolean;
            merge(
                ...collections: (
                    | Iterable<[string, any]>
                    | Partial<{ horizontal: number; vertical: number }>
                )[],
            ): this;
            mergeDeep(
                ...collections: (
                    | Iterable<[string, any]>
                    | Partial<{ horizontal: number; vertical: number }>
                )[],
            ): this;
            mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
            mergeDeepWith(
                merger: (oldVal: any, newVal: any, key: any) => any,
                ...collections: (
                    | Iterable<[string, any]>
                    | Partial<{ horizontal: number; vertical: number }>
                )[],
            ): this;
            mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
            mergeWith(
                merger: (
                    oldVal: any,
                    newVal: any,
                    key: keyof { horizontal: number; vertical: number },
                ) => any,
                ...collections: (
                    | Iterable<[string, any]>
                    | Partial<{ horizontal: number; vertical: number }>
                )[],
            ): this;
            remove<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
            ): this;
            removeIn(keyPath: Iterable<any>): this;
            set<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
                value: { horizontal: number; vertical: number }[K],
            ): this;
            setIn(keyPath: Iterable<any>, value: any): this;
            toJS(): { horizontal: any; vertical: any };
            toJSON(): { horizontal: number; vertical: number };
            toObject(): { horizontal: number; vertical: number };
            toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
            update<K extends keyof { horizontal: number; vertical: number }>(
                key: K,
                updater: (
                    value: { horizontal: number; vertical: number }[K],
                ) => { horizontal: number; vertical: number }[K],
            ): this;
            updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
            wasAltered(): boolean;
            withMutations(mutator: (mutable: this) => any): this;
        }

        The padding between the viewport and the document in pixels. This value will not increase, when you zoom in.

        The horizontal value will be used as padding-left and padding-right and the vertical value for padding-top and padding-bottom. The same value for both sides will be used, this means that horizontal: 20 is equal to padding-left: 20px; padding-right: 20px;.

        When you set those values to zero, there will be no space between the viewport and the document.

        { horizontal: 20, vertical: 20 }
        
        • Readonlyhorizontal: number

          The horizontal padding for left and right in pixel.

        • Readonlyvertical: number

          The vertical padding for top and bottom in pixel.

        • [iterator]: function
          • Returns IterableIterator<[keyof { horizontal: number; vertical: number }, number]>

        • asImmutable: function
          • Returns this

            Map#asImmutable

        • asMutable: function
          • Returns this

            Map#asMutable

        • clear: function
          • Returns a new instance of this Record type with all values set to their default values.

            Returns this

        • delete: function
          • Returns a new instance of this Record type with the value for the specific key set to its default value.

            Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K

            Returns this

            remove

        • deleteIn: function
          • Parameters

            Returns this

            removeIn

        • equals: function
          • Parameters

            • other: any

            Returns boolean

        • get: function
          • Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.

            If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.

            Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K
            • OptionalnotSetValue: any

            Returns { horizontal: number; vertical: number }[K]

          • Type Parameters

            • T

            Parameters

            • key: string
            • notSetValue: T

            Returns T

        • getIn: function
        • has: function
          • Parameters

            • key: string

            Returns key is "horizontal" | "vertical"

        • hashCode: function
          • Returns number

        • hasIn: function
          • Parameters

            Returns boolean

        • merge: function
          • Parameters

            • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

            Returns this

        • mergeDeep: function
          • Parameters

            • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

            Returns this

        • mergeDeepIn: function
          • Parameters

            • keyPath: Iterable<any>
            • ...collections: any[]

            Returns this

        • mergeDeepWith: function
          • Parameters

            • merger: (oldVal: any, newVal: any, key: any) => any
            • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

            Returns this

        • mergeIn: function
          • Parameters

            • keyPath: Iterable<any>
            • ...collections: any[]

            Returns this

        • mergeWith: function
          • Parameters

            • merger: (
                  oldVal: any,
                  newVal: any,
                  key: keyof { horizontal: number; vertical: number },
              ) => any
            • ...collections: (Iterable<[string, any]> | Partial<{ horizontal: number; vertical: number }>)[]

            Returns this

        • remove: function
          • Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K

            Returns this

        • removeIn: function
          • Parameters

            Returns this

        • set: function
          • Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K
            • value: { horizontal: number; vertical: number }[K]

            Returns this

        • setIn: function
          • Parameters

            Returns this

        • toJS: function
          • Deeply converts this Record to equivalent native JavaScript Object.

            Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.

            Returns { horizontal: any; vertical: any }

            • horizontal: any

              The horizontal padding for left and right in pixel.

            • vertical: any

              The vertical padding for top and bottom in pixel.

        • toJSON: function
          • Shallowly converts this Record to equivalent native JavaScript Object.

            Returns { horizontal: number; vertical: number }

            • horizontal: number

              The horizontal padding for left and right in pixel.

            • vertical: number

              The vertical padding for top and bottom in pixel.

        • toObject: function
          • Shallowly converts this Record to equivalent JavaScript Object.

            Returns { horizontal: number; vertical: number }

            • horizontal: number

              The horizontal padding for left and right in pixel.

            • vertical: number

              The vertical padding for top and bottom in pixel.

        • toSeq: function
          • Returns Keyed<keyof { horizontal: number; vertical: number }, number>

        • update: function
          • Type Parameters

            • K extends keyof { horizontal: number; vertical: number }

            Parameters

            • key: K
            • updater: (
                  value: { horizontal: number; vertical: number }[K],
              ) => { horizontal: number; vertical: number }[K]

            Returns this

        • updateIn: function
          • Parameters

            • keyPath: Iterable<any>
            • updater: (value: any) => any

            Returns this

        • wasAltered: function
          • Returns boolean

            Map#wasAltered

        • withMutations: function
          • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

            Parameters

            • mutator: (mutable: this) => any

            Returns this

            Map#withMutations

      • zoom:
            | number
            | ZoomConfiguration
            | "AUTO"
            | "FIT_TO_WIDTH"
            | "FIT_TO_VIEWPORT"
            | "CUSTOM"

        Controls the current zoom factor. This could either be a number multiplier or a ZoomConfiguration or a ZoomMode.

        If a number value is used, it must be between Instance#minimumZoomLevel and Instance#maximumZoomLevel.

        Note: Using a ZoomMode} will override the padding set using ViewState#viewportPadding

        {
        * zoomMode: NutrientViewer.ZoomMode.AUTO,
        * wheelZoomMode: NutrientViewer.WheelZoomMode.WITH_CTRL,
        * options: {
        * enableKeyboardZoom: true,
        * enableGestureZoom: true,
        * },
        * }
      • zoomStep: number

        Controls the zoom step when zooming in or out using the toolbar buttons.

        1.25
        
        instance.setViewState(viewState => (
        viewState.set("zoomStep", 1.1)
        ));
    • Returns Keyed<
          keyof {
              allowExport: boolean;
              allowPrinting: boolean;
              canScrollWhileDrawing: boolean;
              commentDisplay: "FITTING"
              | "POPOVER"
              | "FLOATING";
              currentPageIndex: number;
              disablePointSnapping: boolean;
              enableAnnotationToolbar: boolean;
              formDesignMode: boolean;
              instance: null | NutrientViewer.Instance;
              interactionMode: IInteractionMode | null;
              keepFirstSpreadAsSinglePage: boolean;
              keepSelectedTool: boolean;
              layoutMode: "AUTO" | "SINGLE" | "DOUBLE";
              pageSpacing: number;
              pagesRotation: 0 | 90 | 180 | 270;
              prerenderedPageSpreads: null | number;
              previewRedactionMode: boolean;
              readOnly: boolean;
              resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
              scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
              showAIAssistant: boolean;
              showAnnotationNotes: boolean;
              showAnnotations: boolean;
              showComments: boolean;
              showSignatureValidationStatus:
                  | "IF_SIGNED"
                  | "HAS_WARNINGS"
                  | "HAS_ERRORS"
                  | "NEVER";
              showToolbar: boolean;
              sidebarMode: ISidebarMode | null | undefined;
              sidebarOptions: | { [key: string]: any }
              | { ANNOTATIONS: AnnotationsSidebarOptions }
              | { LAYERS: LayersSidebarOptions }
              | { ATTACHMENTS: AttachmentsSidebarOptions };
              sidebarPlacement: "START" | "END";
              sidebarWidth: number;
              spreadSpacing: number;
              viewportPadding: {
                  horizontal: number;
                  vertical: number;
                  "[iterator]"(): IterableIterator<[(keyof ViewportPaddingProps), number]>;
                  asImmutable(): this;
                  asMutable(): this;
                  clear(): this;
                  delete<K extends keyof ViewportPaddingProps>(key: K): this;
                  deleteIn(keyPath: Iterable<any>): this;
                  equals(other: any): boolean;
                  get<K extends keyof ViewportPaddingProps>(
                      key: K,
                      notSetValue?: any,
                  ): { horizontal: number; vertical: number }[K];
                  get<T>(key: string, notSetValue: T): T;
                  getIn(keyPath: Iterable<any>): any;
                  has(key: string): key is "horizontal" | "vertical";
                  hashCode(): number;
                  hasIn(keyPath: Iterable<any>): boolean;
                  merge(
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeDeep(
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                  mergeDeepWith(
                      merger: (oldVal: any, newVal: any, key: any) => any,
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                  mergeWith(
                      merger: (
                          oldVal: any,
                          newVal: any,
                          key: keyof ViewportPaddingProps,
                      ) => any,
                      ...collections: (
                          | Iterable<[string, any]>
                          | Partial<{ horizontal: number; vertical: number }>
                      )[],
                  ): this;
                  remove<K extends keyof ViewportPaddingProps>(key: K): this;
                  removeIn(keyPath: Iterable<any>): this;
                  set<K extends keyof ViewportPaddingProps>(
                      key: K,
                      value: { horizontal: number; vertical: number }[K],
                  ): this;
                  setIn(keyPath: Iterable<any>, value: any): this;
                  toJS(): { horizontal: any; vertical: any };
                  toJSON(): { horizontal: number; vertical: number };
                  toObject(): { horizontal: number; vertical: number };
                  toSeq(): Keyed<(keyof ViewportPaddingProps), number>;
                  update<K extends keyof ViewportPaddingProps>(
                      key: K,
                      updater: (
                          value: { horizontal: number; vertical: number }[K],
                      ) => { horizontal: number; vertical: number }[K],
                  ): this;
                  updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                  wasAltered(): boolean;
                  withMutations(mutator: (mutable: this) => any): this;
              };
              zoom: number | ZoomConfiguration | IZoomMode;
              zoomStep: number;
          },
          | undefined
          | null
          | number
          | boolean
          | { [key: string]: any }
          | "TEXT"
          | NutrientViewer.Instance
          | "NOTE"
          | ZoomConfiguration
          | "AUTO"
          | "FIT_TO_WIDTH"
          | "FIT_TO_VIEWPORT"
          | "CUSTOM"
          | "FITTING"
          | "POPOVER"
          | "FLOATING"
          | "SINGLE"
          | "DOUBLE"
          | "CONTINUOUS"
          | "PER_SPREAD"
          | "DISABLED"
          | "TEXT_HIGHLIGHTER"
          | "INK"
          | "INK_SIGNATURE"
          | "SIGNATURE"
          | "STAMP_PICKER"
          | "STAMP_CUSTOM"
          | "SHAPE_LINE"
          | "SHAPE_RECTANGLE"
          | "SHAPE_ELLIPSE"
          | "SHAPE_POLYGON"
          | "SHAPE_POLYLINE"
          | "INK_ERASER"
          | "COMMENT_MARKER"
          | "CALLOUT"
          | "PAN"
          | "SEARCH"
          | "DOCUMENT_EDITOR"
          | "MARQUEE_ZOOM"
          | "REDACT_TEXT_HIGHLIGHTER"
          | "REDACT_SHAPE_RECTANGLE"
          | "DOCUMENT_CROP"
          | "BUTTON_WIDGET"
          | "TEXT_WIDGET"
          | "RADIO_BUTTON_WIDGET"
          | "CHECKBOX_WIDGET"
          | "COMBO_BOX_WIDGET"
          | "LIST_BOX_WIDGET"
          | "SIGNATURE_WIDGET"
          | "DATE_WIDGET"
          | "FORM_CREATOR"
          | "LINK"
          | "DISTANCE"
          | "PERIMETER"
          | "RECTANGLE_AREA"
          | "ELLIPSE_AREA"
          | "POLYGON_AREA"
          | "CONTENT_EDITOR"
          | "MULTI_ANNOTATIONS_SELECTION"
          | "MEASUREMENT"
          | "MEASUREMENT_SETTINGS"
          | "ATTACHMENT_PREVIEW"
          | "ANNOTATIONS"
          | "BOOKMARKS"
          | "DOCUMENT_OUTLINE"
          | "THUMBNAILS"
          | "SIGNATURES"
          | "LAYERS"
          | "ATTACHMENTS"
          | string & {}
          | { ANNOTATIONS: AnnotationsSidebarOptions }
          | { LAYERS: LayersSidebarOptions }
          | { ATTACHMENTS: AttachmentsSidebarOptions }
          | "START"
          | "END"
          | {
              horizontal: number;
              vertical: number;
              "[iterator]"(): IterableIterator<
                  [keyof { horizontal: number; vertical: number }, number],
              >;
              asImmutable(): this;
              asMutable(): this;
              clear(): this;
              delete<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
              ): this;
              deleteIn(keyPath: Iterable<any>): this;
              equals(other: any): boolean;
              get<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  notSetValue?: any,
              ): { horizontal: number; vertical: number }[K];
              get<T>(key: string, notSetValue: T): T;
              getIn(keyPath: Iterable<any>): any;
              has(key: string): key is "horizontal" | "vertical";
              hashCode(): number;
              hasIn(keyPath: Iterable<any>): boolean;
              merge(
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeDeep(
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
              mergeDeepWith(
                  merger: (oldVal: any, newVal: any, key: any) => any,
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
              mergeWith(
                  merger: (
                      oldVal: any,
                      newVal: any,
                      key: keyof { horizontal: number; vertical: number },
                  ) => any,
                  ...collections: (
                      | Iterable<[string, any]>
                      | Partial<{ horizontal: number; vertical: number }>
                  )[],
              ): this;
              remove<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
              ): this;
              removeIn(keyPath: Iterable<any>): this;
              set<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  value: { horizontal: number; vertical: number }[K],
              ): this;
              setIn(keyPath: Iterable<any>, value: any): this;
              toJS(): { horizontal: any; vertical: any };
              toJSON(): { horizontal: number; vertical: number };
              toObject(): { horizontal: number; vertical: number };
              toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
              update<K extends keyof { horizontal: number; vertical: number }>(
                  key: K,
                  updater: (
                      value: { horizontal: number; vertical: number }[K],
                  ) => { horizontal: number; vertical: number }[K],
              ): this;
              updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
              wasAltered(): boolean;
              withMutations(mutator: (mutable: this) => any): this;
          }
          | "IF_SIGNED"
          | "HAS_WARNINGS"
          | "HAS_ERRORS"
          | "NEVER",
      >

    • Type Parameters

      • K extends keyof {
            allowExport: boolean;
            allowPrinting: boolean;
            canScrollWhileDrawing: boolean;
            commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
            currentPageIndex: number;
            disablePointSnapping: boolean;
            enableAnnotationToolbar: boolean;
            formDesignMode: boolean;
            instance: null | NutrientViewer.Instance;
            interactionMode: IInteractionMode | null;
            keepFirstSpreadAsSinglePage: boolean;
            keepSelectedTool: boolean;
            layoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            pageSpacing: number;
            pagesRotation: 0 | 90 | 180 | 270;
            prerenderedPageSpreads: null | number;
            previewRedactionMode: boolean;
            readOnly: boolean;
            resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
            showAIAssistant: boolean;
            showAnnotationNotes: boolean;
            showAnnotations: boolean;
            showComments: boolean;
            showSignatureValidationStatus:
                | "IF_SIGNED"
                | "HAS_WARNINGS"
                | "HAS_ERRORS"
                | "NEVER";
            showToolbar: boolean;
            sidebarMode: ISidebarMode | null | undefined;
            sidebarOptions: | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions };
            sidebarPlacement: "START" | "END";
            sidebarWidth: number;
            spreadSpacing: number;
            viewportPadding: {
                horizontal: number;
                vertical: number;
                "[iterator]"(): IterableIterator<[(keyof ViewportPaddingProps), number]>;
                asImmutable(): this;
                asMutable(): this;
                clear(): this;
                delete<K extends keyof ViewportPaddingProps>(key: K): this;
                deleteIn(keyPath: Iterable<any>): this;
                equals(other: any): boolean;
                get<K extends keyof ViewportPaddingProps>(
                    key: K,
                    notSetValue?: any,
                ): { horizontal: number; vertical: number }[K];
                get<T>(key: string, notSetValue: T): T;
                getIn(keyPath: Iterable<any>): any;
                has(key: string): key is "horizontal" | "vertical";
                hashCode(): number;
                hasIn(keyPath: Iterable<any>): boolean;
                merge(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeep(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeDeepWith(
                    merger: (oldVal: any, newVal: any, key: any) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeWith(
                    merger: (
                        oldVal: any,
                        newVal: any,
                        key: keyof ViewportPaddingProps,
                    ) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                remove<K extends keyof ViewportPaddingProps>(key: K): this;
                removeIn(keyPath: Iterable<any>): this;
                set<K extends keyof ViewportPaddingProps>(
                    key: K,
                    value: { horizontal: number; vertical: number }[K],
                ): this;
                setIn(keyPath: Iterable<any>, value: any): this;
                toJS(): { horizontal: any; vertical: any };
                toJSON(): { horizontal: number; vertical: number };
                toObject(): { horizontal: number; vertical: number };
                toSeq(): Keyed<(keyof ViewportPaddingProps), number>;
                update<K extends keyof ViewportPaddingProps>(
                    key: K,
                    updater: (
                        value: { horizontal: number; vertical: number }[K],
                    ) => { horizontal: number; vertical: number }[K],
                ): this;
                updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                wasAltered(): boolean;
                withMutations(mutator: (mutable: this) => any): this;
            };
            zoom: number | ZoomConfiguration | IZoomMode;
            zoomStep: number;
        }

      Parameters

      • key: K
      • updater: (
            value: {
                allowExport: boolean;
                allowPrinting: boolean;
                canScrollWhileDrawing: boolean;
                commentDisplay: "FITTING" | "POPOVER" | "FLOATING";
                currentPageIndex: number;
                disablePointSnapping: boolean;
                enableAnnotationToolbar: boolean;
                formDesignMode: boolean;
                instance: null | NutrientViewer.Instance;
                interactionMode:
                    | null
                    | | "TEXT"
                    | "NOTE"
                    | "TEXT_HIGHLIGHTER"
                    | "INK"
                    | "INK_SIGNATURE"
                    | "SIGNATURE"
                    | "STAMP_PICKER"
                    | "STAMP_CUSTOM"
                    | "SHAPE_LINE"
                    | "SHAPE_RECTANGLE"
                    | "SHAPE_ELLIPSE"
                    | "SHAPE_POLYGON"
                    | "SHAPE_POLYLINE"
                    | "INK_ERASER"
                    | "COMMENT_MARKER"
                    | "CALLOUT"
                    | "PAN"
                    | "SEARCH"
                    | "DOCUMENT_EDITOR"
                    | "MARQUEE_ZOOM"
                    | "REDACT_TEXT_HIGHLIGHTER"
                    | "REDACT_SHAPE_RECTANGLE"
                    | "DOCUMENT_CROP"
                    | "BUTTON_WIDGET"
                    | "TEXT_WIDGET"
                    | "RADIO_BUTTON_WIDGET"
                    | "CHECKBOX_WIDGET"
                    | "COMBO_BOX_WIDGET"
                    | "LIST_BOX_WIDGET"
                    | "SIGNATURE_WIDGET"
                    | "DATE_WIDGET"
                    | "FORM_CREATOR"
                    | "LINK"
                    | "DISTANCE"
                    | "PERIMETER"
                    | "RECTANGLE_AREA"
                    | "ELLIPSE_AREA"
                    | "POLYGON_AREA"
                    | "CONTENT_EDITOR"
                    | "MULTI_ANNOTATIONS_SELECTION"
                    | "MEASUREMENT"
                    | "MEASUREMENT_SETTINGS"
                    | "ATTACHMENT_PREVIEW";
                keepFirstSpreadAsSinglePage: boolean;
                keepSelectedTool: boolean;
                layoutMode: "AUTO"
                | "SINGLE"
                | "DOUBLE";
                pageSpacing: number;
                pagesRotation: 0 | 90 | 180 | 270;
                prerenderedPageSpreads: null | number;
                previewRedactionMode: boolean;
                readOnly: boolean;
                resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
                scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
                showAIAssistant: boolean;
                showAnnotationNotes: boolean;
                showAnnotations: boolean;
                showComments: boolean;
                showSignatureValidationStatus:
                    | "IF_SIGNED"
                    | "HAS_WARNINGS"
                    | "HAS_ERRORS"
                    | "NEVER";
                showToolbar: boolean;
                sidebarMode: | undefined
                | null
                | | "CUSTOM"
                | "ANNOTATIONS"
                | "BOOKMARKS"
                | "DOCUMENT_OUTLINE"
                | "THUMBNAILS"
                | "SIGNATURES"
                | "LAYERS"
                | "ATTACHMENTS"
                | string & {};
                sidebarOptions: | { [key: string]: any }
                | { ANNOTATIONS: AnnotationsSidebarOptions }
                | { LAYERS: LayersSidebarOptions }
                | { ATTACHMENTS: AttachmentsSidebarOptions };
                sidebarPlacement: "START" | "END";
                sidebarWidth: number;
                spreadSpacing: number;
                viewportPadding: {
                    horizontal: number;
                    vertical: number;
                    "[iterator]"(): IterableIterator<
                        [keyof { horizontal: number; vertical: number }, number],
                    >;
                    asImmutable(): this;
                    asMutable(): this;
                    clear(): this;
                    delete<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                    ): this;
                    deleteIn(keyPath: Iterable<any>): this;
                    equals(other: any): boolean;
                    get<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                        notSetValue?: any,
                    ): { horizontal: number; vertical: number }[K];
                    get<T>(key: string, notSetValue: T): T;
                    getIn(keyPath: Iterable<any>): any;
                    has(key: string): key is "horizontal" | "vertical";
                    hashCode(): number;
                    hasIn(keyPath: Iterable<any>): boolean;
                    merge(
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeDeep(
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                    mergeDeepWith(
                        merger: (oldVal: any, newVal: any, key: any) => any,
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                    mergeWith(
                        merger: (
                            oldVal: any,
                            newVal: any,
                            key: keyof { horizontal: number; vertical: number },
                        ) => any,
                        ...collections: (
                            | Iterable<[string, any]>
                            | Partial<{ horizontal: number; vertical: number }>
                        )[],
                    ): this;
                    remove<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                    ): this;
                    removeIn(keyPath: Iterable<any>): this;
                    set<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                        value: { horizontal: number; vertical: number }[K],
                    ): this;
                    setIn(keyPath: Iterable<any>, value: any): this;
                    toJS(): { horizontal: any; vertical: any };
                    toJSON(): { horizontal: number; vertical: number };
                    toObject(): { horizontal: number; vertical: number };
                    toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                    update<K extends keyof { horizontal: number; vertical: number }>(
                        key: K,
                        updater: (
                            value: { horizontal: number; vertical: number }[K],
                        ) => { horizontal: number; vertical: number }[K],
                    ): this;
                    updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                    wasAltered(): boolean;
                    withMutations(mutator: (mutable: this) => any): this;
                };
                zoom: | number
                | ZoomConfiguration
                | "AUTO"
                | "FIT_TO_WIDTH"
                | "FIT_TO_VIEWPORT"
                | "CUSTOM";
                zoomStep: number;
            }[K],
        ) => {
            allowExport: boolean;
            allowPrinting: boolean;
            canScrollWhileDrawing: boolean;
            commentDisplay: "FITTING"
            | "POPOVER"
            | "FLOATING";
            currentPageIndex: number;
            disablePointSnapping: boolean;
            enableAnnotationToolbar: boolean;
            formDesignMode: boolean;
            instance: null | NutrientViewer.Instance;
            interactionMode:
                | null
                | | "TEXT"
                | "NOTE"
                | "TEXT_HIGHLIGHTER"
                | "INK"
                | "INK_SIGNATURE"
                | "SIGNATURE"
                | "STAMP_PICKER"
                | "STAMP_CUSTOM"
                | "SHAPE_LINE"
                | "SHAPE_RECTANGLE"
                | "SHAPE_ELLIPSE"
                | "SHAPE_POLYGON"
                | "SHAPE_POLYLINE"
                | "INK_ERASER"
                | "COMMENT_MARKER"
                | "CALLOUT"
                | "PAN"
                | "SEARCH"
                | "DOCUMENT_EDITOR"
                | "MARQUEE_ZOOM"
                | "REDACT_TEXT_HIGHLIGHTER"
                | "REDACT_SHAPE_RECTANGLE"
                | "DOCUMENT_CROP"
                | "BUTTON_WIDGET"
                | "TEXT_WIDGET"
                | "RADIO_BUTTON_WIDGET"
                | "CHECKBOX_WIDGET"
                | "COMBO_BOX_WIDGET"
                | "LIST_BOX_WIDGET"
                | "SIGNATURE_WIDGET"
                | "DATE_WIDGET"
                | "FORM_CREATOR"
                | "LINK"
                | "DISTANCE"
                | "PERIMETER"
                | "RECTANGLE_AREA"
                | "ELLIPSE_AREA"
                | "POLYGON_AREA"
                | "CONTENT_EDITOR"
                | "MULTI_ANNOTATIONS_SELECTION"
                | "MEASUREMENT"
                | "MEASUREMENT_SETTINGS"
                | "ATTACHMENT_PREVIEW";
            keepFirstSpreadAsSinglePage: boolean;
            keepSelectedTool: boolean;
            layoutMode: "AUTO"
            | "SINGLE"
            | "DOUBLE";
            pageSpacing: number;
            pagesRotation: 0 | 90 | 180 | 270;
            prerenderedPageSpreads: null | number;
            previewRedactionMode: boolean;
            readOnly: boolean;
            resolvedLayoutMode: "AUTO" | "SINGLE" | "DOUBLE";
            scrollMode: "CONTINUOUS" | "PER_SPREAD" | "DISABLED";
            showAIAssistant: boolean;
            showAnnotationNotes: boolean;
            showAnnotations: boolean;
            showComments: boolean;
            showSignatureValidationStatus:
                | "IF_SIGNED"
                | "HAS_WARNINGS"
                | "HAS_ERRORS"
                | "NEVER";
            showToolbar: boolean;
            sidebarMode: | undefined
            | null
            | | "CUSTOM"
            | "ANNOTATIONS"
            | "BOOKMARKS"
            | "DOCUMENT_OUTLINE"
            | "THUMBNAILS"
            | "SIGNATURES"
            | "LAYERS"
            | "ATTACHMENTS"
            | string & {};
            sidebarOptions: | { [key: string]: any }
            | { ANNOTATIONS: AnnotationsSidebarOptions }
            | { LAYERS: LayersSidebarOptions }
            | { ATTACHMENTS: AttachmentsSidebarOptions };
            sidebarPlacement: "START" | "END";
            sidebarWidth: number;
            spreadSpacing: number;
            viewportPadding: {
                horizontal: number;
                vertical: number;
                "[iterator]"(): IterableIterator<
                    [keyof { horizontal: number; vertical: number }, number],
                >;
                asImmutable(): this;
                asMutable(): this;
                clear(): this;
                delete<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                ): this;
                deleteIn(keyPath: Iterable<any>): this;
                equals(other: any): boolean;
                get<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                    notSetValue?: any,
                ): { horizontal: number; vertical: number }[K];
                get<T>(key: string, notSetValue: T): T;
                getIn(keyPath: Iterable<any>): any;
                has(key: string): key is "horizontal" | "vertical";
                hashCode(): number;
                hasIn(keyPath: Iterable<any>): boolean;
                merge(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeep(
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeDeepIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeDeepWith(
                    merger: (oldVal: any, newVal: any, key: any) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                mergeIn(keyPath: Iterable<any>, ...collections: any[]): this;
                mergeWith(
                    merger: (
                        oldVal: any,
                        newVal: any,
                        key: keyof { horizontal: number; vertical: number },
                    ) => any,
                    ...collections: (
                        | Iterable<[string, any]>
                        | Partial<{ horizontal: number; vertical: number }>
                    )[],
                ): this;
                remove<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                ): this;
                removeIn(keyPath: Iterable<any>): this;
                set<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                    value: { horizontal: number; vertical: number }[K],
                ): this;
                setIn(keyPath: Iterable<any>, value: any): this;
                toJS(): { horizontal: any; vertical: any };
                toJSON(): { horizontal: number; vertical: number };
                toObject(): { horizontal: number; vertical: number };
                toSeq(): Keyed<keyof { horizontal: number; vertical: number }, number>;
                update<K extends keyof { horizontal: number; vertical: number }>(
                    key: K,
                    updater: (
                        value: { horizontal: number; vertical: number }[K],
                    ) => { horizontal: number; vertical: number }[K],
                ): this;
                updateIn(keyPath: Iterable<any>, updater: (value: any) => any): this;
                wasAltered(): boolean;
                withMutations(mutator: (mutable: this) => any): this;
            };
            zoom: | number
            | ZoomConfiguration
            | "AUTO"
            | "FIT_TO_WIDTH"
            | "FIT_TO_VIEWPORT"
            | "CUSTOM";
            zoomStep: number;
        }[K]

      Returns this

    • Parameters

      • keyPath: Iterable<any>
      • updater: (value: any) => any

      Returns this

    • Returns boolean

      Map#wasAltered

    • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

      Parameters

      • mutator: (mutable: this) => any

      Returns this

      Map#withMutations

    • Creates a new ViewState with a specific zoom level that is 25% greater than the current zoom level.

      If a ZoomMode is set, it will overwrite it with a number value (which will no longer adopt when you resize the window).

      This method cannot be called on an instance of ViewState without an Instance assigned. You can use this method on all view states returned by Instance#viewState and Instance#setViewState.

      When the new zoom level would exceed the maximum zoom level, it will be capped at the maximum value.

      Returns NutrientViewer.ViewState

      New ViewState with an updated zoom property.

      instance.setViewState(viewState => viewState.zoomIn())
      

      When this method is called on a self-constructed instance of ViewState.

    • Creates a new ViewState with a specific zoom level that is 25% lower than the current zoom level.

      If a ZoomMode is set, it will overwrite it with a number value (which will no longer adopt when you resize the window).

      This method cannot be called on an instance of ViewState without an Instance assigned. You can use this method on all view states returned by Instance#viewState and Instance#setViewState.

      When the new zoom level would undercut the minimum zoom level, it will be capped at the minimum value.

      Returns NutrientViewer.ViewState

      New ViewState with an updated zoom property.

      instance.setViewState(viewState => viewState.zoomOut())
      

      When this method is called on a self-constructed instance of ViewState.