Printing document - getting number of total pages

  • Thread starter Thread starter Pedro
  • Start date Start date
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!
 
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 :-)?
 
Back
Top