Skip to content

Commit 4ef3a2d

Browse files
authored
Merge pull request #696 from telerik/new-kb-richtexteditor-custom-page-size-efb93fd534b4474fb61b846cf89111d4
Added new kb article richtexteditor-custom-page-size
2 parents 58b4bef + 74d2cd5 commit 4ef3a2d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Setting Custom Page Size on Document in RadRichTextEditor
3+
description: Learn how to configure a custom page size, such as 3"x3", for documents in RadRichTextEditor.
4+
type: how-to
5+
page_title: How to Configure Custom Page Sizes in RadRichTextEditor for WinForms
6+
slug: radrichtexteditor-winforms-custom-page-size
7+
tags: richtexteditor, winforms, custom, page size
8+
res_type: kb
9+
ticketid: 1683831
10+
---
11+
12+
## Environment
13+
14+
|Product Version|Product|Author|
15+
|----|----|----|
16+
|2025.1.211|RadRichTextEditor for WinForms|[Nadya Todorova](https://www.telerik.com/blogs/author/nadya-karaivanova)|
17+
18+
## Description
19+
20+
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.
21+
22+
## Solution
23+
24+
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:
25+
26+
````C#
27+
28+
var size = new Telerik.WinControls.RichTextEditor.UI.Size(762, 762);
29+
this.radRichTextEditor1.RichTextBoxElement.ActiveDocumentEditor.ChangeSectionPageSize(size);
30+
31+
````
32+
33+
## See Also
34+
35+
- [RadRichTextEditor Documentation](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/overview)
36+
- [Working with Sections in RadRichTextEditor](https://docs.telerik.com/devtools/winforms/controls/richtexteditor/document-elements/section)

0 commit comments

Comments
 (0)