home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 19 Printer / 19-Printer.zip / CPOST.ZIP / sample.ips < prev   
Text File  |  1993-01-18  |  4KB  |  140 lines

  1. %-------------------------------------------------------------------
  2. % Sample imbed file for cPost for an alternate header for cPost.
  3. % This should be imbedded in the cPost output with the -i option.
  4. % See cPost.doc for more information
  5. %-------------------------------------------------------------------
  6.  
  7. %------------------------------------------------------------------
  8. % redefine the margin sizes
  9. %------------------------------------------------------------------
  10. /lMargin     .5   Inch           def % margin: left
  11. /rMargin     .5   Inch           def % margin: right
  12. /tMargin    1     Inch           def % margin: top
  13. /bMargin     .75  Inch           def % margin: bottom
  14.  
  15. %------------------------------------------------------------------
  16. % header (and trailer) info
  17. %------------------------------------------------------------------
  18. /yh1 pLength .65 Inch sub .25 Inch sub def
  19. /yh2 pLength .5  Inch sub .25 Inch sub def
  20. /yh3 .65  Inch def
  21. /yh4 .45  Inch def
  22.  
  23. %------------------------------------------------------------------
  24. % line to print at top of the page
  25. %    put the text to be written in the header between the ()
  26. %    characters.  Do not use (, ), or / inbetween the () characters
  27. %    unless you know PostScript.
  28. %------------------------------------------------------------------
  29. /logoText (Your name in lights) def
  30.  
  31. %------------------------------------------------------------------
  32. % print logo text
  33. %------------------------------------------------------------------
  34. /printLogoText
  35.    {
  36.    /Times-Bold findfont 15 scalefont setfont
  37.  
  38.    pWidth logoText stringwidth pop sub 2 div
  39.    pLength .65 Inch sub
  40.    moveto
  41.  
  42.    logoText show
  43.    } def
  44.  
  45. %------------------------------------------------------------------
  46. % print a header and trailer for odd numbered pages
  47. %------------------------------------------------------------------
  48. /header1
  49.    {
  50.    printLogoText
  51.  
  52.    newpath
  53.       lMargin            yh1 moveto
  54.       pWidth rMargin sub yh1 lineto
  55.    stroke
  56.  
  57.    /Times-Roman findfont 14 scalefont setfont
  58.  
  59.    lMargin yh2 moveto
  60.    currFunc show
  61.  
  62.    /numberBuffer 10 string def
  63.    pWidth rMargin                           sub
  64.    pageNum numberBuffer cvs stringwidth pop sub
  65.    (page ) stringwidth pop                  sub
  66.    yh2 moveto
  67.    (page ) show numberBuffer show
  68.  
  69.    newpath
  70.       lMargin yh3 moveto
  71.       pWidth rMargin sub yh3 lineto
  72.    stroke
  73.  
  74.    /Helvetica findfont 7 scalefont setfont
  75.  
  76.    lMargin yh4 moveto
  77.    (Print date: ) show
  78.    printDate show
  79.  
  80.    lMargin 2 Inch add yh4 moveto
  81.    (File date: ) show
  82.    fileDateTime show
  83.  
  84.    /Times-Roman findfont 14 scalefont setfont
  85.  
  86.    pWidth rMargin           sub
  87.    fileName stringwidth pop sub
  88.  
  89.    yh4 moveto
  90.    fileName show
  91.    }
  92.    def
  93.  
  94. %------------------------------------------------------------------
  95. % print a header and trailer for even numbered pages
  96. %------------------------------------------------------------------
  97. /header2
  98.    {
  99.    printLogoText
  100.  
  101.    newpath
  102.       lMargin            yh1 moveto
  103.       pWidth rMargin sub yh1 lineto
  104.    stroke
  105.  
  106.    /Times-Roman findfont 14 scalefont setfont
  107.  
  108.    pWidth rMargin           sub
  109.    currFunc stringwidth pop sub
  110.    yh2 moveto
  111.    currFunc show
  112.  
  113.    /numberBuffer 10 string def
  114.    pageNum numberBuffer cvs pop
  115.    lMargin yh2 moveto
  116.    (page ) show numberBuffer show
  117.  
  118.    newpath
  119.       lMargin yh3 moveto
  120.       pWidth rMargin sub yh3 lineto
  121.    stroke
  122.  
  123.    /Helvetica findfont 7 scalefont setfont
  124.  
  125.    4 Inch yh4 moveto
  126.    (Print date: ) show
  127.    printDate show
  128.  
  129.    6 Inch yh4 moveto
  130.    (File date: ) show
  131.    fileDateTime show
  132.  
  133.    /Times-Roman findfont 14 scalefont setfont
  134.  
  135.    lMargin yh4 moveto
  136.    fileName show
  137.    }
  138.    def
  139.  
  140.