All I want to do is. . .
. . .turn source code into a PDF.
Description: For those times when you need to print your code.
Contributors:
anschwa
Updated: 10/10/15
Turn source code into a PDF.
- Use
Org-Mode
- Use
Pandoc
- Use
a2ps
andps2pdf
Org-Mode
C-x C-e l p
Pandoc
pandoc -s example.py -o example.pdf
as2ps
Convert all .cpp files in a directory
for i in ls *.cpp; do a2ps -o $i.ps $i; done;
Convert all .ps files to pdf
for i in ls *.ps; do ps2pdf $i; done;
(May need to remove empty side-effect ls.pdf
file).
Concatenate all output pdf files
pdftk *.pdf cat output merged.pdf