Jump to content

Script to print files to network printer

- - - - -

  • Please log in to reply
No replies to this topic

#1
koen.daamen

koen.daamen

    Newbie

  • Members
  • Pip
  • 1 posts
L.S.

Short Description
===========
I need a script to print files (mostly .doc or .pdf) to the default network printer in a WindowsXP environment. I do not have any admin-rights. For printing purposes: Acrobat READER is installed.

Longer Description
============
I work at a school which publishes weekly newsletters. All children are given a paper copy of this newsletter. However, not every classroom has the same amount of children, and since we house over 900 children, counting a bundle of papers for each classroom is time consuming. Further more, we have a industrial printer which can bundle for us. The trick is to tell it how many copies it needs to print.
So, I have a csv file with a table (classroom label, number of children, etc.) The script needs to read that csv file and print out a file in a certain folder (the file being a .doc, .docx or .pdf) X times. (X being the number of children in a certain classroom.) It repeats this for as many classrooms as there are in the csv file.

So, in programming style:

read CSV
read FILE in FOLDER
while CSV-classroom
| print FILE times CSV-number-of-children-COPIES
wend

It sounds simple, but I've already browsed more than 100 hours on the net, trying things in javascript and VBscript, but it seems that a neat solution does not exist. (VBscript only allows printing pdfs when Acrobat Writer is installed.)

By the way, I do not want to use this solution:

read CSV
read FILE in FOLDER
while CSV-classroom
| copies = CSV-number-of-children-COPIES
| FOR i = 1 to copies
|| print FILE
| NEXT
wend

Because with over 900 children, the printer buffer will be swamped. Further more, for each file the printer needs 6-10 seconds to start up. Printing 1 FILE X copies, only requires 1 startup, but printing 1 FILE X times using a for-next-loop, requires X startups.

Question
======
Which script would be best to use in a Windows XP environment and can print at least .doc and .pdf files (more types would be nice, of course.) It needs to be a script, since I do not have admin rights and cannot install any programms. (Portable programs DO work however, so doing it in Apache, Python, Java, whatever, is perfectly ok!)
Simply ask the server-admin to install a program for me will NOT work, since I already have made 5 requests per year for the last 5 years to install a program, and all I get is: "Yes, certainly, very soon now!"

kind regards, Koen Daamen




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users