Welcome to the Linux Foundation Forum!

Printing code in color to color printer?

Hey,

Someone once showed me a simple command line way to print a file of code (Perl, Bash, etc.) on a color printer that honored the syntax highlighting. I have since forgotten it - anyone know what this might have been?

thx

Comments

  • marc
    marc Posts: 647
    atreyu wrote:
    Hey,

    Someone once showed me a simple command line way to print a file of code (Perl, Bash, etc.) on a color printer that honored the syntax highlighting. I have since forgotten it - anyone know what this might have been?

    thx

    If you pipe the coloured text to the printer it should work...

    Or did you mean something like "fileutil"?

    Regards
  • atreyu
    atreyu Posts: 216
    i just gave up and used gedit - never used fileutil tho. if i get time...

    EDIT: or, it can be done right in vim, i've just learned. cool. this is one of several ways to do it w/vim that worked for me:
    vim -me -e -c ":hardcopy >%.ps" -c ":q" test.sh
    lp -d COLOR_PRINTER_NAME test.sh.ps
    
    more at http://aplawrence.com/Girish/vim-tips.html for anyone interested...

Categories

Upcoming Training