This is a migrated thread and some comments may be shown as answers.

Change zoom level to fit two pages.

1 Answer 89 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 27 Dec 2016, 05:10 PM

I am working on a template editor, so I have a simple layout with a RadGridView on the left, and a RichTextEditor on the right. When the row gets changed, I load a template into the the RichTextEditor. The editor is readonly (the template is edited in a different window). How can I change the zoom level to automatically show two full pages.

 

Here's what I have when I load the template the first time http://i.imgur.com/a8vyyov.png
And here's what I can see when I hold ctrl and use the mousewheel to zoom in 1 level. http://imgur.com/angvElk.png
I am looking for something in the middle, where I can see 2 pages, and it takes up 100% of the space available.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 28 Dec 2016, 07:16 AM
Hi Pavel,

Thank you for writing.

You can achieve the desired result by specifying the scale factor of the editor: 
this.radRichTextEditor1.Document.LayoutMode = DocumentLayoutMode.Paged;
ChangePaperTypeCommand command = new ChangePaperTypeCommand(this.radRichTextEditor1.RichTextBoxElement);
command.Execute(Telerik.WinForms.Documents.Model.PaperTypes.A4);
this.radRichTextEditor1.ScaleFactor = new Telerik.WinForms.Documents.Model.SizeF(.5f, .5f);

Additionally, you may check the following forum thread discussing a similar question: http://www.telerik.com/forums/programmatically-zooming#d8zvODRwHkSAIYm3xBCrvQ.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
RichTextEditor
Asked by
Pavel
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or