Jah
Jah

Reputation: 1039

Printing massive number of files into pdf

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

Answers (3)

Phil Miller
Phil Miller

Reputation: 38108

You could also look at the enscript program.

Upvotes: 1

Mark Edgar
Mark Edgar

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

J-L
J-L

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

Related Questions