By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,948 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,948 IT Pros & Developers. It's quick & easy.

how to count the number of pages of a file

P: n/a
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..

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200801/1

Jan 6 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"prince via DotNetMonster.com" <u40347@uweschrieb
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

Jan 6 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.