Save PDF in Current Folder Named after Two Fields Javascript

New Here ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

Hello,

I have read through few discussions and can't seem to find a javascript that lets you save pdf in current folder. Everyone asks for it to be saved in a specified folder.
So, I was wondering if there is a javascript that can save the PDF in folder that the PDF is currently in named after two fields in Adobe Form.

Thanks!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

97

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Most Valuable Participant , Apr 06, 2018 Apr 06, 2018
Sure, that's possible.You can use something like this to do it:var newFileName = this.getField("Text1").valueAsString + "-" + this.getField("Text2").valueAsString + ".pdf;this.saveAs(this.path.replace(this.documentFileName, newFileName);

Likes

translate

Translate

Translate
Most Valuable Participant ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

Sure, that's possible.

You can use something like this to do it:

var newFileName = this.getField("Text1").valueAsString + "-" + this.getField("Text2").valueAsString + ".pdf;

this.saveAs(this.path.replace(this.documentFileName, newFileName);

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines