41efa3c071
*This is a follow-up to PRs 13867 and 13899.* This patch is tagged `api-minor` for the following reasons: - It replaces the `renderInteractiveForms`/`includeAnnotationStorage`-options, in the `PDFPageProxy.render`-method, with the single `annotationMode`-option that controls which annotations are being rendered and how. Note that the old options were mutually exclusive, and setting both to `true` would result in undefined behaviour. - For improved consistency in the API, the `annotationMode`-option will also work together with the `PDFPageProxy.getOperatorList`-method. - It's now also possible to disable *all* annotation rendering in both the API and the Viewer, since the other changes meant that this could now be supported with a single added line on the worker-thread[1]; fixes 7282. --- [1] Please note that in order to simplify the overall implementation, we'll purposely only support disabling of *all* annotations and that the option is being shared between the API and the Viewer. For any more "specialized" use-cases, where e.g. only some annotation-types are being rendered and/or the API and Viewer render different sets of annotations, that'll have to be handled in third-party implementations/forks of the PDF.js code-base.
211 lines
6.4 KiB
JSON
211 lines
6.4 KiB
JSON
{
|
|
"type": "object",
|
|
"properties": {
|
|
"viewerCssTheme": {
|
|
"title": "Theme",
|
|
"description": "The theme to use.\n0 = Use system theme.\n1 = Light theme.\n2 = Dark theme.",
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
],
|
|
"default": 2
|
|
},
|
|
"showPreviousViewOnLoad": {
|
|
"description": "DEPRECATED. Set viewOnLoad to 1 to disable showing the last page/position on load.",
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"viewOnLoad": {
|
|
"title": "View position on load",
|
|
"description": "The position in the document upon load.\n -1 = Default (uses OpenAction if available, otherwise equal to `viewOnLoad = 0`).\n 0 = The last viewed page/position.\n 1 = The initial page/position.",
|
|
"type": "integer",
|
|
"enum": [
|
|
-1,
|
|
0,
|
|
1
|
|
],
|
|
"default": 0
|
|
},
|
|
"defaultZoomValue": {
|
|
"title": "Default zoom level",
|
|
"description": "Default zoom level of the viewer. Accepted values: 'auto', 'page-actual', 'page-width', 'page-height', 'page-fit', or a zoom level in percents.",
|
|
"type": "string",
|
|
"pattern": "|auto|page-actual|page-width|page-height|page-fit|[0-9]+\\.?[0-9]*(,[0-9]+\\.?[0-9]*){0,2}",
|
|
"default": ""
|
|
},
|
|
"sidebarViewOnLoad": {
|
|
"title": "Sidebar state on load",
|
|
"description": "Controls the state of the sidebar upon load.\n -1 = Default (uses PageMode if available, otherwise the last position if available/enabled).\n 0 = Do not show sidebar.\n 1 = Show thumbnails in sidebar.\n 2 = Show document outline in sidebar.\n 3 = Show attachments in sidebar.",
|
|
"type": "integer",
|
|
"enum": [
|
|
-1,
|
|
0,
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"default": -1
|
|
},
|
|
"enableHandToolOnLoad": {
|
|
"description": "DEPRECATED. Set cursorToolOnLoad to 1 to enable the hand tool by default.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"cursorToolOnLoad": {
|
|
"title": "Cursor tool on load",
|
|
"description": "The cursor tool that is enabled upon load.\n 0 = Text selection tool.\n 1 = Hand tool.",
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1
|
|
],
|
|
"default": 0
|
|
},
|
|
"pdfBugEnabled": {
|
|
"title": "Enable debugging tools",
|
|
"description": "Whether to enable debugging tools.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disableRange": {
|
|
"title": "Disable range requests",
|
|
"description": "Whether to disable range requests (not recommended).",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disableStream": {
|
|
"title": "Disable streaming for requests",
|
|
"description": "Whether to disable streaming for requests (not recommended).",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disableAutoFetch": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disableFontFace": {
|
|
"title": "Disable @font-face",
|
|
"description": "Whether to disable @font-face and fall back to canvas rendering (this is more resource-intensive).",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disableTextLayer": {
|
|
"description": "DEPRECATED. Set textLayerMode to 0 to disable the text selection layer by default.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"enhanceTextSelection": {
|
|
"description": "DEPRECATED. Set textLayerMode to 2 to use the enhanced text selection layer by default.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"textLayerMode": {
|
|
"title": "Text layer mode",
|
|
"description": "Controls if the text layer is enabled, and the selection mode that is used.\n 0 = Disabled.\n 1 = Enabled.\n 2 = (Experimental) Enabled, with enhanced text selection.",
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
],
|
|
"default": 1
|
|
},
|
|
"useOnlyCssZoom": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"externalLinkTarget": {
|
|
"title": "External links target window",
|
|
"description": "Controls how external links will be opened.\n 0 = default.\n 1 = replaces current window.\n 2 = new window/tab.\n 3 = parent.\n 4 = in top window.",
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4
|
|
],
|
|
"default": 0
|
|
},
|
|
"disablePageLabels": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disablePageMode": {
|
|
"description": "DEPRECATED.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disableTelemetry": {
|
|
"title": "Disable telemetry",
|
|
"type": "boolean",
|
|
"description": "Whether to prevent the extension from reporting the extension and browser version to the extension developers.",
|
|
"default": false
|
|
},
|
|
"annotationMode": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"default": 2
|
|
},
|
|
"enableScripting": {
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"enablePermissions": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"enableXfa": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"historyUpdateUrl": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"ignoreDestinationZoom": {
|
|
"title": "Ignore the zoom argument in destinations",
|
|
"description": "When enabled it will maintain the currently active zoom level, rather than letting the PDF document modify it, when navigating to internal destinations.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"enablePrintAutoRotate": {
|
|
"title": "Automatically rotate printed pages",
|
|
"description": "When enabled, landscape pages are rotated when printed.",
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"scrollModeOnLoad": {
|
|
"title": "Scroll mode on load",
|
|
"description": "Controls how the viewer scrolls upon load.\n -1 = Default (uses the last position if available/enabled).\n 0 = Vertical scrolling.\n 1 = Horizontal scrolling.\n 2 = Wrapped scrolling.",
|
|
"type": "integer",
|
|
"enum": [
|
|
-1,
|
|
0,
|
|
1,
|
|
2
|
|
],
|
|
"default": -1
|
|
},
|
|
"spreadModeOnLoad": {
|
|
"title": "Spread mode on load",
|
|
"description": "Whether the viewer should join pages into spreads upon load.\n -1 = Default (uses the last position if available/enabled).\n 0 = No spreads.\n 1 = Odd spreads.\n 2 = Even spreads.",
|
|
"type": "integer",
|
|
"enum": [
|
|
-1,
|
|
0,
|
|
1,
|
|
2
|
|
],
|
|
"default": -1
|
|
}
|
|
}
|
|
}
|