RichEditDocumentServerOptions.SecurityLoadingLimits Property
Gets the security loading limits for a docum.
Namespace: DevExpress.XtraRichEdit
Assembly: DevExpress.RichEdit.v26.1.Core.dll
Declaration
Property Value
| Type | Description |
|---|---|
| WordProcessingSecurityLoadingLimits | An object that contains the security loading limits for a document. |
Property Paths
You can access this nested property as listed below:
| Object Type | Path to SecurityLoadingLimits |
|---|---|
| RichEditDocumentServer |
|
Remarks
When a document exceeds the specified limit, the RichEditDocumentServer.SecurityLoadingLimitExceeded event fires. Set e.Handled = true in the event handler to allow the document to continue loading despite the violation. This can be useful for log-only scenarios or staged rollouts.
Example
How to: Set Security Loading Limits
The following code snippet sets security loading limits:
using DevExpress.XtraRichEdit;
using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
WordProcessingSecurityLoadingLimits securityLimits = wordProcessor.Options.SecurityLoadingLimits;
securityLimits.MaxFileSize = 50 * 1024 * 1024; // 50 MB
securityLimits.MaxParagraphCount = 100_000;
securityLimits.MaxTableCount = 1_000;
securityLimits.MaxXmlElementDepth = 128;
wordProcessor.LoadDocument("Documents\\Sample.docx");
}
See Also