This is a discussion on printing queue within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi I have create printing queue pdfmail pdfmaildev READY which characteristic is as a beckend (shell script /usr/local/lido/ pdfprinter.ksh) ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi I have create printing queue pdfmail pdfmaildev READY which characteristic is as a beckend (shell script /usr/local/lido/ pdfprinter.ksh) includes lines below ------ #!/usr/bin/ksh /local/bin/ps2pdf13 -sPAPERSIZE=a4 - - |uuencode filename.pdf | mailx -s " pdf" login@hostname.com ------ so as a shell command line above works fine but when I'm using printing queue I can not receive valid attachement. Mail appears like mesaage with empty file. any ideas ..? what I should change in definition of queue ...? looking forward Marcin |
| |||
| On Nov 5, 9:58 pm, Marcin.Dittm...@gmail.com wrote: > Hi > > I have create printing queue > pdfmail pdfmaildev READY > > which characteristic is as a beckend (shell script /usr/local/lido/ > pdfprinter.ksh) > includes lines below > ------ > #!/usr/bin/ksh > /local/bin/ps2pdf13 -sPAPERSIZE=a4 - - |uuencode filename.pdf | > mailx -s " pdf" lo...@hostname.com > ------ > > so as a shell command line above works fine but when I'm using > printing queue I can not receive valid attachement. Mail appears like > mesaage with empty file. > > any ideas ..? > what I should change in definition of queue ...? > > looking forward > Marcin Make sure you include the full path of: -uuencode and -your attachment (filename.pdf). |
| |||
| <Marcin.Dittmann@gmail.com> wrote in message news:1194260308.035962.286770@y42g2000hsy.googlegr oups.com... > Hi > > I have create printing queue > pdfmail pdfmaildev READY > > which characteristic is as a beckend (shell script /usr/local/lido/ > pdfprinter.ksh) > includes lines below > ------ > #!/usr/bin/ksh > /local/bin/ps2pdf13 -sPAPERSIZE=a4 - - |uuencode filename.pdf | > mailx -s " pdf" login@hostname.com > ------ > > so as a shell command line above works fine but when I'm using > printing queue I can not receive valid attachement. Mail appears like > mesaage with empty file. The file to be printed is not passed as stidin to the backend. The filename is passed as a command line arg to the backend. #!/usr/bin/ksh /local/bin/ps2pdf13 -sPAPERSIZE=a4 "$@" |uuencode filename.pdf | mailx -s " pdf" login@hostname.com |
| |||
| Marcin.Dittmann@gmail.com wrote: > #!/usr/bin/ksh > /local/bin/ps2pdf13 -sPAPERSIZE=a4 - - |uuencode filename.pdf | > mailx -s " pdf" login@hostname.com Why do you use 2 times the dash ? -- Toralf Förster pgp key 0x7DB69DA3 |
| |||
| On Nov 6, 1:25 am, jp <jpi...@yakka.com.au> wrote: > On Nov 5, 9:58 pm, Marcin.Dittm...@gmail.com wrote: > > > > > Hi > > > I have create printing queue > > pdfmail pdfmaildev READY > > > which characteristic is as a beckend (shell script /usr/local/lido/ > > pdfprinter.ksh) > > includes lines below > > ------ > > #!/usr/bin/ksh > > /local/bin/ps2pdf13 -sPAPERSIZE=a4 - - |uuencode filename.pdf | > > mailx -s " pdf" lo...@hostname.com > > ------ > > > so as a shell command line above works fine but when I'm using > > printing queue I can not receive valid attachement. Mail appears like > > mesaage with empty file. > > > any ideas ..? > > what I should change in definition of queue ...? > > > looking forward > > Marcin > > Make sure you include the full path of: > -uuencode and > -your attachment (filename.pdf). I don't think so, as uuencode is being used as a pipe |
| |||
| On Nov 5, 4:12 pm, Toralf Förster <toralf.foers...@gmx.de> wrote: > Marcin.Dittm...@gmail.com wrote: > > #!/usr/bin/ksh > > /local/bin/ps2pdf13 -sPAPERSIZE=a4 - - |uuencode filename.pdf | > > mailx -s " pdf" lo...@hostname.com > > Why do you use 2 times the dash ? > -- > Toralf Förster > pgp key 0x7DB69DA3 hi, I want to create virtual printer queue which would work this way: user is printing from my application (app generates Postscript) and instead sending that to the printer I want to convert the stream to the pdf and send by e-mail). I had a problem to set queue system to accept postscript as a standard in. ps2pdf ask for 2 parametres: input file (.ps) and output file (.pdf) - - in my case it is read from STDIN, conver to pdf(stdout), and pdf send to uuencode which encapsulates that to the uuencode format and mailx does the rest. regards |
| |||
| I want to create virtual printer queue which would work this way: user is printing from my application (app generates Postscript) and instead sending that to the printer I want to convert the stream to the pdf and send by e-mail). I had a problem to set queue system to accept postscript as a standard in. ps2pdf ask for 2 parametres: input file (.ps) and output file (.pdf) - - in my case it is read from STDIN, conver to pdf(stdout), and pdf send to uuencode which encapsulates that to the uuencode format and mailx does the rest. Sounds like you don't really need a virtual printer to do anything here. How about a simple backend shell script? #!/bin/ksh ps2pdf "$@" outputfile.pdf uuencode outputfile.pdf outputfile.pdf | mail ................. |
| |||
| On 7 Lis, 00:20, <laixs...@laixsoft.com> wrote: > I want to create virtual printer queue which would work this way: > user is printing from my application (app generates Postscript) and > instead sending that to the printer I want to convert the stream to > the pdf and send by e-mail). I had a problem to set queue system to > accept postscript as a standard in. > > ps2pdf ask for 2 parametres: input file (.ps) and output file (.pdf) > > - - in my case it is read from STDIN, conver to pdf(stdout), and pdf > send to uuencode which encapsulates that to the uuencode format and > mailx does the rest. > > Sounds like you don't really need a virtual printer to do anything here. > How about a simple backend shell script? > > #!/bin/ksh > ps2pdf "$@" outputfile.pdf > uuencode outputfile.pdf outputfile.pdf | mail ................. Hi, yes, I need simple backend but connected to the printer spooler. I can not change the code in the APP itslef. What application has is a print button which just sends the stream to the default printer queue. I was wondering how to intercept this Postscript and do smth with it. Like create pdf and mail it. Regards Marcin |
| ||||
| <Marcin.Dittmann@gmail.com> wrote in message news:1194448875.158346.122830@o38g2000hse.googlegr oups.com... > On 7 Lis, 00:20, <laixs...@laixsoft.com> wrote: >> I want to create virtual printer queue which would work this way: >> user is printing from my application (app generates Postscript) and >> instead sending that to the printer I want to convert the stream to >> the pdf and send by e-mail). I had a problem to set queue system to >> accept postscript as a standard in. >> >> ps2pdf ask for 2 parametres: input file (.ps) and output file (.pdf) >> >> - - in my case it is read from STDIN, conver to pdf(stdout), and pdf >> send to uuencode which encapsulates that to the uuencode format and >> mailx does the rest. >> >> Sounds like you don't really need a virtual printer to do anything here. >> How about a simple backend shell script? >> >> #!/bin/ksh >> ps2pdf "$@" outputfile.pdf >> uuencode outputfile.pdf outputfile.pdf | mail ................. > > Hi, > > yes, I need simple backend but connected to the printer spooler. I can > not > change the code in the APP itslef. What application has is a print > button > which just sends the stream to the default printer queue. I was > wondering > how to intercept this Postscript and do smth with it. Like create pdf > and > mail it. Several ways you could do this. The easiest is use the above script as a print queue backend. in /etc/qconfig: qname: device = devname devname: backend = /your/script where /your/script is the shell script: #!/bin/ksh ps2pdf "$@" outputfile.pdf uuencode outputfile.pdf outputfile.pdf | mail ................. |