Cloud 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 and then plug your Docmosis Cloud access key into the code below, then run.

The linux command:

curl -F data=@data.txt -F templateName=samples/WelcomeTemplate.docx -F outputName=myWelcome.pdf -F accessKey=XXX -o myWelcome.pdf https://dws2.docmosis.com/services/rs/render

will call the cloud service to render the template samples/WelcomeTemplate.docx to create file myWelcome.pdf. 

The access key above is XXX which you should replace with your access key

You will also need to creqate a data.txt file that contains the data in JSON format, that should look like this:
 
{
 "title":"Welcome to Docmosis via cURL",
 "messages":
 [{"msg":"This cloud experience is better than I thought."},
  {"msg":"The sun is shining."},
  {"msg":"Right, now back to work."}]
}

Feedback

Invalid Input

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

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) - - DWS2