Revisit https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3161
[obnox/wireshark/wip.git] / print.ps
index 9ffb825d7a4be6470f0f9f73bb245e2e63dcd2d1..5ae242934c7eba7c394d451f7824b2da14436c82 100644 (file)
--- a/print.ps
+++ b/print.ps
@@ -4,7 +4,6 @@
 % Anything else is thrown away, and is for testing only.
 %
 % ---- wireshark preamble start ---- %
-%!
 %!PS-Adobe-2.0
 %
 % Wireshark - Network traffic analyzer
@@ -12,8 +11,8 @@
 % Copyright 1998 Gerald Combs
 %
 %%Creator: Wireshark
-%%Title: wireshark.ps
-%%DocumentFonts: Helvetica Courier
+%%Title: Wireshark output
+%%DocumentFonts: Helvetica Monaco
 %%EndComments
 %!
 
@@ -50,20 +49,13 @@ clippath pathbbox
 /hmax exch def
 pop pop                % junk
 
-% 1-inch margins
-%/lmargin 72 def
-%/tmargin vmax 72 sub def
-%/bmargin 72 def
-%/pagenumtab hmax 72 sub def
-
 % 1/2-inch margins
 /lmargin 36 def                                        % left margin
 /tmargin vmax 56 sub def               % top margin
 /bmargin 36 def                                        % bottom margin
-/pagenumtab hmax 36 sub def    % right margin
+/pagenumtab hmax 36 sub def            % right margin
 
 % Counters
-/vpos vmax 40 sub def
 /thispagenum 1 def
 
 % Strings
@@ -90,7 +82,7 @@ pop pop               % junk
 
        /vpos vpos 10 sub def
 
-       vpos bmargin le                         % is vpos <= bottom margin?
+       vpos 5 sub bmargin le           % is vpos <= bottom margin?
        {
                formfeed
        }
@@ -104,7 +96,7 @@ pop pop              % junk
        /indent exch def
        
        % wrapat = width / sizeof font (remember: monospaced font)
-       /pagewidth pagenumtab bmargin sub def
+       /pagewidth pagenumtab lmargin sub def
        /cwidth (A) stringwidth pop def
        /wrapat pagewidth cwidth div cvi def
                
@@ -131,10 +123,10 @@ pop pop           % junk
                lmargin                                         % X
                vmax 36 sub                                     % Y
                moveto
-               eth_pagetitle show
+               ws_pagetitle show
 
                % this page number
-               pagenumtab (Page ) stringwidth pop sub thispagenum pagenostr cvs stringwidth pop sub                                    % X
+               pagenumtab (Page ) stringwidth pop sub thispagenum pagenostr cvs stringwidth pop sub            % X
                vmax 36 sub                                     % Y
                moveto
                (Page ) show
@@ -158,7 +150,6 @@ pop pop             % junk
                bmargin                                         % Y
                moveto
                
-               % title
                pagenumtab                                      % X
                bmargin                                         % Y
                lineto
@@ -170,13 +161,13 @@ pop pop           % junk
 % Reset the vertical position
 /vpos tmargin def
 
-% ---- wireshark preamble end ---- %
-
 % Set the font to 8 point
-/Courier findfont 8 scalefont setfont
+/Monaco findfont 8 scalefont setfont
+
+% ---- wireshark preamble end ---- %
 
 % the page title
-/eth_pagetitle (Wireshark) def
+/ws_pagetitle (Wireshark) def
 
 % Display our output lines.
 
@@ -246,12 +237,9 @@ formfeed
 
 % ---- wireshark finale start ---- %
 
-% If this is not the first page, then print the page number
-thispagenum 1 gt                               % is thispagenum > 1 ?
-{
-       printpagedecorations
-}
-if
-
+printpagedecorations
 showpage
+
+%%EOF
+
 % ---- wireshark finale end ---- %