Solved

Can JavaScript be used in a PDF?

Posted on 2016-08-31
5
105 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 58

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 58

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 58

Expert Comment

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

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

623 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