You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Setting Custom Page Size in RadRichTextEditor for WinForms
2
+
title: Setting Custom Page Size on Document in RadRichTextEditor
3
3
description: Learn how to configure a custom page size, such as 3"x3", for documents in RadRichTextEditor.
4
4
type: how-to
5
5
page_title: How to Configure Custom Page Sizes in RadRichTextEditor for WinForms
@@ -22,33 +22,20 @@ ticketid: 1683831
22
22
23
23
## Description
24
24
25
-
In RadRichTextEditor, I need to set a custom page size, for example, 3"x3". The `ChangePaperTypeCommand` does not allow for custom sizes, and I wonder if there's an alternative way to achieve a custom page size in the document.
26
-
27
-
This knowledge base article also answers the following questions:
28
-
- How can I adjust the page size of a document in RadRichTextEditor?
29
-
- Is it possible to define custom dimensions for RadRichTextEditor pages?
30
-
- What method allows for custom page sizing in RadRichTextEditor documents?
25
+
This knowledge base article also answers 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"x3" dimensions.
31
26
32
27
## Solution
33
28
34
-
To set a custom page size in RadRichTextEditor, such as 3"x3", use the `ChangeSectionPageSize()` method. This method should be called after the document is loaded. Follow the steps below to implement custom page sizing:
35
-
36
-
1. Initialize a new size with the desired dimensions. Keep in mind that the size should be specified in DIPs (Document Independent Pixels). For a 3"x3" size, considering 96 DIPs equals 1 inch, calculate the size in DIPs as follows:
37
-
38
-
```csharp
39
-
varsize=newTelerik.WinControls.RichTextEditor.UI.Size(762, 762); // 3"x3" in DIPs
40
-
```
29
+
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. Follow the steps below to implement custom page sizing:
41
30
42
-
2. Apply the custom size to the document using the `ChangeSectionPageSize()` method:
0 commit comments