Products | About Us

Tracking printer use with Print Distributor

Use this script to keep a log of prints in a CSV file which you can open in a spreadsheet or import into a database.

Start by creating your virtual printer in Print Distributor Manager selecting the name and driver for your printer. Then at the list of actions start by adding a Script action with the following code:

' Log print details to file

Dim oFSO
Dim oTS
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oTS = oFSO.OpenTextFile("C:\Print-log.csv", 8, true)
oTS.WriteLine DocumentName & "," & UserName & "," & TotalPages & "," & Date
oTS.Close

Following this add a Reprint action specifying the final destination, your list of actions should look something like this:

Log print job information to file

Finally we need to make a small tweak to the printer settings to make sure the TotalPages variable is populated correctly. Open the printer properties for our virtual printer in the Advanced tab select "Start printing after last page is spooled."

Start printing after last page is spooled

Now every time you print to the virtual printer as well as your final copy arriving at the printer an extra line will be added to the file C:\Print-log.csv, just open it in your spreadsheet program to see who has been printing what and when.

Feed