javascript not support in mobile version iOS adobe dc :(

Community Beginner ,
Oct 07, 2017

Copy link to clipboard

Copied

i add some java script code in my program but in my pc work perfect, when i move this in mobile iOS app javascript code not working! Why??

TOPICS
Acrobat SDK and JavaScript

Views

613

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

javascript not support in mobile version iOS adobe dc :(

Community Beginner ,
Oct 07, 2017

Copy link to clipboard

Copied

i add some java script code in my program but in my pc work perfect, when i move this in mobile iOS app javascript code not working! Why??

TOPICS
Acrobat SDK and JavaScript

Views

614

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
Oct 07, 2017 0
Adobe Community Professional ,
Oct 07, 2017

Copy link to clipboard

Copied

How much JavaScript - or if it's supported at all - depends on what PDF viewer you are using on your mobile device. Even Adobe's own Reader has only very limited support for JavaScript. The default PDF viewer on iOS does not support JavaScript (and many other features you often find in PDF files) not at all. Take a look here for information about what's supported in Adobe's mobile Reader:

JavaScript APIs and Forms — Enterprise Guide for Acrobat on Mobile Devices

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...
Oct 07, 2017 1
New Here ,
Jan 24, 2018

Copy link to clipboard

Copied

Karl, I'm not sure you will see this as it is month after the original post, but I'm running into the same problem. according to the mobile API reference, I believe that my basic code should work. Its just a button that has the code as following:

this.getField("number").value = "01"

It seems that the API reference is not accurate. I have tried my same code in multiple different mobile pdf readers, on both android and apple.

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...
Jan 24, 2018 0
Adobe Community Professional ,
Jan 24, 2018

Copy link to clipboard

Copied

The API Reference is accurate. It's specific to the Adobe viewers, not PDF in general.

Most mobile PDF viewers don't support JavaScript at all. I've tested the code you show above and it does run on the Adobe Reader on iOS and Android and PDF Expert by Readdle on iOS but that's about it.

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...
Jan 24, 2018 0
New Here ,
Jan 24, 2018

Copy link to clipboard

Copied

Could the implementation of the code be the problem? I have it as a button that writes to the empty text field. It works just fine on a desktop version but when I open it up on the android version of adobe reader, the button does nothing. Could it be that buttons aren't supported on the mobile adobe reader?

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...
Jan 24, 2018 0
Adobe Community Professional ,
Jan 24, 2018

Copy link to clipboard

Copied

I only tested on iOS. It might be a bug but the documentation is accurate.

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...
Jan 24, 2018 0
New Here ,
Jan 24, 2018

Copy link to clipboard

Copied

Could you send me the document that you tested on an iOS device? I would like to test it out on my android to see if it is an issue with my implementation or if it is an issue with the android version of adobe reader. Hopefully I just screwed something up and can learn from the document you made.

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...
Jan 24, 2018 0
Adobe Community Professional ,
Jan 24, 2018

Copy link to clipboard

Copied

Here you go. The JavaScript is in the MouseUp action of the button.

Link to MobileTestCode.pdf

https://adobe.ly/2DAu4il

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...
Jan 24, 2018 1