how to count the number of pages of a file

  • Thread starter prince via DotNetMonster.com
  • 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..
 
A

Armin Zingler

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
 

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