We help IT Professionals succeed at work.

Counting Printed Pages

gpequegn
gpequegn asked
on
I have an assignment handed me. A client in a law library charges people by the page when they print info from any application or the net. Right now they use the honor system but are wondering if something can't be created in VB to actually count the pages that are printed from a printer. The output would be sent to a text file along with the user name, time and number of pages. Getting the user name and time is easy enoguh but I haven't come across anything in the VB help files about counting printed pages.This little pogram would run in the background. I don't want anyone to show me how to do it but a starting point and some tips would sure come in handy.

Thanks in advance

George
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2014

Commented:
Since VB does a poor job of printing documents, I assume you are using some other application, such as Word to do the printing.  If so, Word objects include the number of pages.  Open the VB editor within Word and look at the online help contents to get to the Word Object help.  You might automate the Normal template to capture this.

The capturing of printed pages at a system level seems to require you to do one of the following:
1. write a wrapper for the printer device or print monitor with code to capture the ID of the pages/person/date/time requesting the print.
2. look for network monitor software that captures network printer metrics for your client.
3. look for WinAPIs that allow you to monitor windows messages.  Look for Printer messages.
4. require the users to supply information (ala Logon) every time they use the printer.

5. replace the print manager! Look for products like Print Manager Plus from Sunbelt Software.
Commented:
Hi!

Very problematic need to make sure the macine which does this control operation stays online and does not slow by any other problem!

On LAN you could use function like this:

http://www.andreavb.f2s.com/tip070007.html

Call it whit timer and make log file for changes, printer may be very fast, 30ppm.

And see this too:

http://www.mvps.org/vbnet/index.html?code/enums/enumprinters.htm

Net situation is a bit of worse you can't base it on print only for view, but this is "more easy one" just charge when the document is shown, precheck for your database how many pages there are. The printer detection whitout shares, just not bossible!

May be the bestway if it's technically posible:
Does the printer/copymacine used there give this data from it's memory by it's own API.

Matti

Commented:
Wow.
Great links there, Matti.  After reviewing your info, I think I'll reserve my suggestion. ;-)

Good Work,
CArnold
Ryan ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer
CERTIFIED EXPERT

Commented:
<listening..>
olx

Commented:
excelent link Matti!...
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
- points to Matti
Please leave any comments here within the
next seven days.

Commented:
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange

Explore More ContentExplore courses, solutions, and other research materials related to this topic.