1827400 Members
4889 Online
109965 Solutions
New Discussion

psuedo printer

 
Mark Wolf_2
Advisor

psuedo printer

Sles9 SP3
CUPS printing

I need to create a psuedo printer that moves a file into a nfs mounted share. I am guessing that I can do this using "pipe" within CUPS. Any help in understanding how to accomplish this would be appreciated.

The documentation for CUPS mentions using PIPE but it is not very clear how and examples are non-exsistant. I have searched every way I know how for examples and have come up empty.

Point me to documentation that will help or explain how to, either way will be deeply appreciated.

Mark
3 REPLIES 3
Craig Gilmore
Trusted Contributor

Re: psuedo printer

Mark,

Take a look at this writeup:

http://aplawrence.com/MacOSX/macosxcupstofile.html

CUPS is cups. Since you are wanting to write to a file, you don't need to use a pipe, unless you want the filename to change with each output.

Just using the syntax:

file:/path/to/filename.prn

on the printer creation should do the trick.

You could get fancy, and include a call to the date command to alter the filename.

file:/path/out.`date`.prn

If you still want to use a pipe, the writeup above has some detailed suggestions.
Mark Wolf_2
Advisor

Re: psuedo printer

Graig

The file name does need to change for each request. Is there an enviroment variable that cups uses that could be used as the name of the output file? Specifically the name of the input file. The best solution would be for the output file to be named the same as the input file.

If I have to define a name for the file is the .prn extention a requirement for this fuction?

Mark
Mark Wolf_2
Advisor

Re: psuedo printer

I have moved on to other issues....I will have to address this one again when I have time.