aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-04-20 22:34:08 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-04-20 22:34:08 +0000
commit91e61df84e44d9bcb8ebaab6d169e934b5470650 (patch)
treef7272f97ddd40980514981d259656c262b86adfc /print.c
parent7709ed1be1eae61bdcad19156fb248ca800e2fad (diff)
changed postscript output:
reduced print margin to 1/2 inch and font size to 8 point, include filename in page header, wrap too long lines svn path=/trunk/; revision=10652
Diffstat (limited to 'print.c')
-rw-r--r--print.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/print.c b/print.c
index 7a32ac8404..b82358b9c5 100644
--- a/print.c
+++ b/print.c
@@ -1,7 +1,7 @@
/* print.c
* Routines for printing packet analysis trees.
*
- * $Id: print.c,v 1.76 2004/04/17 11:50:13 ulfl Exp $
+ * $Id: print.c,v 1.77 2004/04/20 22:34:08 ulfl Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -704,14 +704,24 @@ void ps_clean_string(unsigned char *out, const unsigned char *in,
/* Some formats need stuff at the beginning of the output */
void
-print_preamble(FILE *fh, gint format)
+print_preamble(FILE *fh, gint format, gchar *filename)
{
+ char psbuffer[MAX_PS_LINE_LENGTH]; /* static sized buffer! */
+
+
switch(format) {
case(PR_FMT_TEXT):
/* do nothing */
break;
case(PR_FMT_PS):
print_ps_preamble(fh);
+ fputs("%% Set the font to 8 point\n", fh);
+ fputs("/Courier findfont 8 scalefont setfont\n", fh);
+ fputs("\n", fh);
+ fputs("%% the page title\n", fh);
+ ps_clean_string(psbuffer, filename, MAX_PS_LINE_LENGTH);
+ fprintf(fh, "/eth_pagetitle (%s - Ethereal) def\n", psbuffer);
+ fputs("\n", fh);
break;
case(PR_FMT_PDML):
fputs("<?xml version=\"1.0\"?>\n", fh);