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.user
Set the name of the user.- Type:
string
- Default value:
''
(No user set)
- Type:
viewer.general.language
Set 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.promptOnUnsavedChange
If 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.promptOnUnsavedChange
tofalse
.- Type:
boolean
- Default value:
true
- Type:
viewer.general.pageShadow
Define 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.pageShadow
Define 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.tooltips
Tooltips 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.sidebar
viewer.sidebar.thumbnailNavigation
Define if thumbnails are visible in the Information pane.- Type:
boolean
- Default value:
true
- Type:
viewer.sidebar.outlineNavigation
Define if outlines are visible in the Information pane.- Type:
boolean
- Default value:
true
- Type:
viewer.sidebar.annotationNavigation
Define whether annotations are visible in the Information pane.- Type:
boolean
|object
- Default value:
true
- Type:
viewer.sidebar.annotationNavigation.textMarkup.preview
Define 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.allowFileDrop
Specify if the files can be opened with drag and drop.- Type:
boolean
- Default value:
true
- Type:
viewer.permissions.allowSaveFile
Specify if the files can be saved.- Type:
boolean
- Default value:
true
- Type:
viewer.permissions.allowCloseFile
Specify if the files can be closed.- Type:
boolean
- Default value:
false
- Type:
viewer.permissions.allowOpenFile
Specify if the files can be opened.- Type:
boolean
- Default value:
true
- Type:
viewer.permissions.allowPrinting
Specify if the files can be printed.- Type:
boolean
- Default value:
false
- Type:
viewer.permissions.enableSearch
Set 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.documentbar
Add buttons to the Document bar.- Type:
CustomButton[]
- Default value: empty array
- Type:
viewer.customButtons.informationbar
Add buttons to the Information pane.- Type:
CustomButton[]
- Default value: empty array
- Type:
viewer.permissions.allowCloseFile
Add buttons to the Annotation bar.- Type:
CustomButton[]
- Default value: empty array
- Type:
annotation
annotation.defaultStampWidth
Set 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.hideAnnotationSubject
Annotation subject is not visible.- Type:
boolean
- Default value:
false
- Type:
annotation.hideOnDelete
If set astrue
and a user deletes an annotation, the annotation is flagged as hidden and not deleted. If set asfalse
the annotation is deleted if a user deletes an annotation.- Type:
boolean
- Default value:
false
- Type:
annotation.onlyAuthorCanEdit
Changes 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.zoomIn
Zoom in a document.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: '+' }
- Type:
shortcuts.zoomOut
Zoom out in a document.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: '-' }
- Type:
shortcuts.nextPage
Next page.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'PageDown' }
- Type:
shortcuts.previousPage
Previous page.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'PageUp' }
- Type:
shortcuts.firstPage
Go to the first page.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'Home' }
- Type:
shortcuts.lastPage
Go to the last page.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'End' }
- Type:
shortcuts.scrollUp
Scroll up.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'ArrowUp' }
- Type:
shortcuts.scrollDown
Scroll down.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'ArrowDown' }
- Type:
shortcuts.scrollLeft
Scroll left.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'ArrowLeft' }
- Type:
shortcuts.scrollRight
Scroll right.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'ArrowRight' }
- Type:
shortcuts.releaseSelection
Release selection.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'Escape' }
- Type:
shortcuts.copy
Copy selected text.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'c', ctrlKey: 'true' }
- Type:
shortcuts.print
Open print dialog.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'p', ctrlKey: 'true' }
- Type:
shortcuts.cancelPrint
Cancel printing.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'Escape' }
- Type:
shortcuts.resetZoom
Zoom to 100%.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'z', altKey: true }
- Type:
shortcuts.fitToPage
Fit to page.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'p', altKey: true }
- Type:
shortcuts.fitToWidth
Fit to width.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'w', altKey: true }
- Type:
shortcuts.rotateView
Rotate view.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'r', altKey: true }
- Type:
shortcuts.save
Save or save callback.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 's', ctrlKey: true }
- Type:
shortcuts.search
Search.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'f', ctrlKey: true }
- Type:
shortcuts.searchNext
Next search match.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'F3' }
- Type:
shortcuts.searchPrevious
Previous search match.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'F3', shiftKey: true }
- Type:
shortcuts.closeSearch
Close search.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'Escape' }
- Type:
shortcuts.toggleSidePane
Toggle side pane.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 's', altKey: true }
- Type:
shortcuts.showAnnotations
Display annotation pane.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'a', altKey: true }
- Type:
shortcuts.showOutline
Display outline pane.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 'o', altKey: true }
- Type:
shortcuts.showThumbnails
Display thumbnails pane.- Type:
KeyboardShortcutBinding
Review Keyboard shortcuts for a specific example. - Default parameter and value:
{ key: 't', altKey: true }
- Type: