diff --git a/src/core/xfa/template.js b/src/core/xfa/template.js index 3755e8c67..ef8fa4ab8 100644 --- a/src/core/xfa/template.js +++ b/src/core/xfa/template.js @@ -2391,6 +2391,8 @@ class Field extends XFAObject { const caption = this.caption ? this.caption[$toHTML]().html : null; if (!caption) { + // Even if no caption this class will help to center the ui. + ui.attributes.class.push("xfaLeft"); return HTMLResult.success(createWrapper(this, html), bbox); } diff --git a/src/display/xfa_layer.js b/src/display/xfa_layer.js index 7f2ba8650..9717eb74e 100644 --- a/src/display/xfa_layer.js +++ b/src/display/xfa_layer.js @@ -125,7 +125,7 @@ class XfaLayer { static render(parameters) { const storage = parameters.annotationStorage; const root = parameters.xfa; - const intent = parameters.intent; + const intent = parameters.intent || "display"; const rootHtml = document.createElement(root.name); if (root.attributes) { this.setAttributes(rootHtml, root);