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.
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.