I ended up working through this and getting to something that works for me. Here’s what I’m using:
http://pastebin.com/are59P17
This could pose a problem, however, because all it’s really doing is pulling the most recent attachment from the post. So if the attachment is not a PDF, it doesn’t know. And if there is a PDF and then someone attaches an image, it will grab the image.