For the time-being I have following solution:
I work at a university and students need to print their preferred proposals for a traineeship. All the proposals are stored in a database and I use PHP to extract info from the database. What I do, after a student selected his/her preferred proposals, is that I generate a .tex file and with a system call I make (in this case "pdflatex") from that .tex file a pdf file. I do this on a Unix machine
Works perfect for me at the moment and I hav no trouble with license.
Victor