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

Window is Getting shrink while using RadFlowDocument Control

1 Answer 107 Views
DataLayout
This is a migrated thread and some comments may be shown as answers.
Somasundaram
Top achievements
Rank 1
Somasundaram asked on 11 Jan 2021, 07:26 PM

Hi,

I have written the below code on VS 2017 form button click suddenly the form is getting shrink. Please help me to solve this issue

using Telerik.Windows.Documents.Flow.Model;

Telerik.Windows.Documents.Flow.Model.RadFlowDocument document = new Telerik.Windows.Documents.Flow.Model.RadFlowDocument();
            Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor editor = new Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor(document);
            editor.InsertText("Hello world!");


            using (Stream output = new FileStream(@"c:\logs\output.docx", FileMode.OpenOrCreate))
            {
                Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider provider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
                provider.Export(document, output);
            }

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 12 Jan 2021, 05:33 AM

Hi, Somasundaram,

It seems that your application becomes smaller when exporting data or it is using cross platform controls (RadPdfViewer, RadRichTextEditor, RadSpreadsheetEditor, RadDiagram, the Document Processing Library). This happens because of the used WPF assemblies in the Document Processing libraries.

Please have a look at the following KB article which gives some tips and tricks how to handle this case: https://docs.telerik.com/devtools/winforms/knowledge-base/app-becomes-dpi-aware 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
DataLayout
Asked by
Somasundaram
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or