Unix Technical Forum

printing queue

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) ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 11:54 AM
Marcin.Dittmann@gmail.com
 
Posts: n/a
Default printing queue

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 11:54 AM
jp
 
Posts: n/a
Default Re: printing queue

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).

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 11:54 AM
 
Posts: n/a
Default Re: printing queue


<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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 11:54 AM
Toralf =?utf-8?q?F=C3=B6rster?=
 
Posts: n/a
Default Re: printing queue

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 11:54 AM
Henry
 
Posts: n/a
Default Re: printing queue

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2008, 11:54 AM
Marcin.Dittmann@gmail.com
 
Posts: n/a
Default Re: printing queue

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-05-2008, 11:54 AM
 
Posts: n/a
Default Re: printing queue


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 .................


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-05-2008, 11:54 AM
Marcin.Dittmann@gmail.com
 
Posts: n/a
Default Re: printing queue

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-05-2008, 11:54 AM
 
Posts: n/a
Default Re: printing queue


<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 .................


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:19 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com