Reputation: 1039
Hey guys I need to print a project that I wrote in C to PDF format, The problem is that I have a lot of files that sit in different directories and I don't want to print it one by one using Ubuntu text editor.
I did a little research and found that I need to use lpr shell commend with cat(recursively) but I don't understand how to use it to print to PDF.
can any1 help me?
edit1:
when I try to do something like cat * | lpr - P PDF I'm getting the next error: lpr: The printer or class does not exist.
Upvotes: 0
Views: 600
Reputation: 4797
Try a2ps.
GNU a2ps is an Any to PostScript filter. Of course it processes plain text files, but also pretty prints quite a few popular languages.
Upvotes: 1
Reputation: 199
you could install cups-pdf then do
cat filename.c | lpr -P PDF
this puts a pdf file in your ~/PDF
Upvotes: 4