4

I know that the vast majority of reasons for using pdfs on a website involve allowing users to print documents, but one of our clients has requested that we create a PDF for online viewing, that would have clickable images which open a lightbox-style overlay displaying a larger version of said image.

Is this possible? I did find Adobe's devnet site for Acrobat and javascript, but there's a ton of info there. I'm not looking for someone to spoon-feed me code (although other articles and tutorials are certainly welcome), but I don't want to spend tons of time looking through the Adobe documentation if someone can just tell me right now that it's not even possible.

EmmyS
  • 11,892
  • 48
  • 101
  • 156
  • Please disregard my close vote (for being a duplicate). I decided to try and follow some of the links in the referenced question, and quickly found out why you'd ask this here (and why the other post did NOT answer this question). Unfortunately, there's no way to actually remove a close vote once it's made. My apologies (and upvote). :( – Ken White Feb 15 '12 at 23:46
  • The thought of this makes me want to go on a [r̠̙̮̙ë͊̀ͯg͕̣͍͉̼̹̪̍̅͒̈e̦̗͔͊̍͒̑ͫͨx̬̖̫̟̣͗ͮͦ ͂̌ͪ̀ṟ̩̱̥̌̉ͬ̓̉ͦa͎̱̚g̜̎ͨ̽̎ë̹̟̝̖͓̭̫́ͮ](http://stackoverflow.com/a/1732454/201952)... Have you considered [the offline capabilities of HTML5?](http://www.html5rocks.com/en/features/offline) – josh3736 Feb 16 '12 at 04:20
  • @josh3736 - it's not my call to make. The client is heavily invested in adobe products, and they insist on using PDF. – EmmyS Feb 16 '12 at 14:52
  • @EmmyS, I figured. Good luck. – josh3736 Feb 16 '12 at 15:29

1 Answers1

2

I can't answer specifically how you would do this, but I thought it'd be interesting (in a morbid curiosity kind of way) to check Adobe's PDF Specification to see if the spec itself supports this.

In Version 1.7, Section 8.5.3 Action Types (PDF), on Page 40 it mentions Rich Media Commands, and the ability to execute arbitrary ActionScript or Javascript. So, from the sounds of it - yes, you might be able to do this, assuming you can alter the document content (or show/hide elements) at runtime.

However it's probably worth pointing out that many people don't (or can't) use Adobe Acrobat for reading PDFs, so using advanced features such as this may have undesired side effects, and may make the document unreadable.

  • It is no different than using JavaScript on a web page in regards to usability, since you have to have a way for graceful degradation. – Todd Moses Feb 16 '12 at 04:09