Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/src/cmd/aux/mpage/Contrib/mergeps.txt

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.