How to Disable Optimized Text Measuring in ASP.NET Core DOCX Editor
27 Aug 20261 minute to read
Starting from v19.3.0.x, the accuracy of text size measurements in the DOCX Editor is improved to match Microsoft Word pagination for most Word documents. This improvement is included as the default behavior along with an optional API enableOptimizedTextMeasuring in the Document Editor settings.
If you want the ASP.NET Core DOCX Editor (Document Editor) component to retain the document pagination (display page-by-page) behavior like v19.2.0.x and older versions, then you can disable this optimized text measuring improvement by setting the enableOptimizedTextMeasuring property of the DOCX Editor component to false.
Disable optimized text measuring in DocumentEditorContainer instance
The following example code illustrates how to disable the optimized text measuring improvement in the DocumentEditorContainer instance.
<div>
<ejs-documenteditor isReadOnly=false enableEditor=true enableSelection=true enablePageSetupDialog=true enableSfdtExport=true id="container" documentEditorSettings="settings"></ejs-documenteditor>
</div>
<script>
var settings = { enableOptimizedTextMeasuring: false };
</script>Disable optimized text measuring in DocumentEditor instance
The following example code illustrates how to disable the optimized text measuring improvement in the DocumentEditor instance.
<ejs-documenteditorcontainer id="container" documentEditorSettings="settings" enableToolbar=true height="590px"></ejs-documenteditorcontainer>
<script>
var settings = { enableOptimizedTextMeasuring: false };
</script>