Solved

Can JavaScript be used in a PDF?

Posted on 2016-08-31
5
92 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 56

Assisted Solution

by:Julian Hansen
Julian Hansen earned 500 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 56

Accepted Solution

by:
Julian Hansen earned 500 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 56

Expert Comment

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

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…

763 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