Skip to content
Take your source code and convert them into a beautifully formatted PDF. Features include PDF bookmarks and a bunch of textmate themes to choose from.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin Update licence.
lib Formatting changes, Table of Contents
test need to check on these tests again
Gemfile removed dependency on linguist
Gemfile.lock Version bump with fixed gemfile.
LICENSE Update licence. Version bump.
Rakefile added test rake task back
code_rippa.gemspec We need ansi.


Code Rippa!

Build Status


CodeRippa takes your source code and turns it into a beautiful PDF file. Currently, it supports 150 languages and 84 themes, all of which are available in TextMate.


You will definitely need a TeX distribution installed. To check, simply type pdflatex. In case your system doesn't have pdflatex, you should install a LaTeX distribution.


$ gem install code_rippa


Command line options

Usage: code_rippa [options] file_or_directory
    -l, --list-themes                List all available themes
    -t, --theme THEME                Selected theme
    -n, --list-syntax                List all available syntax
    -h, --help                       Display this screen

List all available themes (84 and counting!)

Many of the themes found in CodeRippa can be found here

$ code_rippa -l

... more themes omitted

Producing PDF from a single file


Without theme specified (defaults to: made_of_code):

$ code_rippa path_to_single_file.rb

With theme specified:

$ code_rippa -t zenburnesque path_to_single_file.rb

Note that the output file is saved as out.pdf in the current directory where code_rippa was called from.

Producing PDF from a directory


Without theme specified (defaults to: made_of_code):

$ code_rippa path_to_directory

With theme specified:

$ code_rippa -t rubyblue path_to_directory

Note that the output file is saved as out.pdf in the current directory where code_rippa was called from.


None of this would be possible without the awesome ultraviolet spox-ultraviolet and language_sniffer gems. Props to lwheng for providing most of the LaTeX help.


Currently this gem is in its infancy. Any bug reports and feature requests are very welcomed.



  • Compile pdf by default.
  • Choose a more sane theme (Code) by default.
  • Include LICENCE.

0.0.8 - 0.0.9

  • Syntax files are finally compatible for psych
  • Abandoned syck completely for psych
  • Ruby 2.x compatibility! \o/
  • Thanks @jasonyeo for the initial push towards Ruby 2.x compatibility.


  • Using language_sniffer in place of Linguist for automated source code language detection
  • Themes! Glorious themes! 84 themes to choose from! Props to filmgirl, and the rest of the wonderful TM users who submitted their themes.
  • Wrap lines of troublesome files such as minified javascript and parser generator outputs.
  • Sensible defaults, removed the need for specifying the syntax
  • Detects if pdflatex is installed, and automatically runs pdflatex if so
  • Proper cleanup after LaTeX successfully completes


  • Include MiniTest specs


  • Better performance when parsing.
  • Code documentation.


  • Removed dependency on Linguist.
  • Tidier code.

0.0.1 - 0.0.3

  • Initial gem push
  • Fixed many stupid bugs along the way
Something went wrong with that request. Please try again.