Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
WPF: Set Printing Orientation to Landscape?
Neeraj Khajanchi
7y
439
1
Reply
In WPF C#, how can I set printer page settings to landscape. I am trying to print a flowdocument. I have tried different things but nothing seems to be working.
Here is my code.
IDocumentPaginatorSource dps =
this
.MyFlowDoc;
// pd.PrintTicket.PageOrientation = System.Printing.PageOrientation.Landscape;
// pd.PrintTicket.PageMediaSize = new System.Printing.PageMediaSize(System.Printing.PageMediaSizeName.ISOA4Rotated);
pd.PrintQueue.CurrentJobSettings.CurrentPrintTicket.PageOrientation = System.Printing.PageOrientation.Landscape;
pd.PrintDocument(dps.DocumentPaginator,
"MyInvoice"
);
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to set A4 size for FlowDocument under Window in WPF C# ?
Refresh mainWindow Datagrid after closing popup childWindow