Thanks - unfortunately this is for an image.
What I can't figure out is why all the examples deal with single lines or images and neglect to deal with what is surely the most common case? - a text based document. I'd just like to be able to write out lines to a PDF rather than a file...
Will also try your supersearch suggestions. Meantime if anyone has any code they'd be willing to share for printing out a few lines to a PDF file that would be awesome!