WebViewConfiguration class

Web-specific viewer configuration options.

Passed as NutrientViewConfiguration.webConfig. All fields are optional; unset fields use the PSPDFKit Web SDK's built-in defaults.

Properties map directly to keys in the PSPDFKit.load() configuration object or to the initialViewState sub-object as noted in each field's documentation.

Constructors

WebViewConfiguration({bool? showToolbar, bool? showAnnotations, bool? showAnnotationNotes, bool? showComments, bool? readOnly, bool? enableAnnotationToolbar, SidebarMode? sidebarMode, NutrientWebInteractionMode? interactionMode, dynamic zoom, double? zoomStep, num? spreadSpacing, double? pageSpacing, num? viewportPadding, bool? allowPrinting, bool? canScrollWhileDrawing, bool? keepFirstSpreadAsSinglePage, bool? keepSelectedTool, bool? formDesignMode, bool? previewRedactionMode, ShowSignatureValidationStatusMode? showSignatureValidationStatus, num? pageRotation, String? password, String? theme, AutoSaveMode? autoSaveMode, bool? disableTextSelection, bool? disableForms, bool? disableHighQualityPrinting, bool? disableMultiSelection, bool? disableOpenParameters, bool? disableWebAssemblyStreaming, num? minDefaultZoomLevel, num? maxDefaultZoomLevel, bool? headless, String? locale, ToolbarPlacement? toolbarPlacement, List<String>? styleSheets, List? editableAnnotationTypes, bool? enableHistory, bool? enableAutomaticLinkExtraction, bool? enableClipboardActions, bool? enableServiceWorkerSupport, bool? preventTextCopy, bool? restrictAnnotationToPageBounds, num? autoCloseThreshold, num? overrideMemoryLimit, num? standaloneInstancesPoolSize, num? maxPasswordRetries, num? maxMentionSuggestions, List? customFonts, List? stampAnnotationTemplates, List<String>? formFieldsNotSavingSignatures, List? mentionableUsers, List? documentEditorFooterItems, List? documentEditorToolbarItems, Map<String, dynamic>? printOptions, String? baseCoreUrl, String? baseUrl, bool? useCDN, String? container, String? xfdf, bool? xfdfKeepCurrentAnnotations, OfficeConversionSettings? officeConversionSettings, List<NutrientWebToolbarItem>? toolbarItems, NutrientWebAnnotationToolbarItemsCallback? annotationToolbarItems, dynamic customRenderers, dynamic customUIConfiguration, dynamic electronicSignatures})
const

Properties

