We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to store generated document on Amazon s3 in pdf format after ExecuteTemplate

Hi,

I am storing my template in docx format on Amazon s3. Then from Salesforce using ExcuteTemplate Rest api generating new docx document with data and storing on Amazon S3. Now Instead of docx I want to generate new document as PDF !!

Can you guide me how to generate new document as pdf using ExcuteTemplate ?? We are stuck now … waiting for your positive reply !!

Hi Sonal,

ExecuteTemplate resource generates the output in the same format as the input template. You will have to use following two URIs in your case, first one to execute template and second one to convert output document to PDF .

http://api.aspose.com/v1.1/words/ExecuteTemplate.docx/executeTemplate?filename=MailMergeResult.docx

http://api.aspose.com/v1.1/words/MailMergeResult.docx?format=pdf

Please feel free to contact us in case you have further comments or questions.

Best Regards,

Hi,

Thank you for your reply…
I have one more question, After http://api.aspose.com/v1.1/words/MailMergeResult.docx?format=pdf api will it replace MailMergeResult.docx to pdf or will create new pdf file ??

Hi Sonal,

No, both are different files. Output PDF file will be returned in the response body. If you want to store output PDF on storage, you can pass filename parameter e.g.

http://api.aspose.com/v1.1/words/MailMergeResult.docx?format=pdf&filename=Result.pdf
Best Regards,