Printing document - getting number of total pages

P

Pedro

Hi all;

I have one small app. written in vb.net and somewhere i create one
document which can be printed using one printdialog.

Before printing it, i want to advise user's from the number of pages
of the document giving them a chance to cancel the printing operation
if they want to.

How can it be done? I've tryed searching in PrintDialog,
PrintDocument, PreviewPrintController and PreviewPageInfo and didn't
found anything about it! I've done some google search and no one seems
to have this problem. Is there some way to workaround this or do i
have to use some Windows API? If so, which API and how can i use it?

I think i'm missing something here! It seems very obvious to me.

Please help or point me to the right direction!

Thanks in advance!
 
H

Herfried K. Wagner [MVP]

Pedro said:
I have one small app. written in vb.net and somewhere i create one
document which can be printed using one printdialog.

Before printing it, i want to advise user's from the number of pages
of the document giving them a chance to cancel the printing operation
if they want to.

How can it be done? I've tryed searching in PrintDialog,

It cannot be done without first rendering the whole document onto a print
preview, for example. How would you determine how much money is in a
moneybag without taking a look into it :)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top