Tornado Render using cURL

This example shows how to generate a PDF from a DOC 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.doc -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.doc 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!"
}

Feedback

Invalid Input

Sorry, this field will only accept letters and numbers, and not special characters, to limit spam. Please also consider contacting support@docmosis.com if you need help with this article.

Sorry, this field will only accept letters and numbers, and not special characters, to limit spam.

Invalid Input

Applies To

Docmosis-Java Tornado Cloud
Version(s) - ALL -