Paper orientation - priting - PrintPreviewControl

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top