TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Neeraj Khajanchi
NA
12
15.4k
WPF: Set Printing Orientation to Landscape?
Aug 15 2017 3:58 AM
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"
);
Reply
Answers (
1
)
How to set A4 size for FlowDocument under Window in WPF C# ?
Refresh mainWindow Datagrid after closing popup childWindow