473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to count the number of pages of a file

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
1 2422
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Ling Lee | last post by:
Hi all. I'm trying to write a program that: 1) Ask me what file I want to count number of lines in, and then counts the lines and writes the answear out. 2) I made the first part like this: ...
4
by: Jose Benito Gonzalez Lopez | last post by:
Hi there, Does anyone know how I could do in order to get/count the number of pages of a PDF file? (from python of course ;) ) Thanks beforehand. Cheers, Jose
68
by: Martin Joergensen | last post by:
Hi, I have some files which has the following content: 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0
2
by: thvferrari | last post by:
Hey guys, Does anyone of you know how to count the number of pages that a doc, xls and ppt would print? My objective is to count this number of pages and charge the user per number of pages...
4
by: G E W hittle | last post by:
I have a directory of tiff files. I need to loop thru the files and count the number of pages in each file. Can someone point me to where this info is stored? GW
3
by: waynejr25 | last post by:
can anyone help me add a function that will count the occurance of each word in an input file. here's the code i have so far it counts the number of characters, words, and lines but i need the...
3
by: belred | last post by:
is it possible to parse a pdf file in python? for starters, i would like to count the number of pages in a pdf file. i see there is a project called ReportLab, but it seems to be a pdf...
2
by: bling via DotNetMonster.com | last post by:
greetings fellow programmers!! im kinda new in vb.net and i need your professional help! im using DSOframer to open .doc files but i disabled the menubar and toolbar because i just want to show...
1
by: jlt206 | last post by:
This code <?php include("counter.php")?> on the webpage produces the count number. (function code below) I want to place the current number into a variable $MemberNo or into a FormField to be sent...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.