[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

Is Anyone In?? Working?? Wakeup!!! Help!!!! FYI, Holidays are over.

Heino.Jebsen

1/20/2005 12:02:00 PM

Hello


is it possible to change print
orientation page by page
say
Page 1 - Portrait
Page 2 - Landscape
Page 3 - Portrait
Page 4 - Landscape
Page 5 - Portrait
Page 6 - Landscape
Page 7 - Portrait
Page 8 - Landscape


It is not very clear whether .Net is capable of
printing where we can exert control over printer.


heino

2 Answers

Bob Powell

1/20/2005 2:09:00 PM

0

private void button1_Click(object sender, System.EventArgs e)

{

PrintDocument pd=new PrintDocument();

pd.PrintPage+=new PrintPageEventHandler(pd_PrintPage);

pd.Print();

}

int c=0;

private void pd_PrintPage(object sender, PrintPageEventArgs e)

{

e.PageSettings.Landscape=(c&1)==1;

e.Graphics.DrawString("Hello Page
#"+c.ToString(),Font,Brushes.Black,100,100,StringFormat.GenericTypographic);

if(++c<4)

e.HasMorePages=true;

}


--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





<Heino.Jebsen@web.de> wrote in message
news:1106222513.524338.119630@c13g2000cwb.googlegroups.com...
> Hello
>
>
> is it possible to change print
> orientation page by page
> say
> Page 1 - Portrait
> Page 2 - Landscape
> Page 3 - Portrait
> Page 4 - Landscape
> Page 5 - Portrait
> Page 6 - Landscape
> Page 7 - Portrait
> Page 8 - Landscape
>
>
> It is not very clear whether .Net is capable of
> printing where we can exert control over printer.
>
>
> heino
>


Heino.Jebsen

1/21/2005 2:44:00 PM

0


Hello Bob,

Million thanks.

You are very helpful.

heino



Bob Powell [MVP] wrote:
> private void button1_Click(object sender, System.EventArgs e)
>
> {
>
> PrintDocument pd=new PrintDocument();
>
> pd.PrintPage+=new PrintPageEventHandler(pd_PrintPage);
>
> pd.Print();
>
> }
>
> int c=0;
>
> private void pd_PrintPage(object sender, PrintPageEventArgs e)
>
> {
>
> e.PageSettings.Landscape=(c&1)==1;
>
> e.Graphics.DrawString("Hello Page
>
#"+c.ToString(),Font,Brushes.Black,100,100,StringFormat.GenericTypographic);
>
> if(++c<4)
>
> e.HasMorePages=true;
>
> }
>
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tips...
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/f...
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> <Heino.Jebsen@web.de> wrote in message
> news:1106222513.524338.119630@c13g2000cwb.googlegroups.com...
> > Hello
> >
> >
> > is it possible to change print
> > orientation page by page
> > say
> > Page 1 - Portrait
> > Page 2 - Landscape
> > Page 3 - Portrait
> > Page 4 - Landscape
> > Page 5 - Portrait
> > Page 6 - Landscape
> > Page 7 - Portrait
> > Page 8 - Landscape
> >
> >
> > It is not very clear whether .Net is capable of
> > printing where we can exert control over printer.
> >
> >
> > heino
> >