how to count the number of pages of a file

  • Thread starter Thread starter prince via DotNetMonster.com
  • Start date Start date
P

prince via DotNetMonster.com

hi! i used the following code to print files like pdf and .doc:

Dim x As New ProcessStartInfo
x.UseShellExecute = True
x.Verb = "print"
x.WindowStyle = ProcessWindowStyle.Hidden
x.FileName = file_name
Process.Start(x)

is there a way to count the number of pages of the file being printed?
can you share some codes in vb.net or links regaring this? tnx a lot..
 
prince via DotNetMonster.com said:
hi! i used the following code to print files like pdf and .doc:

Dim x As New ProcessStartInfo
x.UseShellExecute = True
x.Verb = "print"
x.WindowStyle = ProcessWindowStyle.Hidden
x.FileName = file_name
Process.Start(x)

is there a way to count the number of pages of the file being
printed? can you share some codes in vb.net or links regaring this?
tnx a lot..

By executing the code above, you are passing the work to "someone" else. If
the one doesn't give you a feedback, you can not know details about it. In
other words, no, it is not possible. Maybe it was possible to observe the
printer spooler, but there wouldn't be a reliable way to get access to the
corresponding print job in any case.


Armin
 
Back
Top