Hi Patrick

On Thu, 13 Jul 2000 [EMAIL PROTECTED] wrote:

> > > I am a little puzzled why this is making a difference.
> >
> > Okay, my hack/trick is that I want a "bannerline", please note "line" not
> > "page" (as in bannerpage).
> >
> > I have written some postscript-code which makes an bannerline on each page
> > (see attachment: bannerpage.ps)
> >
> > My "old" printer system, were sending the print job as one ps-file,
> > generated through our own filter. Now I want to upgrade to ifhp (it is
> > much cleaner and better than our own filter).
> >
> > But bannerpage with ifhp, is done in 2 stages ...!
> > ("of" prints the bannerpage, "if" prints the "real" job)
> > That is 2 seperate print jobs, which means that my postscript code from
> > the bannerpage.ps does NOT have any effekt on the second job.
> >
> > What I'm doing is in the above (in my printcap file), is to make sure that
> > nothing happens between the 2 filters "of" and "if", so that my bannerline
> > postscript code doesn't get "deleted", but survives in the printer.
> 
> Well,  I have a solution but you will not like it.  I think.

I have solved the problem exactly this way ;-) And was about to answer my
own mail with this solution ;-)

So I like it!
 
> First,  if I get this straight,  you want to
> 
> a) send some PostScript at the start of each PostScript file
Yes, I want to set a postscript "hock" on /Endpage (attaching it to the
pagedevice mekanism), which means that it gets activated on every page
(and prints my bannerline).

> b) have this PostScript 'configured' for each user.
Yes, I just didn't realize that the information was available in the
ifhp.conf, until I saw the "pjl_ready_msg" syntax.

> Suppose that we append the following to the ifhp.conf file:
> 
> [ hp5simx ]
> tc=hp5simx
> 
> ps_bannerline= 
>  20 dict begin
>  /bline true def
>  /user (\%s{n}) def
>  /job (\%s{J}) def
>  /file (\%s{f}) def
>  /host (\%s{H}) def
>  /date (\%s{D}) def
>  /printer (\s%{P}) def
>  %
>  % Bannerpage and bannerline postscript code
>  %
>  /mm { 25.4 div 72 mul } def
>  /ef1 /Helvetica findfont [9 0 0 6 0 0] makefont def
>  /ef2 /Courier   findfont [9 0 0 6 0 0] makefont def
>  bline { %if
>    /mbline {
>      gsave
>      initgraphics
>      90 rotate
>      //ef1 setfont  32 //mm exec -8 //mm exec moveto (User: ) show
>         //ef2 setfont //user show
>      //ef1 setfont 112 //mm exec -8 //mm exec moveto (File: ) show
>         //ef2 setfont //file show
>      //ef1 setfont 192 //mm exec -8 //mm exec moveto (Date: ) show
>         //ef2 setfont //date show
>      //ef2 setfont 112 //mm exec -6 //mm exec moveto (Printed at ) show
>         //ef1 setfont (DIKU) show
>      grestore
>    } bind def
>  } { /mbline { } def } ifelse
>  << /EndPage { 2 ne dup { //mbline exec } if exch pop } bind >> setpagedevice
>  end
> ps_init+=[ bannerline ]
> 
> 
> Now we use the same setup as before:
> ...

Now I just want the students (users) to be able to choose between
bannerline and no bannerline ... but this should be easy to solve ;-)

The only thing which bugs me is \%s{D}, which is the "date". I would like
an more pretty output ... is there any way I can do this? (eg. specifying 
my own parameters/variables \%s{pretty_date_format})


Thank you for your answer :-)

Hilsen
  Jesper Brouer

-------------------------------------------------------------------
System Administrator
Dept. of Computer Science, University of Copenhagen
E-mail: [EMAIL PROTECTED], Direct Tel.: 353 21375
-------------------------------------------------------------------


-----------------------------------------------------------------------------
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to