Setting Custom Page Size on Document in RadRichTextEditor
Environment
Product Version | Product | Author |
---|---|---|
2025.1.211 | RadRichTextEditor for WinForms | Nadya Todorova |
Description
This knowledge base article shows how to define custom dimensions of a document in RadRichTextEditor. Baically, RadRichTextEditor provides Telerik.WinForms.Documents.Model.PaperTypes enumeration, but it does not allow users to define custom sizes such as 3"x 3" dimensions.
Solution
To set a custom page size in RadRichTextEditor, such as 3"x 3", use the ChangeSectionPageSize()
method. This method should be called after the document is loaded. Use the following code snippet to implement custom page sizing:
var size = new Telerik.WinControls.RichTextEditor.UI.Size(762, 762);
this.radRichTextEditor1.RichTextBoxElement.ActiveDocumentEditor.ChangeSectionPageSize(size);