Although this is an old question, I just want to share another solution for future reference. REST API GroupDocs.Conversion Cloud is another conversion option between documents and images over 65+, including all Microsoft Office and OpenDocument file formats, PDF, HTML, CAD documents, bitmap images, and more.
Example cURL code:
TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required). curl --request POST https://api.groupdocs.cloud/connect/token --header "Content-Type: application/x-www-form-urlencoded" --data "grant_type=client_credentials&client_id=[APP_SID]&client_secret=[APP_KEY]" ### Convert and Add Watermark curl --request POST "https://api.groupdocs.cloud/v2.0/conversion" --header "authorization: Bearer [ACCESS_TOKEN]" --header "accept: application/json" --header "Content-Type: application/json" --data "{ "FilePath": "test_doc.docx", "Format": "pdf", "ConvertOptions": { "FromPage": 1, "PagesCount": 1, "WatermarkOptions": { "text": "Watermark" } }, "OutputPath": "Output"}"
I work with Aspose as an evangelist developer.
source share