Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


src2pdf | 5 comments | Create New Account
Click here to return to the 'src2pdf' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
src2pdf
Authored by: sveinbjornt on Jul 27, '04 09:27:33AM
No need to download GhostScript. Mac OS X ships with the /usr/bin/pstopdf command line program, which also converts PostScript files to PDF. It is, amongst other things, used by Preview.

You can get a nifty command line Source-To-PDF converter by doing the following:

# sudo pico /bin/src2pdf

and type in the following:

#!/bin/sh
vgrind $1 | pstopdf -i -o $1.pdf


then save it by doing Ctl-X and then change the permissions to 755. You then have the command line utility src2pdf, which takes a single source file as argument and generates a pdf file with the same name (but of course, the .pdf suffix).



[ Reply to This | # ]
src2pdf
Authored by: sjk on Jul 27, '04 03:43:29PM

/usr/local/bin would be a more preferable location for such a script. About the /bin directory, the hier(7) man page says:

user utilities fundamental to both single-user and multi-user environments



[ Reply to This | # ]