vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| <gdoogle@yahoo.com> wrote in message news:1187671353.505329.298080@19g2000hsx.googlegro ups.com... > How do you define a prt queue that will print the files to a directory > such as /tmp/printfiles? If you just want to append all print jobs to a single file, you can just create a queue that prints to a file (/tmp/printfiles/whatever) instead of /dev/lp## If you want to store each job in its own file, you'll need a print queue backend program or filter which could be as simple as a script to copy the output of the queue to a file. It also depends on if you want to ONLY store the job, or do you want to print to a printer and store a copy? If you want to both store and print a copy, it is often easier to do with a virtual printer filter instead of a queue backend script. We've got a virtual printer filter that can store copies of print jobs into a directory structure of your chosing (/tmp/printfiles/queueName/year/month/username_job# for example). It will also optionally compress the archived copies if you're printing and storing large documents. You can download Archive from http://www.laixsoft.com Regards, Paul |
| |||
| <gdoogle@yahoo.com> wrote in message news:1187751908.935786.92490@i13g2000prf.googlegro ups.com... > Thanks Paul. I'd like to store each job in its own file. Could > anyone give me an example of the backend program to copy the output of > the queue to a file? At its most simplistic: #!/bin/ksh FILENAME=`determine your filename to save to here` # Assuming there aren't any command-line flags on the command to queue the job cp "$@" $FILENAME Or if you want the formatter to format the job before storing a copy: #!/bin/ksh FILENAME=`determine your filename to save to here` /usr/lib/lpd/piobe "$@" > $FILENAME |
| |||
| > > At its most simplistic: > > #!/bin/ksh > FILENAME=`determine your filename to save to here` > # Assuming there aren't any command-line flags on the command to queue the > job > cp "$@" $FILENAME > > Or if you want the formatter to format the job before storing a copy: > #!/bin/ksh > FILENAME=`determine your filename to save to here` > /usr/lib/lpd/piobe "$@" > $FILENAME Thanks for the help. Unfortunately, I haven't made much headway on this. How can I make the backend write each file to a seperate file in the same folder without having to specify the filename to save to? Both examples listed show the FILENAME being set before the copy or print. Also, when the queue is defined do I use the parameter "BACKEND OUTPUT FILE pathname"? This appears to really mean 'which file name do you want to save the file to'. Thanks. |
| ||||
| <gdoogle@yahoo.com> wrote in message news:1188252978.742752.188080@g4g2000hsf.googlegro ups.com... > > >> At its most simplistic: >> >> #!/bin/ksh >> FILENAME=`determine your filename to save to here` >> # Assuming there aren't any command-line flags on the command to queue >> the >> job >> cp "$@" $FILENAME >> >> Or if you want the formatter to format the job before storing a copy: >> #!/bin/ksh >> FILENAME=`determine your filename to save to here` >> /usr/lib/lpd/piobe "$@" > $FILENAME > > > Thanks for the help. Unfortunately, I haven't made much headway on > this. > > How can I make the backend write each file to a seperate file in the > same folder without having to specify the filename to save to? Both > examples listed show the FILENAME being set before the copy or print. > Also, when the queue is defined do I use the parameter "BACKEND OUTPUT > FILE pathname"? This appears to really mean 'which file name do you > want to save the file to'. Backend output file pathname would be an option for configuring a queue to point to a file where all files would be appended to that same file. If you want to store each print job to a distinct file, you will need to form the filename within your backend program. If you're writing a backend in C instead of as a script, you can use the routines in libqb.a to communicate with qdaemon to get information about the job (get_from() for example). We do offer the Archive filter which does what you need if you'd prefer a ready made solution instead of building your own. Best regards, Paul |