Retrieving files from print queue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Retrieving files from print queue
# 1  
Old 06-19-2008
Retrieving files from print queue

Hi,

wonder if anyone can help me out with this. I'm trying to retrieve files from a print queue on a remote server i.e. get files before they are printed. I'll be using perl to do this. I've written out some pseudocode below:

Telnet to print server
for ever (endless loop)
pause 1 second
run lpq command
parse output from lpq command
if there are any files in print queue
get list of files (how do we do this ????????)
for every file in print queue
ftp file to 'our' server
endfor
endif
endfor


Basically I cannot write any code on the remote server to do this I have to do it all using my own script on 'our' server. Does anyone know how I can actually retrieve the files from the print queue?

Any help would be much appreciated. Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Print queue problems

I am using AIX 5. Just swapped over an HP printer. The old printer was on a JetDirect box. The new printer connects directly to the network. Using the same IP address to print to, so the only alteration I made was to edit the etc/qconfig file to alter the port setting from 9103 to 9100. I can... (2 Replies)
Discussion started by: charding
2 Replies

2. UNIX for Advanced & Expert Users

[Solved] remove all print jobs from a print queue

Hello, Sometimes i need to clear all the jobs of a print queue and it is really annoying to cancel one by one. Is there a way to cancel all print jobs for a specific print queue with a single command instead of cancelling them one by one? My AIX system is 5.3 Thank you for your attention (2 Replies)
Discussion started by: omonoiatis9
2 Replies

3. AIX

Retrieving printer queue properties

Hi everyone! I've been stuck with a job I'm struggling with. A while back we loaded a large number of printer queues into our AIX environment through smit. Since then some of the details have gone astray, including full details on the older printer queues. I need to gather together details on... (2 Replies)
Discussion started by: aoverbury
2 Replies

4. AIX

Print queue setup

Hi I had setup a print queue named test in the AIX server. When I try to print 96 char per line.. it prints only 80 and the rest is skipped to the next line. however there are 16 spaces left as blank in the first line any help is appriciated (0 Replies)
Discussion started by: antointoronto
0 Replies

5. AIX

Print queue restriction

Hi, I'm at AIX 5.3, I have a print queue named chqprinter, I want to allow access to print only 2 users to that print queue, jobs printed by all other users to above queue should be deleted. Any idea how to achieve that? ---------- Post updated at 10:33 AM ---------- Previous update was at... (5 Replies)
Discussion started by: tayyabq8
5 Replies

6. Solaris

Print to ps2pdf print queue

I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (2 Replies)
Discussion started by: Sean_69
2 Replies

7. UNIX for Dummies Questions & Answers

Print to a ps2pdf print queue.

I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (1 Reply)
Discussion started by: Sean_69
1 Replies

8. AIX

AIX 5 print queue

I have setup a printer and queue using SMIT and I have set the default tray to 4. What I am trying to find out is if there is a way to set the next tray it trys to use if tray 4 is empty to tray 3, then tray 2, then tray 1. (0 Replies)
Discussion started by: chefsride
0 Replies

9. UNIX for Dummies Questions & Answers

Problem with print queue

I have a problem with a print queue that keeps going down on me every couple of days. When it happens I run an 'enable' and all is fine for a few more days. Can anyone can tell me where to start looking to debug this problem as i am new to UNIX Thanx (1 Reply)
Discussion started by: carell
1 Replies

10. UNIX for Dummies Questions & Answers

Print Queue Problems

Hi All Does anyone know what is meant by PRINTER STATUS CONNECT concerning print queues? At work we run a Perle/Connectix JetStream 8500 (RJ45 Model) to connect our dot matrix printers and often we get the Connect Status. Nobody I speak to knows what the status means. When the printer... (0 Replies)
Discussion started by: nickbungus
0 Replies
Login or Register to Ask a Question
NPRINT(1)							      nprint								 NPRINT(1)

NAME
nprint - NetWare print client SYNOPSIS
nprint [ -S server ] [ -h ] [ -U username | -n ] [ -C ] [ -q queuename ] [ -d job-description ] [ -p pathname-in-banner ] [ -B username-in- banner ] [ -s ] [ -f filename-in-banner ] [ -l lines ] [ -r rows ] [ -c copies ] [ -t tab size ] [ -T ] [ -N ] [ -F form-number ] filename DESCRIPTION
With nprint, you can print files on print queues of a NetWare file server. There are a lot of options, so you should probably wrap some default configurations into some shell scripts. nprint looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information. Please note that the access permissions of .nwclient MUST be 600, for security reasons. OPTIONS
filename filename is the name of the file you want to print. If file is '-', or no filename is given, standard input is used. -h -h is used to print out a short help text. -S server server is the name of the server you want to use. -U username username is the user name to use for the print request at the server. -P password password is the password to use for the print request at the server. If neither -n nor -P are given, and the user has no open connec- tion to the server, nprint prompts for a password. -n -n should be given if no password is required for the print request. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. -q queuename queuename is the name of the print queue to use at the print server. At present, you must specify it in upper case characters. -d job-description job-description is the string that appears in pconsole when you list the jobs for the print queue. It will also appear in the "Descrip- tion" field on the banner page. -p pathname-in-banner pathname-in-banner is the string (up to 79 characters) you want to be printed in the "Directory" field on the banner page. -B username-in-banner username-in-banner is the string (up to 12 characters) you want to appear on the lower part of the banner page. It will also appear in the "User name" field. -s Supress printing of banner page -f filename-in-banner filename-in-banner is the string (up to 12 characters) you want to appear in large letters on the lower part of the banner page. Default: the name of the file that is printed, or 'stdin'. -l lines lines is the number of lines to put on one page. Default: 66. -r rows rows is the number of rows to put on one page. Default: 80. -c copies copies tells the print server to the specified number of copies. Default: 1. -t tabs tabs is the number of spaces to print for a Tab-Character. Default: 8. -T tells the print server to expand Tab-Character and use 8 spaces -N tells the print server not to use Form Feeds -F form-number form-number is the the number of the form to be put into the printer. If it's different from the one currently in the printer, your job is only printed if a printer operator has put in the correct form. NOTES
The '-B' option was formerly '-b'. But it conflicted with 'bindery only' login option. SEE ALSO
nwclient(5), slist(1), pqlist(1), ncpmount(8), ncpumount(8) CREDITS
nprint was written by Volker Lendecke (lendecke@math.uni-goettingen.de) nprint 12/27/1995 NPRINT(1)