Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
WPF: Set Printing Orientation to Landscape?
Neeraj Khajanchi
Aug 15 2017 3:58 AM
408
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"
);
Upload Source Code
Select only zip and rar file.
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