lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV Contents of <TITLE> tag at top of printed page


From: Klaus Weide
Subject: Re: LYNX-DEV Contents of <TITLE> tag at top of printed page
Date: Thu, 21 Aug 1997 20:17:11 -0500 (CDT)

On Thu, 21 Aug 1997, Kevin Ternes wrote:

> There is a requirement where I work to have the contents of the <TITLE>
> tag displayed at the top of each printed page the way that Netscape
> does.
> 
> The security status of all docs here must be displayed not only on the
> screen but on each and every printed page.  So all HTML documents here
> have their status put in the <TITLE> and with Netscape this works out
> pretty well.  If we are to use Lynx in this environment, it must also
> behave this way.
> 
> I looked at the LYPrint module thinking about modifying the code but the
> means of doing this is not at all obvious to me.  Any suggestions?  Or
> even better, can anyone tell me exactly how to make this change?

I suggest doing this outside of lynx, with a small shell script, perl
script, C program or whatever you like.  That could split up Lynx's
output into pages (according to your printer's page length) and insert a
Title line for each page.  Or maybe even your lpr (or equivalent) can do
this for you.  Add or change the PRINTER: definition in lynx.cfg to use
your external command.

The only change required in the Lynx code then would be to make it pass
the title to your command.  The simplest way to do this probably would be
to putenv() an environment variable (LYNX_PRINT_TITLE or whatever) before
the relevant `system(buffer);' command under `case PRINTER:', and make
your command use that variable.  The title as seen by Lynx should be
available through HText_getTitle() or HTLoadedDocumentTitle() any time in
printfile() after the HTLoadAbsolute(&WWWDoc) near the top.  (The only
difference between theses two functions seems to be what they return if
no title has been set, NULL vs. "".)

Of course if the "security status" itself is a secret, you shouldn't pass
it around in an environment variable on an unsecure system...

HTH,

    Klaus

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]