Announcement

Collapse
No announcement yet.

HOWTO: Turn man(ual) pages into .pdf documents from the CLI

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HOWTO: Turn man(ual) pages into .pdf documents from the CLI

    Ever wanted to create .pdf files from man(ual) pages? It's easy to do. Open a console and type:
    Code:
    man foo | enscript -o foo.ps | ps2pdf foo.ps [filename.pdf]
    where foo is the manual page you want to create as a .pdf file. You can call foo.ps anything you want, but it must have the .ps extension. The optional [filename.pdf] allows you to create the resulting .pdf file with a different name (otherwise, the default foo.pdf will be created).

    Examples:
    Code:
    man ls | enscript -o ls.ps | ps2pdf ls.ps
    creates the file ls.pdf
    Code:
    man ls | enscript -o ls.ps | ps2pdf ls.ps ls_man_page.pdf
    creates the file ls_man_page.pdf
    Slava Ukraini! πŸ‡ΊπŸ‡¦
    Windows no longer obstruct my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

    #2
    Re: HOWTO: Turn man(ual) pages into .pdf documents from the CLI

    Code:
    man -t ls | ps2pdf - man_ls.pdf
    Should do it as well. (Being a tad simpler)

    Comment


      #3
      Re: HOWTO: Turn man(ual) pages into .pdf documents from the CLI

      Thanks guys!!! Great!

      Comment


        #4
        Re: HOWTO: Turn man(ual) pages into .pdf documents from the CLI

        Originally posted by kubicle
        Code:
        man -t ls | ps2pdf - man_ls.pdf
        Should do it as well. (Being a tad simpler)
        Got to love 'simpler!' Tried it, and works just fine. Cool. Same result with less code.
        Slava Ukraini! πŸ‡ΊπŸ‡¦
        Windows no longer obstruct my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

        Comment

        Users Viewing This Topic

        Collapse

        There are 0 users viewing this topic.

        Working...
        X