Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

Printing a Document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
airic82 - 18 Jul 2005 03:30 GMT
I'm using the PrintPageEventArgs with the Graphics namespace, and when the
code gets to the point where it sets HasMorePages to true, it loops in a
while loop to being the new page.  The problem is that all of the next page
still prints on the first page.  I can't figure out why this is.  I'm using
rectangles to help align my spacing and to create certain section of the page
(b/c its a form).  Anyone have any suggestions?  Ask me questions if you need
more info.

Thanks!!
Gabriele G. Ponti - 18 Jul 2005 13:07 GMT
You have to think to the pages as contiguous, and adjust the vertical
coordinates accordingly. So for example the vertical offset of the first
page is 0, for the second page is ev.MarginBounds.Height, and so on.
Ron Allen - 18 Jul 2005 13:46 GMT
You have to exit the OnPrintPage handler to cause a page eject with
HasMorePages true if you will be printing more data.  You will need to keep
your printing position variables outside of this routine so that it will
work when re-entered.

Ron Allen
> I'm using the PrintPageEventArgs with the Graphics namespace, and when the
> code gets to the point where it sets HasMorePages to true, it loops in a
[quoted text clipped - 9 lines]
>
> Thanks!!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.