Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %
- % Default simple header.
- % Copyright (c) 1995 Markku Rossi.
- % Author: Markku Rossi <[email protected]>
- %
- % Modified: Chris Josefy, USA, MAY 2006
- % + Added line wrapping to header to work more like AIX enscript
- % + This assumes that one does not change the header font size from the default
- % + This also assumes that the line only wraps once
- %
- % This file is part of GNU enscript.
- %
- % This program is free software; you can redistribute it and/or modify
- % it under the terms of the GNU General Public License as published by
- % the Free Software Foundation; either version 2, or (at your option)
- % any later version.
- %
- % This program is distributed in the hope that it will be useful,
- % but WITHOUT ANY WARRANTY; without even the implied warranty of
- % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- % GNU General Public License for more details.
- %
- % You should have received a copy of the GNU General Public License
- % along with this program; see the file COPYING. If not, write to
- % the Free Software Foundation, 59 Temple Place - Suite 330,
- % Boston, MA 02111-1307, USA.
- %
- % -- code follows this line --
- %Format: fmodstr $D{%a %b %d %H:%M:%S %Y}
- %Format: pagenumstr $V$%
- %HeaderHeight: 44
- %FooterHeight: 44
- /do_header { % print default simple header
- gsave
- d_header_x d_header_y HFpt_h 3 div add translate
- HF setfont
- user_header_p {
- 5 0 moveto user_header_left_str show
- d_header_w user_header_center_str stringwidth pop sub 2 div
- 0 moveto user_header_center_str show
- d_header_w user_header_right_str stringwidth pop sub 5 sub
- 0 moveto user_header_right_str show
- } {
- fname length fmodstr length add pagenumstr length add 95 6 idiv add d_header_w 6 idiv le{
- 5 0 moveto fname show
- 45 0 rmoveto fmodstr show
- 45 0 rmoveto pagenumstr show
- } {
- 5 0 moveto fmodstr show
- 45 0 rmoveto pagenumstr show
- fname length d_header_w 6 idiv idiv 1 add 10 mul 5 exch moveto
- 1 1 fname length d_header_w 6 idiv idiv
- {
- dup fname exch 1 sub d_header_w 6 idiv mul d_header_w 6 idiv getinterval show
- 5 exch 10 mul fname length d_header_w 6 idiv idiv 1 add 10 mul exch sub moveto
- } for
- 5 10 moveto
- fname fname length d_header_w 6 idiv idiv d_header_w 6 idiv mul dup fname length exch sub getinterval show
- }ifelse
- }ifelse
- grestore
- gsave
- d_footer_x d_footer_y HFpt_h 3 div add translate
- HF setfont
- user_footer_p {
- 5 0 moveto user_footer_left_str show
- d_footer_w user_footer_center_str stringwidth pop sub 2 div
- 0 moveto user_footer_center_str show
- d_footer_w user_footer_right_str stringwidth pop sub 5 sub
- 0 moveto user_footer_right_str show
- } {
- fname length fmodstr length add pagenumstr length add 95 6 idiv add d_footer_w 6 idiv le{
- 5 0 moveto fname show
- 45 0 rmoveto fmodstr show
- 45 0 rmoveto pagenumstr show
- } {
- 5 0 moveto fmodstr show
- 45 0 rmoveto pagenumstr show
- fname length d_footer_w 6 idiv idiv 1 add 10 mul 5 exch moveto
- 1 1 fname length d_footer_w 6 idiv idiv
- {
- dup fname exch 1 sub d_footer_w 6 idiv mul d_footer_w 6 idiv getinterval show
- 5 exch 10 mul fname length d_footer_w 6 idiv idiv 1 add 10 mul exch sub moveto
- } for
- 5 10 moveto
- fname fname length d_footer_w 6 idiv idiv d_footer_w 6 idiv mul dup fname length exch sub getinterval show
- }ifelse
- }ifelse
- grestore
- } def
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement