You can use ipdf (not sure of the project page, but it's in the ports tree in FreeBSD.)
Here's how I use it in a bash script:
ipdf -o daily_report.pdf -m letter-p -f 11 -F Courier -s 'Daily user report from MyServer' -a 'My Name' -t 'Daily User Report' daily_report.txt
This takes the contents of a text file (daily_report.txt) and outputs it to daily_report.pdf with the various options (portrait, Courier font, ps 11, with my name as the creator, and the name of the report embedded in the "properties" info.)
Once you install it, the manpage gives quite detailed information on all the various options/switches.
"Creates indexed pdf documents from text files. Designed to aid creating an electronic distribution method for legacy system reports, since many mainframe type print spools are plain text. Allows indexing, customizing page settings, font size, font face, and super-imposing text over an image in the case of using pre-printed forms. Supports unlimited levels of indexing bookmarks in documents and system/user configuration files. Suitable for use in an intranet gateway for generating PDF documents in real-time."