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

Change Page Orientation, Paper Size and Font Size on RadGrid Printing

2 Answers 120 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 25 Oct 2012, 06:21 AM
Hello,

I am using the newest WPF Controls Examples - Print and Export with RadDocument as a template for my project.

I need to print in US Legal (8.5 x 11) paper size, in landscape orientation and a smaller font using the WPF RadGridView as a source.

I have tried adding the following to the example code to change orientation and page size:
RadDocument.SectionDefaultPageOrientation = PageOrientation.Landscape;
and
RadRichTextBox.Document.SectionDefaultPageOrientation = PageOrientation.Landscape; 
and
Section.PageSize = new Size() { Height = 11.0, Width = 8.5 };
and it does not work.

Also, I have a large amount of text/columns to include in the print so I need to lower my font size to get everything to fit.

I have tried adding the following code to the example to change the printed font size:
RadRichTextBox.FontSize = 5.0; 
and it does not work.

Any help would be most appreciated!

John


2 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 10 Jan 2014, 03:43 PM
Same issue for silverlight, Could anybody from telerik to answer this questions?
0
Petya
Telerik team
answered on 15 Jan 2014, 12:31 PM
Hello,

The following article describes how you can set default style settings to RadRichTextBox. As to page size/orientation, they are properties of Section (please refer to RadDocument's model) and they need to be applied on a per section basis. Here is more information on the topic.

I hope this helps!

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
John
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Petya
Telerik team
Share this question
or