In a project I am working on, I have a requirement to generate a PDF. This PDF will contain text only, and the contents of the text will be rather variable. Most of the text should be printed in separate paragraphs printed under each other. In case the paragraph doesn't fit on a page, it should just be added to the next one. It should be free (as in beer, preferably as in open-source too) and stable (so not some toy project).
As a sidenote, the project itself will be used commercially. Users will be able to send an API call, and a specific PDF will be generated for them (its contents are what we specialize in).