From: Miguel Guimaraes <mguimaraes.etec@ip.pt>
Date: Mon, 12 May 1997 12:01:47


I want to merge two ps files in this way:

+-----------------------------+   +-----------------------------+
|nice header with pictures    |   |                             |
|                             |   |                             |
|                             | + | ps generated by mpage       |
=                     
|                             |   |                             |
|nice footer with page number |   |                             |
+-----------------------------+   +-----------------------------+

+-----------------------------+
|nice header with pictures    |
|                             |
| ps generated by mpage       |
|                             | 
|nice footer with page number |
+-----------------------------+

Merging two ps files 

I have an 'had hoc' solution that works in this way:
- Header and Footer are generated in ms-word and printed in file1.ps
  Then 'mpage [options] file1.ps > file1.ps.mp'
- The second file is generated by mpage (text _only_) 'text.ps' 
- The merged file: 'mergeps file1.ps.mp text.ps > merged.ps'
  (The order of arguments is important; header and footer must come    
first)

It doesn't intend to be more than a little aproach for a _specific_ task
and works (I didn't test it very hard :-) fine.
It is in flex source, 'mergeps.lex'

Best Regards,
M.Guimaraes

To use this: flex mergeps.lex
             cc lex.yy.c -o mergeps
