Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also enable renderInteractiveForms by default in the viewer components (PR 12201 follow-up) #12261

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/display/annotation_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,10 @@ class AnnotationLayer {
linkService: parameters.linkService,
downloadManager: parameters.downloadManager,
imageResourcesPath: parameters.imageResourcesPath || "",
renderInteractiveForms: parameters.renderInteractiveForms || false,
renderInteractiveForms:
typeof parameters.renderInteractiveForms === "boolean"
? parameters.renderInteractiveForms
: true,
svgFactory: new DOMSVGFactory(),
annotationStorage:
parameters.annotationStorage || new AnnotationStorage(),
Expand Down
4 changes: 2 additions & 2 deletions web/annotation_layer_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AnnotationLayerBuilder {
downloadManager,
annotationStorage = null,
imageResourcesPath = "",
renderInteractiveForms = false,
renderInteractiveForms = true,
l10n = NullL10n,
}) {
this.pageDiv = pageDiv;
Expand Down Expand Up @@ -133,7 +133,7 @@ class DefaultAnnotationLayerFactory {
pdfPage,
annotationStorage = null,
imageResourcesPath = "",
renderInteractiveForms = false,
renderInteractiveForms = true,
l10n = NullL10n
) {
return new AnnotationLayerBuilder({
Expand Down
7 changes: 5 additions & 2 deletions web/base_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/interfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class IPDFAnnotationLayerFactory {
pdfPage,
annotationStorage = null,
imageResourcesPath = "",
renderInteractiveForms = false,
renderInteractiveForms = true,
l10n = undefined
) {}
}
Expand Down
7 changes: 5 additions & 2 deletions web/pdf_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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;

Expand Down