Paper orientation - priting - PrintPreviewControl

  • Thread starter Thread starter Sachin D.
  • Start date Start date
S

Sachin D.

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???
 
Back
Top