Interface reference
Learn about available options for various configurable parameters in the PDF Viewer SDK reference documentation.
Enumerations
PdfPageLayoutMode
| Name | Description |
|---|---|
| SINGLE_PAGE | Display a sinlge page at a time. |
| ONE_COLUMN | Display a column of pages. |
| TWO_COLUMN_LEFT | Display pages as two columns next to each other. The first page is on the left. |
| TWO_COLUMN_RIGHT | Display pages as two columns next to each other. The first page is on the right. |
| TWO_PAGE_LEFT | Display two pages next to each other. The first page is on the left. |
| TWO_PAGE_RIGHT | Display two pages next to each other. The first page is on the right. |
StampAnnotationColor
| Name | Description |
|---|---|
| GREEN | The stamp annotation has green color. |
| RED | The stamp annotation has red color. |
| BLUE | The stamp annotation has blue color |
WebViewerOptions
The PDF Viewer SDK lets you configure many options in its index.html.
viewer
viewer.general
viewer.general.userSet the name of the user.- Type:
string - Default value:
''(No user set)
- Type:
viewer.general.languageSet language of the tooltips as a two letter language code. See also Custom translations.- Type:
string - Allowed values:
'en','de','fr','it'and custom languages. - Default value
'en'
- Type:
viewer.general.promptOnUnsavedChangeIf an opened document has unsaved changes and a user presses the open or close buttons the PDF Viewer SDK displays an unsaved changes dialog box. Surpress the dialog box by setting the boolean value ofviewer.general.promptOnUnsavedChangetofalse.- Type:
boolean - Default value:
true
- Type:
viewer.general.pageShadowDefine the page shadow. The color is a CSS color string. The unit of the other values are in screen pixel.- Type:
[CanvasShadowStyles](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/shadowBlur) - Default: not set
- Example:
CanvasShadowStyles {
shadowBlur: number;
shadowColor: string;
shadowOffsetX: number;
shadowOffsetY: number;
}
- Type:
viewer.general.pageShadowDefine the page shadow for the current page. The color is a CSS color string. The unit of the other values are in screen pixel.- Type:
[CanvasShadowStyles](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/shadowBlur) - Default: not set
- Example:
CanvasShadowStyles {
shadowBlur: number;
shadowColor: string;
shadowOffsetX: number;
shadowOffsetY: number;
}
- Type:
viewer.general.tooltipsTooltips can be turned on with'title'and turned off with'none'. If you want use your own CSS stylesheet to configure the tooltips, set'css'.- Type:
string - Allowed values:
'none','title','css' - Default value:
'title'
- Type:
viewer.general.hidePasswordFormCancelButtonHide the Cancel button in the password dialog for password-protected PDFs.- Type:
boolean - Default value:
false
- Type:
viewer.sidebar
viewer.sidebar.thumbnailNavigationDefine if thumbnails are visible in the Information pane.- Type:
boolean - Default value:
true
- Type:
viewer.sidebar.outlineNavigationDefine if outlines are visible in the Information pane.- Type:
boolean - Default value:
true
- Type:
viewer.sidebar.annotationNavigationDefine whether annotations are visible in the Information pane.- Type:
boolean|object - Default value:
true
- Type:
viewer.sidebar.annotationNavigation.textMarkup.previewDefine if the preview for text markup annotations is enabled in the Information pane.- Type:
string - Allowed values:
'none','short' - Default value:
'none'
- Type:
viewer.permissions
viewer.permissions.allowFileDropSpecify if the files can be opened with drag and drop.- Type:
boolean - Default value:
true
- Type:
viewer.permissions.allowSaveFileSpecify if the files can be saved.- Type:
boolean - Default value:
true
- Type:
viewer.permissions.allowCloseFileSpecify if the files can be closed.- Type:
boolean - Default value:
false
- Type:
viewer.permissions.allowOpenFileSpecify if the files can be opened.- Type:
boolean - Default value:
true
- Type:
viewer.permissions.allowPrintingSpecify if the files can be printed.- Type:
boolean - Default value:
false
- Type:
viewer.permissions.allowExternalLinksSpecifies whether external links in the document are interactive.- Type:
boolean - Default value:
true
- Type:
viewer.permissions.enableSearchSet if a file can be searched.- Type:
boolean - Default value:
true
- Type:
viewer.customButtons
For initial information and examples, review Custom buttons documentation.
viewer.customButtons.documentbarAdd buttons to the Document bar.- Type:
CustomButton[] - Default value: empty array
- Type:
viewer.customButtons.informationbarAdd buttons to the Information pane.- Type:
CustomButton[] - Default value: empty array
- Type:
viewer.permissions.allowCloseFileAdd buttons to the Annotation bar.- Type:
CustomButton[] - Default value: empty array
- Type:
annotation
annotation.defaultStampWidthSet a width of the Stamp annotation when it is created. The units used are in PDF points. Size of one point is 1/72 inch, or one inch is 72 points.- Type:
number - Default value:
120
- Type:
annotation.hideAnnotationSubjectAnnotation subject is not visible.- Type:
boolean - Default value:
false
- Type:
annotation.hideOnDeleteIf set astrueand a user deletes an annotation, the annotation is flagged as hidden and not deleted. If set asfalsethe annotation is deleted if a user deletes an annotation.- Type:
boolean - Default value:
false
- Type:
annotation.onlyAuthorCanEditChanges to annotations can only be applied when the current user is the author of the annotation.- Type:
boolean - Default value:
false
- Type:
shortcuts
For general information and examples, review Keyboard shortcuts.
shortcuts.zoomInZoom in a document.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: '+' }
- Type:
shortcuts.zoomOutZoom out in a document.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: '-' }
- Type:
shortcuts.nextPageNext page.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'PageDown' }
- Type:
shortcuts.previousPagePrevious page.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'PageUp' }
- Type:
shortcuts.firstPageGo to the first page.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'Home' }
- Type:
shortcuts.lastPageGo to the last page.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'End' }
- Type:
shortcuts.scrollUpScroll up.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'ArrowUp' }
- Type:
shortcuts.scrollDownScroll down.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'ArrowDown' }
- Type:
shortcuts.scrollLeftScroll left.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'ArrowLeft' }
- Type:
shortcuts.scrollRightScroll right.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'ArrowRight' }
- Type:
shortcuts.releaseSelectionRelease selection.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'Escape' }
- Type:
shortcuts.copyCopy selected text.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'c', ctrlKey: 'true' }
- Type:
shortcuts.printOpen print dialog.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'p', ctrlKey: 'true' }
- Type:
shortcuts.cancelPrintCancel printing.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'Escape' }
- Type:
shortcuts.resetZoomZoom to 100%.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'z', altKey: true }
- Type:
shortcuts.fitToPageFit to page.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'p', altKey: true }
- Type:
shortcuts.fitToWidthFit to width.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'w', altKey: true }
- Type:
shortcuts.rotateViewRotate view.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'r', altKey: true }
- Type:
shortcuts.saveSave or save callback.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 's', ctrlKey: true }
- Type:
shortcuts.searchSearch.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'f', ctrlKey: true }
- Type:
shortcuts.searchNextNext search match.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'F3' }
- Type:
shortcuts.searchPreviousPrevious search match.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'F3', shiftKey: true }
- Type:
shortcuts.closeSearchClose search.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'Escape' }
- Type:
shortcuts.toggleSidePaneToggle side pane.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 's', altKey: true }
- Type:
shortcuts.showAnnotationsDisplay annotation pane.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'a', altKey: true }
- Type:
shortcuts.showOutlineDisplay outline pane.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'o', altKey: true }
- Type:
shortcuts.showThumbnailsDisplay thumbnails pane.- Type:
KeyboardShortcutBindingReview Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 't', altKey: true }
- Type: