I don’t know of any libraries that allow for programmatic generation of PDFs. You could launch a task that spawns an Acrobat process or some such and have it convert a file that already exists - but I’m not sure about generating one.
What are you trying to do?