allowPrinting → bool?
Whether printing is allowed from the viewer. Corresponds to initialViewState.allowPrinting.
final
annotationToolbarItems → NutrientWebAnnotationToolbarItemsCallback?
Callback that returns the annotation toolbar items for a given annotation type.
final
autoCloseThreshold → num?
Seconds of inactivity before the document is automatically closed. Corresponds to autoCloseThreshold.
final
autoSaveMode → AutoSaveMode?
Auto-save behaviour. Corresponds to autoSaveMode.
final
baseCoreUrl → String?
Base URL for loading the PSPDFKit Core WASM assets. Corresponds to baseCoreUrl.
final
baseUrl → String?
Base URL prefix for resolving relative asset paths. Corresponds to baseUrl.
final
canScrollWhileDrawing → bool?
Whether the user can scroll the document while drawing an annotation. Corresponds to initialViewState.canScrollWhileDrawing.
final
container → String?
CSS selector for the HTML element that hosts the viewer. Corresponds to container.
final
customFonts → List?
Custom font definitions to load. Corresponds to customFonts.
final
customRenderers → dynamic
Custom annotation/page renderers (JS object pass-through).
final
customUIConfiguration → dynamic
Custom UI configuration object (JS object pass-through).
final
disableForms → bool?
Disable form field interaction. Corresponds to disableForms.
final
disableHighQualityPrinting → bool?
Disable high-quality printing optimisations. Corresponds to disableHighQualityPrinting.
final
disableMultiSelection → bool?
Disable multi-annotation selection. Corresponds to disableMultiSelection.
final
disableOpenParameters → bool?
Disable processing of PDF open parameters from the URL. Corresponds to disableOpenParameters.
final
disableTextSelection → bool?
Disable text selection in the viewer. Corresponds to disableTextSelection.
final
disableWebAssemblyStreaming → bool?
Disable WebAssembly streaming compilation. Corresponds to disableWebAssemblyStreaming.
final
documentEditorFooterItems → List?
Items shown in the document editor footer. Corresponds to documentEditorFooterItems.
final
documentEditorToolbarItems → List?
Items shown in the document editor toolbar. Corresponds to documentEditorToolbarItems.
final
editableAnnotationTypes → List?
Annotation types the user is allowed to create/edit. Corresponds to editableAnnotationTypes.
final
electronicSignatures → dynamic
Electronic signatures configuration (JS object pass-through).
final
enableAnnotationToolbar → bool?
Show or hide the annotation toolbar. Corresponds to initialViewState.enableAnnotationToolbar.
final
enableAutomaticLinkExtraction → bool?
Automatically extract and linkify URLs in text. Corresponds to enableAutomaticLinkExtraction.
final
enableClipboardActions → bool?
Enable clipboard cut/copy/paste for annotations. Corresponds to enableClipboardActions.
final
enableHistory → bool?
Enable undo/redo history. Corresponds to enableHistory.
final
enableServiceWorkerSupport → bool?
Enable service-worker caching for offline support. Corresponds to enableServiceWorkerSupport.
final
formDesignMode → bool?
Enable form design / editing mode. Corresponds to initialViewState.formDesignMode.
final
formFieldsNotSavingSignatures → List<String>?
Form field names whose signatures should not be persisted. Corresponds to formFieldsNotSavingSignatures.
final
hashCode → int
The hash code for this object.
no setterinherited
headless → bool?
Run the viewer without a UI (no toolbar, no overlays). Corresponds to headless.
final
interactionMode → NutrientWebInteractionMode?
The active interaction / tool mode on load. Corresponds to initialViewState.interactionMode.
final
keepFirstSpreadAsSinglePage → bool?
Keep the first page as a single page in double-page mode. Corresponds to initialViewState.keepFirstSpreadAsSinglePage.
final
keepSelectedTool → bool?
Keep the currently selected annotation tool active after use. Corresponds to initialViewState.keepSelectedTool.
final
locale → String?
BCP-47 locale string for the viewer UI (e.g. 'en', 'de'). Corresponds to locale.
final
maxDefaultZoomLevel → num?
Maximum zoom level as a scale factor. Corresponds to maxDefaultZoomLevel.
final
maxMentionSuggestions → num?
Maximum number of @mention suggestions shown in a comment. Corresponds to maxMentionSuggestions.
final
maxPasswordRetries → num?
Maximum number of password retry attempts. Corresponds to maxPasswordRetries.
final
mentionableUsers → List?
Users available for @mention in comments. Corresponds to mentionableUsers.
final
minDefaultZoomLevel → num?
Minimum zoom level as a scale factor. Corresponds to minDefaultZoomLevel.
final
officeConversionSettings → OfficeConversionSettings?
Office document conversion settings (spreadsheet dimensions, etc.).
final
overrideMemoryLimit → num?
Override the WebAssembly memory limit in bytes. Corresponds to overrideMemoryLimit.
final
pageRotation → num?
Initial page rotation in degrees (0, 90, 180, 270). Corresponds to initialViewState.pagesRotation.
final
pageSpacing → double?
Spacing between individual pages in CSS pixels. Corresponds to initialViewState.pageSpacing.
final
password → String?
Document password for encrypted PDFs.
final
preventTextCopy → bool?
Prevent the user from copying text from the document. Corresponds to preventTextCopy.
final
previewRedactionMode → bool?
Show a preview of the redaction overlay before applying. Corresponds to initialViewState.previewRedactionMode.
final
printOptions → Map<String, dynamic>?
Print configuration options. Corresponds to printOptions.
final
readOnly → bool?
Put the viewer into read-only mode (no annotation creation or editing). Corresponds to initialViewState.readOnly.
final
restrictAnnotationToPageBounds → bool?
Restrict annotation placement to within page bounds. Corresponds to restrictAnnotationToPageBounds.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showAnnotationNotes → bool?
Show annotation note indicators. Corresponds to initialViewState.showAnnotationNotes.
final
showAnnotations → bool?
Show or hide all annotations. Corresponds to initialViewState.showAnnotations.
final
showComments → bool?
Show Instant collaboration comments. Corresponds to initialViewState.showComments.
final
showSignatureValidationStatus → ShowSignatureValidationStatusMode?
When to show the digital signature validation status badge. Corresponds to initialViewState.showSignatureValidationStatus.
final
showToolbar → bool?
Show or hide the main toolbar. Corresponds to initialViewState.showToolbar.
final
sidebarMode → SidebarMode?
The sidebar panel shown on load. Corresponds to initialViewState.sidebarMode.
final
spreadSpacing → num?
Spacing between page spreads in CSS pixels. Corresponds to initialViewState.spreadSpacing.
final
stampAnnotationTemplates → List?
Stamp annotation template definitions. Corresponds to stampAnnotationTemplates.
final
standaloneInstancesPoolSize → num?
Number of pre-warmed standalone viewer instances in the pool. Corresponds to standaloneInstancesPoolSize.
final
styleSheets → List<String>?
Additional CSS stylesheet URLs loaded into the viewer iframe. Corresponds to styleSheets.
final
theme → String?
The viewer colour theme. Prefer NutrientViewConfiguration.appearanceMode for cross-platform theming; this field lets you pass a raw Web SDK theme string ('DARK', 'LIGHT', 'AUTO') when needed.
final
toolbarItems → List<NutrientWebToolbarItem>?
The items shown in the main toolbar. When null the SDK default set is used.
final
toolbarPlacement → ToolbarPlacement?
Where the main toolbar is placed. Corresponds to toolbarPlacement.
final
useCDN → bool?
Whether to load SDK assets from the Nutrient CDN. Corresponds to useCDN.
final
viewportPadding → num?
Padding between the viewport edge and the document. Corresponds to initialViewState.viewportPadding.
final
xfdf → String?
An XFDF string to import into the document on load. Corresponds to xfdf.
final
xfdfKeepCurrentAnnotations → bool?
Whether to keep existing annotations when importing xfdf. Corresponds to xfdfKeepCurrentAnnotations.
final
zoom → dynamic
Initial zoom level. Can be a num scale factor or a ZoomMode constant. Corresponds to initialViewState.zoom.
final
zoomStep → double?
Amount the zoom changes per zoom step. Corresponds to initialViewState.zoomStep.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBuilderMap() → Map<String, dynamic>
Serializes this configuration into a map with two keys — 'viewState' and 'topLevel' — consumed by WebConfigurationBuilder.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited