Copy link to clipboard
Copied
I was writing the following Code to send a specific PDF Document in My Drive through e-mail.
The Document has to be attached into the e-mail's body as a link.
the Script, of course, doesn't work because the link doesn't give access to any real Document.
I'm trying to create a match between the text field NAME's value and the Document in My Drive. You see, the value written in the abovementioned textfield is the name of the Folder where the PDF Documents is located.
I know I should give the Script the path of the Document, I just don't know how to correct this Script
var Name = this.getField("NAME").value;
var linkURL = "https://acrobat.adobe.com/link/review?uri=urn:aaid:scds:US:" + generateUUID();
var cToAddr = "-----------@gmail.com";
var cSubLine = "Object " + Name;
var cBody = "Here's your link: " + linkURL;
this.mailDoc({
bUI: true,
cTo: cToAddr,
cSubject: cSubLine,
cMsg: cBody
});
Copy link to clipboard
Copied
The answer is no. The Adobe Cloud came along many years after the doc.mailDoc() function was added to the Acrobat JavaScript Model. In fact, the JS model hasn't been changed in any significant way in many years. So there isn't any (documented) way to add docs to the Adobe Cloud or generate Adobe cloud links in JavaScript.
Maybe, there is a REST API for this. I don't know if such a thing exists, but Adobe does provide a number of services through REST APIs. If this capability does exist, then the NET.HTTP object in the Acrobat JS model could be used to save a document to the cloud and acquire a link to it.