Results 1 to 6 of 6

Thread: make a pdf with txt in terminal

  1. #1
    Join Date
    Feb 2013
    Beans
    7

    make a pdf with txt in terminal

    to print the manual page of a command in pdf, i will type in terminal (for eg. with the avconv command)

    Code:
     man -t avconv | ps2pdf - > avconv.pdf
    now i want to print the list of audio codecs used by avconv in pdf, that is

    Code:
     avconv -codecs | grep A
    how can i manage this ?

  2. #2
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: make a pdf with txt in terminal

    I guess there are many ways to do it. I usually filter text through mpage(1) like this
    Code:
    echo some text|mpage -2|ps2pdf
    Last edited by schragge; February 13th, 2013 at 07:32 PM.

  3. #3
    Join Date
    Jul 2006
    Location
    Calgary, Alberta
    Beans
    1,123
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: make a pdf with txt in terminal

    I use a HTML -> PDF converter called mPDF for generating quotes for my clients. You could try going that route.
    Quote Originally Posted by Tristam Green View Post
    I can tell you something about a turntable.
    I have two of them.
    And a microphone.
    Where it's at.

  4. #4
    Join Date
    Feb 2013
    Beans
    7

    Re: make a pdf with txt in terminal

    Quote Originally Posted by schragge View Post
    I guess there are many ways to do it. I usually filter text through mpage(1) like this
    Code:
    echo some text|mpage -2|ps2pdf
    thx for your response !

    but i didnt succeed that way....

    Code:
    mpage 'avconv -codecs' -2 | ps2pdf - > test.pdf
    returns

    Code:
    mpage: cannot open avconv -codecs
    i did it graphically with gedit but hey this is not a geekclass solution lol

  5. #5
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: make a pdf with txt in terminal

    No, you should did it like this
    Code:
    avconv -codecs|mpage -2|ps2pdf - >test.pdf

  6. #6
    Join Date
    Feb 2013
    Beans
    7

    Re: make a pdf with txt in terminal

    yeah great thx !

    Code:
    avconv -codecs|grep A | mpage -2|ps2pdf - >test2.pdf
    worked as well

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •