How to Change Document View in ASP.NET MVC DOCX Editor

14 Aug 20261 minute to read

How to change the document view

DocumentEditor allows you to change the view to web layout and print using the layoutType property with the supported LayoutType (Continuous for web layout, Pages for print layout).

@Html.EJS().DocumentEditor("container").LayoutType(Syncfusion.EJ2.DocumentEditor.LayoutType.Continuous).Render()
public ActionResult Default()
{
    return View();
}

Default value of layoutType in DocumentEditor component is Pages.

How to change the document view in DocumentEditorContainer component

DocumentEditorContainer component allows you to change the view to web layout and print using the layoutType property with the supported LayoutType (Continuous for web layout, Pages for print layout). DocumentEditorContainer is the toolbar-included wrapper around DocumentEditor; use it when you need the built-in toolbar.

@Html.EJS().DocumentEditorContainer("container").LayoutType(Syncfusion.EJ2.DocumentEditor.LayoutType.Continuous).Render()
public ActionResult Default()
    {
        return View();
    }

Default value of layoutType in DocumentEditorContainer component is Pages.