PDA

View Full Version : syntax hilighting in pdf



Tuna-Fish
April 6th, 2009, 12:36 PM
I need to put some code in a pdf. Does anyone know a good method of getting pretty syntax hilighting in abiword, OO.o or other program that can export into pdf?

Zugzwang
April 6th, 2009, 03:30 PM
I need to put some code in a pdf. Does anyone know a good method of getting pretty syntax hilighting in abiword, OO.o or other program that can export into pdf?

Open it in gedit/kile/whatever and print it to a file. Then convert the .ps file to pdf using ps2pdf.

Tuna-Fish
April 6th, 2009, 03:39 PM
Open it in gedit/kile/whatever and print it to a file. Then convert the .ps file to pdf using ps2pdf.

Thanks

hessiess
April 6th, 2009, 06:24 PM
You could also use LaTeX and the listlistings package.

nvteighen
April 6th, 2009, 06:28 PM
Install cups-pdf and you'll have an automatic PDF printer driver you can configure as a new printer. It will output everything to ~/PDF

hugmenot
April 8th, 2009, 07:11 PM
You can use vim and it’s TOhtml command ( :help tohtml ). Then paste the colored HTML into your word processor.

casevh
April 8th, 2009, 08:10 PM
Or you can use scite and directly export highlighted text to pdf.