I have had a look at the Ethereal postscript output for a summary print (as
colourisation is only really useful for summary display).
One way to do colourisation is to change the putline postscript macro so
that it paints a rectangle of the background colour and then prints the text
in the foreground colour over the top:
% Prints text with possible indenting and colour
% Input format: [indent] (text) [RGB text colour] [RGB background
colour] putline
/putline {
setrgbcolor % background colour
lmargin vpos 2 sub pagenumtab lmargin sub 10 rectfill
setrgbcolor % text colour
exch 10 mul lmargin add % X
vpos % Y
moveto
show
So the line:
0 (blah blah blah) 1 0 0 0 0 1 putline
Will display "blah blah blah" in red on a blue background. The foreground
and background colours could be taken from the display colourisation
filters.
The printpagenum macro also needs the following line added to keep the page
number in black:
0 0 0 setrgbcolor
I've attached the postscript file that I hacked, in case anyone is
interested in coding Ethereal to do colourised postscript output.
I also changed the body font size to 8 point, the headings to 10 point, and
the margins to 2 cm so that it would fit on an A4 landscape page. The
current Ethereal output (0.9.8) tends to run off the right margin. These
would also be good things to include in a revised postscript printing
module.
Jonathon.
-----Original Message-----
From: Guy Harris [mailto:guy@xxxxxxxxxx]
Sent: Wednesday, 18 December 2002 11:42
To: Jonathon Exley
Cc: 'ethereal-users@xxxxxxxxxxxx'
Subject: Re: [Ethereal-users] printing colourised display using
postscript
On Wed, Dec 18, 2002 at 11:38:38AM +1300, Jonathon Exley wrote:
> Would coding this be a biggie?
I'm not a PostScript expert, so I don't know how much work is involved.
> It would be a very useful feature for documenting network conditions.
Perhaps some PostScript expert will code it at some point.
Attachment:
colour.ps
Description: PostScript document