I have seen this question asked a couple of times at different fourms so here is a simple example of plotting to a pdf.

http://www.theswamp.org/index.php?topic=35096.new

Reply back if any problems.