Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to print more than one page using printDocument and using e.Drawimage() method.
I am printing the Windows Form controls and I want to print two panels on two diffent pages but I am wondering how ?

if any body knows the way out plz reply.

Thanks..
Posted

1 solution

In your handler for PrintDocument.PrintPage you need to set PrintPageEventArgs.HasMorePages.

There is an example here: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^]

Nick
 
Share this answer
 
Comments
[no name] 9-Apr-14 0:19am    
Hii followed the link and it's working for me..
what i did is instead of
linesPerPage = ev.MarginBounds.Height /
printFont.GetHeight(ev.Graphics);
i did
linesPerPage = 30;
but now i want to display messagebox if there are more rows to print after 30.
Please tell me how to do that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900