By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,685 Members | 1,326 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,685 IT Pros & Developers. It's quick & easy.

Paper orientation - priting - PrintPreviewControl

P: n/a
Hi all!

Desperately need a solution for this. I have a multiple
page orientation print job; My first page is landscape and
next 4 pages are portrait. I am using PrintDocument and
PrintPreviewControl provided by .net

I change the orientation in querypagesettings:

Private Sub PrintDocument1_QueryPageSettings(ByVal sender
As Object, ByVal e As
System.Drawing.Printing.QueryPageSettingsEventArgs )
Handles PrintDocument1.QueryPageSettings
If id = 1 Then
e.PageSettings.Landscape = False
Else
e.PageSettings.Landscape = True
End If
End Sub

and also tried in PrintPage event by doing:
PrintPreviewControl1.Document.DefaultPageSettings. Landscape
= True

the print document/preview sticks to the first orientation.

Am i doing something wrong here???
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Page Settings in your case should be changed PrintPage Event

http://msdn.microsoft.com/library/de...tpagetopic.asp

"Sachin D." <in**@baroc.co.in> wrote in message
news:01****************************@phx.gbl...
Hi all!

Desperately need a solution for this. I have a multiple
page orientation print job; My first page is landscape and
next 4 pages are portrait. I am using PrintDocument and
PrintPreviewControl provided by .net

I change the orientation in querypagesettings:

Private Sub PrintDocument1_QueryPageSettings(ByVal sender
As Object, ByVal e As
System.Drawing.Printing.QueryPageSettingsEventArgs )
Handles PrintDocument1.QueryPageSettings
If id = 1 Then
e.PageSettings.Landscape = False
Else
e.PageSettings.Landscape = True
End If
End Sub

and also tried in PrintPage event by doing:
PrintPreviewControl1.Document.DefaultPageSettings. Landscape
= True

the print document/preview sticks to the first orientation.

Am i doing something wrong here???

Nov 20 '05 #2

P: n/a
thanks a ton...it helped..and my issue is solved.

regards

Sachin
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.