Solved

printing a multipage document

Posted on 2006-07-24
3
188 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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