This example shows how to generate a PDF from a DOCX template using cURL. It calls the Docmosis REST API to merge the data with the template and stream the result back.
The sample code includes the instructions to get started. You will need a Free Trial to install and run Tornado.
The linux command: curl -F data=@data.txt -F templateName=WelcomeTemplate.docx -F outputName=myWelcome.pdf -o myWelcome.pdf http://localhost:8080/api/render will call the Tornado server running at localhost:8080 to render the template WelcomeTemplate.docx to create file myWelcome.pdf. The data.txt file contains the data and in JSON format would look like this: { "date":"29/Jan/2015", "message":"This Tornado Document Engine is working great!" }