What application are you using on your mobile device?
The support for scripts in most mobile PDF apps is very very limited, unfortunately.
I used many PDF Reader apps such as Adobe Acrobat, qPDF Viewer, PDF Max Free. None of them are able to handle events generated on mobile screen.
Adobe Reader can certainly handle events such as a mouse click. The question is what code you used in that event and which parts of it are going to work on a mobile device, and which parts of it are not going to work.
This web-page documents which objects, properties and methods are supported on various mobile environments (although I'm not sure it's 100% accurate): http://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/js.html
If you want to build your own PDF app feel free to do so. The PDF ISO is available here:
Thank you. If I build my PDF Reader app, can I make it to respond to all the java script events and actions similar to desktop?
Also, just thinking aloud on - is there any other way other than building my own reader to get the above mentioned use case working? Much appreciated.
" It has some text boxes to enter text, and then a button called "Pay now". When I click "Pay Now", it calls a URL to perform payment, and returns the confirmation back to user on PDF as a pop-up. "
You could do what you want in your own app. Keep in mind that the PDF ISO is about 1000 pages long, and that doesn't include the JS implementation...
The problem in your code is probably that you're using the app.launchURL() method, which isn't supported on Android. I don't see any way around that, I'm afraid.
If you're using a static URL then try using the "Open a web-page" command.
When I click "Pay Now", it calls a URL to perform payment, and returns the confirmation back to user on PDF as a pop-up.
How are you doing this, exactly? Is the form submitting to a web server which returns an FDf response that triggers the pop-up, or something else?
Thanks for the responses.To give brief history, we have a Adobe Flex application embedded in PDF as of now.
It provides functionalities such as - text to input data, search and sort within a table , buttons to fetch info from URLs and send info to URLs with response shown on screen.
When I tried some sample files available on the Internet, button clicks aren't recognized in Android. Sample file can be found here : Dropbox - ppjs_eventexamples.pdf
If I click this PDF on mobile, nothing happens. So, my questions are centered around this -
b) Can I call a URL to fetch information from a specific URL?
c) Can I call a URL and show the response on the screen?
The samples I downloaded from Internet for all the above scenarios did not work on Android. So, I wanted to understand if I missed something here.