How do you want to serve PDFs?

PDF files can be generated and served through Seaside, but that consumes a lot of CPU with increasing size of the document. Saving the documents on the file-system or using a separate image to upload the generated file is often more efficent.

Which solution works on what platform?

Squeak: SPDF, libharu, pdflatex, fop, cairo, pdfreactor

VW: SPDF, cairo, pdfreactor

PDFReactor can be used from any dialect with support for HTTP requests, but it is especially trivial in dialects capable of generating a web interface from WSDL.

You can use that script to write the file usecase.tex to the same directory the squeak image is in (that is not secure). Also think about the situation where multiple people try to run this at the same time.