Solved

Can JavaScript be used in a PDF?

Posted on 2016-08-31
5
67 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
  • 3
  • 2
5 Comments
 
LVL 51

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 51

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 51

Expert Comment

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
This video Micro Tutorial is the first 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 al…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now