Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can JavaScript be used in a PDF?

Posted on 2016-08-31
5
Medium Priority
?
110 Views
Last Modified: 2016-08-31
I same advanced functionality I need, like a pop-up image on a hover...

Does PDF support this?

Embedded JavaScript?

Thanks
0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 59

Assisted Solution

by:Julian Hansen
Julian Hansen earned 2000 total points
ID: 41778016
PDF supports the embedding of any data - it is how it is interpreted that is important - and that comes down to the reader.

Adobe Acrobat does support JavaScript in documents you can read more about it here
http://www.adobe.com/devnet/acrobat/javascript.html
0
 

Author Comment

by:newbieweb
ID: 41778021
Oh, so I become dependent on the reader, which makes perfect sense.

Your point makes me now consider doing this as a website since I want consistency.

For example...
http://static.flipbuilder.com/demo/flippage-wedding-brochure/flippage-wedding-magazine.html#p=4

UNLESS there is a way to have this work for all PDF's, since I prefer the portable document model.
0
 
LVL 59

Accepted Solution

by:
Julian Hansen earned 2000 total points
ID: 41778059
You can't really dictate what reader's a user is going to use or if they are going to disable script or not.

Other readers also support JS (https://www.foxitsoftware.com/blog/how-to-add-javascript-functionality-to-pdf-forms-without-coding/) for example.

If you are wanting to use the JavaScript to achieve the flip effect you might find that the functionality is not quite there to do that. I have dabbled a bit in the JS for PDF and came up against restrictions in what I could do and could not. Whether or not it can be used to achieve the effect your are referring to - I don't know - but I doubt it - if you could then we would have seen this instead of solutions that involve Flash (as in flipbuilder).
0
 

Author Closing Comment

by:newbieweb
ID: 41778101
You convinced me to do it as a web page. Thanks.
0
 
LVL 59

Expert Comment

by:Julian Hansen
ID: 41778175
You are welcome.
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question