Solved

printing a multipage document

Posted on 2006-07-24
3
186 Views
Last Modified: 2010-04-23
I am currently printing a multipage document

but on the page I want it to print out for eg. page 1 of 5, page 2 of 5, etc. etc.

I can get it to print page 1, page 2 but i dont know the last page when page 1 and 2 are printed out....
0
Comment
Question by:foobarr
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
jjardine earned 500 total points
ID: 17169472
I am not sure if this will work but I am thinking that you might be able to use a print preview dialog to help solve this problem.   What if you added a global variable to hold the page count.  Then   when the user selects print you create a print preview which may be invisible that will cause the print handlers to fire incrementing your global page count variable.  Then when that is done you actually call the PrintDocument.print and use the new variable in your string for   1 of 5, 2 of 5  etc.  Sounds kind of clunky but it might work.
0
 
LVL 7

Author Comment

by:foobarr
ID: 17169694
I dont want the document to be previewed though, because the document being printed doesn't need to be reviewed before it is sent to the printer...

its wierd when i print

a small gray box appears saying printing 1 of 2, 2 of 2, etc.

if only I could I use that info...
0
 
LVL 14

Expert Comment

by:jjardine
ID: 17170851
if you made the printpreview visible=false it wouldn't show would it?

I am not sure how the gray box knows how many pages.  I assume it probably buffers the print job some how in memory before sending it to the printer.  Sort of the concept with the printpreview but probably  more efficient.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now