Clickable Button to run an action/shortcut.

Community Beginner ,
Feb 16, 2018

Copy link to clipboard

Copied

What I want to do is create a form that is fillable from a Delimited text file. I already have all of that set up and working. I however want to make it simpler for my colleagues who aren't as savvy by allowing them to click a button embedded in the PDF that will automatically point to the delimited file and just launch the "import data from delimited text file" box so that they can just choose what they need. I am not great with writing javascript, does anyone have a basic idea if this is doable and what script would be needed to call the file?

Thanks in advance.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

153

Likes

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

Clickable Button to run an action/shortcut.

Community Beginner ,
Feb 16, 2018

Copy link to clipboard

Copied

What I want to do is create a form that is fillable from a Delimited text file. I already have all of that set up and working. I however want to make it simpler for my colleagues who aren't as savvy by allowing them to click a button embedded in the PDF that will automatically point to the delimited file and just launch the "import data from delimited text file" box so that they can just choose what they need. I am not great with writing javascript, does anyone have a basic idea if this is doable and what script would be needed to call the file?

Thanks in advance.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

154

Likes

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
Feb 16, 2018 0
Most Valuable Participant ,
Feb 16, 2018

Copy link to clipboard

Copied

If you want to specify the file path in the script it has to run from a "privileged context", ie a .js file that's installed on the user's local machine.

Likes

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
Reply
Loading...
Feb 16, 2018 0
Community Beginner ,
Feb 16, 2018

Copy link to clipboard

Copied

Is there any alternative to this? we are at a university and I don’t think we have access to the folders where the .js file would have to be installed. (If you could confirm the folders I can check)

Likes

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
Reply
Loading...
Feb 16, 2018 0
Most Valuable Participant ,
Feb 16, 2018

Copy link to clipboard

Copied

Not without a lot of effort. You can use a button to open the file selection dialog, and then the row selection dialog, though.

Likes

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
Reply
Loading...
Feb 16, 2018 0
Community Beginner ,
Feb 16, 2018

Copy link to clipboard

Copied

How would this be done?

Likes

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
Reply
Loading...
Feb 16, 2018 0
Most Valuable Participant ,
Feb 16, 2018

Copy link to clipboard

Copied

Using this code:

this.importTextData();

Likes

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
Reply
Loading...
Feb 16, 2018 0
Community Beginner ,
Feb 16, 2018

Copy link to clipboard

Copied

Does anything go inside the parenthesis? And is this in the buttons JavaScript section or the JavaScript section for the file itself?

Likes

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
Reply
Loading...
Feb 16, 2018 0
try67 LATEST
Most Valuable Participant ,
Feb 16, 2018

Copy link to clipboard

Copied

In this case, no. Use it as I provided it.

And it should go as the Mouse Up event of your button.

Likes

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
Reply
Loading...
Feb 16, 2018 0
Adobe Community Professional ,
Feb 16, 2018

Copy link to clipboard

Copied

Yes, but what you are asking about is creating an Automation tool, not a form feature. As Try67 has already stated, this type of activity requires privilege.

You can read more about automation and data handling here:

Automating Acrobat can save you loads of time.

https://www.pdfscripting.com/public/ExcelAndAcrobat.cfm

The last tool listed on this page displays a popup menu of options from a CSV (comma separated), for auto-filling fields on a form, which sounds a lot like what you need.

Search Downloads

Likes

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
Reply
Loading...
Feb 16, 2018 0