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

Page Orientation

1 Answer 128 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Veteran
Richard asked on 14 Oct 2015, 03:41 AM

So I'm following the sample on this page:

http://demos.telerik.com/aspnet-ajax/wordsprocessing/generate-documents/defaultcs.aspx

I've been able to create my document object, editor object and added lines, etc. to the file and it produces a docx without issue.  What I'm trying to figure out is how to set the pageorientation to landscape.  I've been looking and haven't found any way to accomplish this.  I saw a sections pageorientation in the docs but I don't see how to access it.

Thanks,

Richard

 

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 14 Oct 2015, 11:59 AM
Hi Richard,

The PageOrientation property of the Section class  is used to determine the actual size of the paper to use on the printer and doesn't reflect the visualization of the document. If your requirement is to visualize the document in Landscape mode, you could use the Rotate() method of the section as described in our documentation on the matter.

Hope this helps.
 
Regards,
Tanya
Telerik
Tags
WordsProcessing
Asked by
Richard
Top achievements
Rank 1
Veteran
Answers by
Tanya
Telerik team
Share this question
or