This service accepts POST requests with JSON markup and returns PDF documents:
curl -i -X POST -d 'json-input=[{}, "some text"]' http://yogthos.net/instant-pdf/ > doc.pdf
see here for source code and syntaxDistributed under the Eclipse Public License.