| layout | post |
|---|---|
| title | Disable Optimized Text Measuring in Blazor DOCX Editor | Syncfusion |
| description | Learn how to disable optimized text measuring in Syncfusion Blazor Document Editor component and much more. |
| platform | document-processing |
| control | Document Editor |
| documentation | ug |
Starting from v19.3.0.x, the accuracy of text size measurements in Blazor Document Editor (Document Editor) is improved to match Microsoft Word pagination for most Word documents. This improvement is included as default behavior along with an optional API EnableOptimizedTextMeasuring in Document Editor settings.
If you want the Blazor Document Editor (Document Editor) component to retain the document pagination (display page-by-page) behavior like v19.2.0.x and older versions, you can disable the optimized text measuring feature by setting false to the EnableOptimizedTextMeasuring property of the Blazor Document Editor component.
The following example code illustrates how to disable the optimized text measuring feature in the Document Editor Container instance.
@using Syncfusion.Blazor.DocumentEditor;
<SfDocumentEditorContainer @ref="container" EnableToolbar=true DocumentEditorSettings="settings">
</SfDocumentEditorContainer>
@code {
SfDocumentEditorContainer container;
// Disable optimized text measuring feature
DocumentEditorSettingsModel settings = new DocumentEditorSettingsModel() { EnableOptimizedTextMeasuring = false };
}The following example code illustrates how to disable the optimized text measuring feature in the Document Editor instance.
@using Syncfusion.Blazor.DocumentEditor;
<SfDocumentEditor IsReadOnly="false" DocumentEditorSettings="settings">
</SfDocumentEditor>
@code {
// Disable optimized text measuring feature
DocumentEditorSettingsModel settings = new DocumentEditorSettingsModel() { EnableOptimizedTextMeasuring = false };
}