I have created one custom action to convert document to pdf. It worked fine but I want to download converted pdf on click of same custom action , I mean I want to convert and download document on clicking of custom action.How can do that? I have tried following code.
newdoc = document.transformDocument("application/pdf"); newdoc.save();
Here you go and you need to pass your actual nodeRef values. Added new document action in share-custom-config.xml
Now you need to inject your javascript like below and you need to pass the original document's nodeRef and I have hard-code here.
On the Repowebscript, convert.get.desc.xml
convert.get.json.ftl
convert.get.js
When you click Download As PDF, the PDF document will be generated, placed info document library (or where the original document is present) and will be downloaded automatically. You need to check for the existing PDF files exists or not also.