Printing Man pages

Discussion in 'NZ Computing' started by Shane, Dec 6, 2005.

  1. Shane

    Shane Guest

    Trying to print out a man page, after a light search on the intarweb(3
    days and counting :) The best Ive found so far is to use troff to output
    to a lpr queue.
    Ive got cups set up but not lpr, and wouldnt know how to edit the
    command/pipe to cups

    Option 2 is to find someone who has put the man page in question on their
    website and print from there, although seeing as Ive come this far I'd
    like to know how thats dones (converting man pages to .html format)

    TIA

    --
    Mother is far too clever to understand anything she does not like.
    -- Arnold Bennett
     
    Shane, Dec 6, 2005
    #1
    1. Advertising

  2. Shane

    Chris Hope Guest

    Shane wrote:

    > Trying to print out a man page, after a light search on the intarweb(3
    > days and counting :) The best Ive found so far is to use troff to
    > output to a lpr queue.
    > Ive got cups set up but not lpr, and wouldnt know how to edit the
    > command/pipe to cups


    This will format it as plain text:

    man <manpage> | col -b

    eg man man | col -b

    > Option 2 is to find someone who has put the man page in question on
    > their website and print from there, although seeing as Ive come this
    > far I'd like to know how thats dones (converting man pages to .html
    > format)


    I've got man2html on my Gentoo box - not sure where the site is to
    download it from though - the one listed doesn't seem to be right.
    There are other man converters available as well.

    --
    Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
     
    Chris Hope, Dec 6, 2005
    #2
    1. Advertising

  3. Shane

    shannon Guest

    Shane wrote:
    > Trying to print out a man page, after a light search on the intarweb(3
    > days and counting :) The best Ive found so far is to use troff to output
    > to a lpr queue.
    > Ive got cups set up but not lpr, and wouldnt know how to edit the
    > command/pipe to cups
    >
    > Option 2 is to find someone who has put the man page in question on their
    > website and print from there, although seeing as Ive come this far I'd
    > like to know how thats dones (converting man pages to .html format)
    >
    > TIA
    >


    try
    man man
    and look at the -H option
    I think the man package now includes man2html
     
    shannon, Dec 6, 2005
    #3
  4. Shane

    Shane Guest

    On Tue, 06 Dec 2005 14:13:40 +1300, Chris Hope wrote:

    > Shane wrote:
    >
    >> Trying to print out a man page, after a light search on the intarweb(3
    >> days and counting :) The best Ive found so far is to use troff to
    >> output to a lpr queue.
    >> Ive got cups set up but not lpr, and wouldnt know how to edit the
    >> command/pipe to cups

    >
    > This will format it as plain text:
    >
    > man <manpage> | col -b
    >
    > eg man man | col -b


    lifesaver :)

    >
    >> Option 2 is to find someone who has put the man page in question on
    >> their website and print from there, although seeing as Ive come this
    >> far I'd like to know how thats dones (converting man pages to .html
    >> format)

    >
    > I've got man2html on my Gentoo box - not sure where the site is to
    > download it from though - the one listed doesn't seem to be right.
    > There are other man converters available as well.



    adept has that listed as a package for kubuntu (installing as we speak)

    TA nicely :)
    --
    BOFH excuse #24:
    network packets travelling uphill (use a carrier pigeon)
     
    Shane, Dec 6, 2005
    #4
  5. Shane

    Shane Guest

    On Tue, 06 Dec 2005 14:23:32 +1300, shannon wrote:

    > Shane wrote:
    >> Trying to print out a man page, after a light search on the intarweb(3
    >> days and counting :) The best Ive found so far is to use troff to output
    >> to a lpr queue.
    >> Ive got cups set up but not lpr, and wouldnt know how to edit the
    >> command/pipe to cups
    >>
    >> Option 2 is to find someone who has put the man page in question on their
    >> website and print from there, although seeing as Ive come this far I'd
    >> like to know how thats dones (converting man pages to .html format)
    >>
    >> TIA
    >>

    >
    > try
    > man man
    > and look at the -H option
    > I think the man package now includes man2html


    Just to be contrary, my install is giving me this
    $ man threads -Hfirefox
    Reformatting threads(3perl), please wait...
    groff: can't find `DESC' file
    groff:fatal error: invalid device `html'
    man: command exited with status 768: /usr/bin/zsoelim /tmp/zmanhNRBk5 | /usr/bin/tbl | /usr/bin/groff -mandoc -Thtml


    I had the same problem with groff -T
    although I have now installed man2html, and used chris's col -b

    $man man |col -b >man.txt

    and printed from there
    ta


    --

    Do you think your mother and I should have lived comfortably so long
    together if ever we had been married?
     
    Shane, Dec 6, 2005
    #5
  6. Shane

    steve Guest

    Shane wrote:

    > Trying to print out a man page, after a light search on the intarweb(3
    > days and counting :) The best Ive found so far is to use troff to output
    > to a lpr queue.
    > Ive got cups set up but not lpr, and wouldnt know how to edit the
    > command/pipe to cups
    >
    > Option 2 is to find someone who has put the man page in question on their
    > website and print from there, although seeing as Ive come this far I'd
    > like to know how thats dones (converting man pages to .html format)
    >
    > TIA
    >


    Can't you re-direct the output to a text file?

    "man ping > ping.txt"

    Then open ping.txt with whatever text-handling app you want - and print it.
     
    steve, Dec 6, 2005
    #6
  7. Shane

    Chris Hope Guest

    steve wrote:

    > Shane wrote:
    >
    >> Trying to print out a man page, after a light search on the
    >> intarweb(3 days and counting :) The best Ive found so far is to use
    >> troff to output to a lpr queue.
    >> Ive got cups set up but not lpr, and wouldnt know how to edit the
    >> command/pipe to cups
    >>
    >> Option 2 is to find someone who has put the man page in question on
    >> their website and print from there, although seeing as Ive come this
    >> far I'd like to know how thats dones (converting man pages to .html
    >> format)
    >>
    >> TIA
    >>

    >
    > Can't you re-direct the output to a text file?
    >
    > "man ping > ping.txt"
    >
    > Then open ping.txt with whatever text-handling app you want - and
    > print it.


    It looks like a mess if you do that as it has all sorts of formatting
    controls and special/repeating characters. You need to do what I
    suggested to make it text format which is "man <manpage> | col -b"
    which you could then output to a file if you wanted.

    --
    Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
     
    Chris Hope, Dec 6, 2005
    #7
  8. Shane

    steve Guest

    Chris Hope wrote:

    > steve wrote:
    >
    >> Shane wrote:
    >>
    >>> Trying to print out a man page, after a light search on the
    >>> intarweb(3 days and counting :) The best Ive found so far is to use
    >>> troff to output to a lpr queue.
    >>> Ive got cups set up but not lpr, and wouldnt know how to edit the
    >>> command/pipe to cups
    >>>
    >>> Option 2 is to find someone who has put the man page in question on
    >>> their website and print from there, although seeing as Ive come this
    >>> far I'd like to know how thats dones (converting man pages to .html
    >>> format)
    >>>
    >>> TIA
    >>>

    >>
    >> Can't you re-direct the output to a text file?
    >>
    >> "man ping > ping.txt"
    >>
    >> Then open ping.txt with whatever text-handling app you want - and
    >> print it.

    >
    > It looks like a mess if you do that as it has all sorts of formatting
    > controls and special/repeating characters. You need to do what I
    > suggested to make it text format which is "man <manpage> | col -b"
    > which you could then output to a file if you wanted.


    Thanks.....I had not tried printing my approach. Probably just as well. :)

    Yours is saved away in my text file of useful things to know. Ta.
     
    steve, Dec 6, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doug MacLean
    Replies:
    0
    Views:
    654
    Doug MacLean
    Aug 16, 2005
  2. elie
    Replies:
    0
    Views:
    971
  3. elie
    Replies:
    0
    Views:
    888
  4. elie
    Replies:
    0
    Views:
    936
  5. elie
    Replies:
    0
    Views:
    960
Loading...

Share This Page