The C# code looks something like this
private void button2_Click(object sender, System.EventArgs e)
{
PrintDialog pd = new PrintDialog();
pd.Document = doc;
pd.ShowDialog();
doc.PrinterSettings.Equals(pd.PrinterSettings);
iTabCount = 0;
currentPage = 1;
doc.Print();
}
private void doc_PrintPage(object
sender,System.Drawing.Printing.PrintPageEventArgs ev)
{
if(foo== bar){
document.DefaultPageSettings.Landscape = true;
}
else
{
document.DefaultPageSettings.Landscape =false;
}
Drawstring ......
}
This is pseudocode granted, but you get the idea. For some reason however it
doesn't make any difference, any ideas on how I can do this? Other than a
rotateTransform and Translate Transform? Or is this a limit of the printer
drivers - A document can only be portrait or only landscape but not both?
thanks
Rick Hein
You might want to look at the QueryPageSettings event and direct a new page
orientation/make modifications to the one used. This event occurs before
PrintPage.
Thanks,
-Greg
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.
--------------------
| From: "Rick Hein" <rh...@mutualofenumclaw.com>
| Subject: Landscape and Portrait printing in the same document
| Date: Thu, 13 Feb 2003 15:50:03 -0800
| Lines: 67
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <uMkvVq70CHA.2904@TK2MSFTNGP09>
| Newsgroups: microsoft.public.dotnet.framework.drawing
| NNTP-Posting-Host: 208.152.20.165
| Path: cpmsftngxa08!cpmsftngxa06!TK2MSFTNGP08!TK2MSFTNGP09
| Xref: cpmsftngxa08 microsoft.public.dotnet.framework.drawing:5452
| X-Tomcat-NG: microsoft.public.dotnet.framework.drawing
Thanks.
Rick
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Rick Hein" <Rick...@gmail.com> wrote in message
news:1106161269....@z14g2000cwz.googlegroups.com...
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:ObtfXUp$EHA....@TK2MSFTNGP15.phx.gbl...