printing man pages via lpr??? - Redhat

This is a discussion on printing man pages via lpr??? - Redhat ; Is there a way to send the contents of a man page directly to the printer? I've been fiddling with tee and lpr, and I'm not getting them to work. What I want to be able to do is print, ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: printing man pages via lpr???

  1. printing man pages via lpr???

    Is there a way to send the contents of a man page directly to the
    printer? I've been fiddling with tee and lpr, and I'm not getting them
    to work.

    What I want to be able to do is print, say, the man page for logwatch,
    without having to know where the original page file is stored.

    So far I've been redirecting output to a text file in my home
    directory and printing that, but, I can't help but think there must be
    a single-step way.

    Gwen


  2. Re: printing man pages via lpr???

    On Mon, 1 Mar 2004, Gwen Morse wrote:

    > Is there a way to send the contents of a man page directly to the
    > printer? I've been fiddling with tee and lpr, and I'm not getting them
    > to work.
    >
    > What I want to be able to do is print, say, the man page for logwatch,
    > without having to know where the original page file is stored.
    >
    > So far I've been redirecting output to a text file in my home
    > directory and printing that, but, I can't help but think there must be
    > a single-step way.


    man | col -b | lpr

    David

    --

    David Sumbler

    Please reply to the newsgroup.

    However, if you _really_ want to send me an e-mail,
    replace "nospam" in my address with "aeolia".

  3. Re: printing man pages via lpr???

    David Sumbler writes:
    >On Mon, 1 Mar 2004, Gwen Morse wrote:
    >
    >> Is there a way to send the contents of a man page directly to the
    >> printer? I've been fiddling with tee and lpr, and I'm not getting them
    >> to work.
    >>
    >> What I want to be able to do is print, say, the man page for logwatch,
    >> without having to know where the original page file is stored.
    >>
    >> So far I've been redirecting output to a text file in my home
    >> directory and printing that, but, I can't help but think there must be
    >> a single-step way.

    >
    >man | col -b | lpr
    >


    Which loses all the fancy formatting.

    try

    $ zcat /usr/share/man/man1/ps.1.gz | groff -man - | lpr

    scott

  4. Re: printing man pages via lpr???

    scott@slp53.sl.home (Scott Lurndal) writes:
    >David Sumbler writes:
    >>On Mon, 1 Mar 2004, Gwen Morse wrote:
    >>
    >>> Is there a way to send the contents of a man page directly to the
    >>> printer? I've been fiddling with tee and lpr, and I'm not getting them
    >>> to work.
    >>>
    >>> What I want to be able to do is print, say, the man page for logwatch,
    >>> without having to know where the original page file is stored.
    >>>
    >>> So far I've been redirecting output to a text file in my home
    >>> directory and printing that, but, I can't help but think there must be
    >>> a single-step way.

    >>
    >>man | col -b | lpr
    >>

    >
    >Which loses all the fancy formatting.
    >
    >try
    >
    >$ zcat /usr/share/man/man1/ps.1.gz | groff -man - | lpr
    >


    Some man pages (which use pic and/or tbl) need -t and -p
    supplied to groff.

    e.g.

    $ zcat /usr/share/man/man1/ps.1.gz | groff -t -p -man - | lpr

    scott

  5. Re: printing man pages via lpr???

    In article <9b474018iom44qrv454u8htj8jppm3a8go@4ax.com>, Gwen Morse wrote:
    > Is there a way to send the contents of a man page directly to the
    > printer? I've been fiddling with tee and lpr, and I'm not getting them
    > to work.
    >
    > What I want to be able to do is print, say, the man page for logwatch,
    > without having to know where the original page file is stored.
    >
    > So far I've been redirecting output to a text file in my home
    > directory and printing that, but, I can't help but think there must be
    > a single-step way.


    How do you want it printed? With bold, just plain text, etc?

    E.g. "man man" suggests:

    To get a plain text version of a man page, without backspaces
    and underscores, try

    man foo | col -b > foo.mantxt

    Does your printer driver accept plain text or does it need
    PostScript files?

    If it accepts plain text, you can try:

    man whatever | col -b | lpr

    That will give plain text.

    Or, from "man man"

    -t Use /usr/bin/groff -Tps -mandoc to format the manual page

    That will format as Postscript, so you get bold, etc.

    Then try:

    man -t whatever | lpr

    (use whatever switches you need on lpr)

    and there are other programmes to print it and ...
    ah, well, ... there are ways ...

  6. Re: printing man pages via lpr???

    In article <9b474018iom44qrv454u8htj8jppm3a8go@4ax.com>,
    Gwen Morse wrote:
    :Is there a way to send the contents of a man page directly to the
    rinter? I've been fiddling with tee and lpr, and I'm not getting them
    :to work.
    :
    :What I want to be able to do is print, say, the man page for logwatch,
    :without having to know where the original page file is stored.

    man -T logwatch | lpr

    This presumes that you have printing of PostScript documents
    working correctly.

    --
    Bob Nichols AT interaccess.com I am "rnichols"

  7. Re: printing man pages via lpr???

    Gwen Morse wrote:

    > Is there a way to send the contents of a man page directly to the
    > printer? I've been fiddling with tee and lpr, and I'm not getting them
    > to work.
    >
    > What I want to be able to do is print, say, the man page for logwatch,
    > without having to know where the original page file is stored.
    >
    > So far I've been redirecting output to a text file in my home
    > directory and printing that, but, I can't help but think there must be
    > a single-step way.


    If you're running a recent version of KDE, you can open a man document and
    print it. You can even print to PDF and then use Kword to edit the PDF
    files.


    --

    Fundamentalism is fundamentally wrong.

    To reply to this message, replace everything to the left of "@" with
    james.knott.

  8. Re: printing man pages via lpr???

    Gwen Morse wrote:
    > Is there a way to send the contents of a man page directly to the
    > printer? I've been fiddling with tee and lpr, and I'm not getting them
    > to work.
    >
    > What I want to be able to do is print, say, the man page for logwatch,
    > without having to know where the original page file is stored.
    >
    > So far I've been redirecting output to a text file in my home
    > directory and printing that, but, I can't help but think there must be
    > a single-step way.
    >
    > Gwen
    >


    One of the previous replies came very close.

    I use

    man -t logwatch | lpr

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ Registered Machine 73926.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 5:15pm up 58 days, 4:35, 2 users, load average: 2.22, 2.23, 2.24


+ Reply to Thread