Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a program that generates console output colored with ANSI codes. How to convert it to PDF keeping the colours?

I need a unixish command line solution

share|improve this question
Found something close to what I need here:… and then print HTML as it is described in… – grep Feb 15 '13 at 22:14

The best solution so far: aha to convert to HTML (, then convert HTML to PDF e.g. with wkhtmltopdf.

I am still looking for a one step solution.

share|improve this answer

If you have calibre/pdfcreator/cutepdf kind of utility installed in your environment or computer. You can use lp to send text to printer.

share|improve this answer
Thank you, but they all are GUI stuff, and pdfcreator is Windows only. Don't fit. – grep Feb 15 '13 at 22:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.