We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Set Height to Document Container to view full document when using Web layout (Continuous)


I'm using the Document Editor as a viewer to display as read-only previously saved document.

I'm setting the control as:

<SfDocumentEditorContainer @ref="container" Height="600px" LayoutType="LayoutType.Continuous" EnableToolbar=false ShowPropertiesPane="false" ToolbarItems="@ItemsEmpty" RestrictEditing="true">

    <DocumentEditorContainerEvents Created="OnCreated" >



In the OnCreated method I load the content of the document.

If I set Height="100%", it sets the height to 100% of the view port, not the document content.

I want to set the Height of the container to the full length of the document and avoid any scrollbars appearing.

Is this possible?


3 Replies

SM Sam Mendes December 14, 2022 10:38 AM UTC


I'm trying to do something similar to this but in Blazor:


Is it possible?


DS Dhanush Sekar Syncfusion Team December 15, 2022 07:18 AM UTC

Hi Sam,

We regret to inform you that setting the height to the full length of a document to avoid a scroll bar is not possible.


Dhanush Sekar

SM Sam Mendes December 19, 2022 03:20 AM UTC

Hi Dhanush,

I've found a workaround using DocIO. Opening the sfdt content into a Word document and then saving it to Html.

Sample code:

var doc = WordDocument.Save(sfdt);

using (MemoryStream ms = new MemoryStream())


doc.Save(ms, Syncfusion.DocIO.FormatType.Html);



Then you can render the resulting Html using MarkupString.

Hope this helps to anyone looking for something similar.

You can now close this thread.


Live Chat Icon For mobile
Up arrow icon