Option types and values for PDF.js 6.4.299
Types and values apply to the 6.4.299 viewers. Numeric defaultZoomValue is still a string; theme and mode options are numbers.
| Option | Type | Values | Purpose |
|---|---|---|---|
defaultZoomValue | string | "auto", "page-width", "page-fit", "page-height", "125" | Initial zoom; the string "125" means 125%. |
viewerCssTheme | number | 0 / 1 / 2 | 0 OS theme, 1 light, 2 dark. |
viewOnLoad | number | 0 / 1 | 0 previous PDF view, 1 initial settings. |
sidebarViewOnLoad | number | -1 / 0 / 1 / 2 / 3 / 4 | -1 unspecified, 0 hidden, 1 thumbnails, 2 outline, 3 attachments, 4 layers. |
scrollModeOnLoad | number | -1 / 0 / 1 / 2 / 3 | -1 unspecified, 0 vertical, 1 horizontal, 2 wrapped, 3 page-by-page. |
spreadModeOnLoad | number | -1 / 0 / 1 / 2 | -1 unspecified, 0 no spreads, 1 odd-page spreads, 2 even-page spreads. |
cursorToolOnLoad | number | 0 / 1 / 2 | 0 selection, 1 hand, 2 zoom tool. |
localeProperties | object | {"lang":"ru"} | A locale shipped with the viewer; use en-US for English. |
externalLinkTarget | number | 0 / 1 / 2 / 3 / 4 | 0 default, 1 current window, 2 new window, 3 parent, 4 top-level. Embedded viewers may replace 0 with 4. |
enableScripting | boolean | true / false | Embedded PDF scripting. |
disableRange | boolean | false / true | false permits Range; true disables it. |
disableStream | boolean | false / true | true disables streaming. |
disableAutoFetch | boolean | false / true | Use true with disableStream=true to disable automatic prefetch. |
enableXfa | boolean | true / false | XFA support. |
printResolution | number | 150 | Print DPI; higher values use more memory. |
maxCanvasPixels | number | 33554432 | Canvas pixel limit; not a total memory limit. |