diff --git a/web/base_viewer.js b/web/base_viewer.js index e4dce389ce7849..4e1cbe284a6e0c 100644 --- a/web/base_viewer.js +++ b/web/base_viewer.js @@ -65,7 +65,7 @@ const DEFAULT_CACHE_SIZE = 10; * @property {string} [imageResourcesPath] - Path for image resources, mainly * mainly for annotation icons. Include trailing slash. * @property {boolean} [renderInteractiveForms] - Enables rendering of - * interactive form elements. The default is `false`. + * interactive form elements. The default value is `true`. * @property {boolean} [enablePrintAutoRotate] - Enables automatic rotation of * landscape pages upon printing. The default is `false`. * @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'. @@ -152,7 +152,10 @@ class BaseViewer { ? options.textLayerMode : TextLayerMode.ENABLE; this.imageResourcesPath = options.imageResourcesPath || ""; - this.renderInteractiveForms = options.renderInteractiveForms || false; + this.renderInteractiveForms = + typeof options.renderInteractiveForms === "boolean" + ? options.renderInteractiveForms + : true; this.enablePrintAutoRotate = options.enablePrintAutoRotate || false; this.renderer = options.renderer || RendererType.CANVAS; this.enableWebGL = options.enableWebGL || false; diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index e0eeee9fe31583..2ac11aa6945d12 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -50,7 +50,7 @@ import { viewerCompatibilityParams } from "./viewer_compatibility.js"; * @property {string} [imageResourcesPath] - Path for image resources, mainly * for annotation icons. Include trailing slash. * @property {boolean} renderInteractiveForms - Turns on rendering of - * interactive form elements. The default is `false`. + * interactive form elements. The default value is `true`. * @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'. * @property {boolean} [enableWebGL] - Enables WebGL accelerated rendering for * some operations. The default value is `false`. @@ -90,7 +90,10 @@ class PDFPageView { ? options.textLayerMode : TextLayerMode.ENABLE; this.imageResourcesPath = options.imageResourcesPath || ""; - this.renderInteractiveForms = options.renderInteractiveForms || false; + this.renderInteractiveForms = + typeof options.renderInteractiveForms === "boolean" + ? options.renderInteractiveForms + : true; this.useOnlyCssZoom = options.useOnlyCssZoom || false; this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS;