Can you help fix an Acrobat/javascript conundrum??

Posted by: HughieW

Can you help fix an Acrobat/javascript conundrum?? - 04/14/10 05:07 AM

Hi. I’m a copywriter based in Suffolk, UK, tasked with publishing a series of PDFs to be posted on the internet for downloading by end-users in a major public sector organisation.
The PDF is designed to open in full screen view, that is, without tool or menu bars visible. This means it would be helpful for me to embed additional functionality onto each page of the PDF for users who do not know keyboard shortcuts.
In doing so, I have found that when adding the dynamic zoom tool function via Acrobat’s Advance Editing > Forms > Button Tool, the dynamic zoom tool only works in some versions of Acrobat Reader and not others.
I suspect this is because the dynamic zoom tool is accessed from different locations in different versions of Reader. Therefore, the instruction that I embed in to the button tool that relies on a menu-tree command (‘find the tool in this location via the menu’) cannot therefore be executed.
Fortunately, it appears that there is a javascript name available for the dynamic zoom tool that I can use instead of a menu-tree command. But unfortunately, it appears that the script name is different for different versions of Adobe Reader...
Not to be outdone, we have managed to write a small piece of javascript that, when assigned to the PDF using the button tool, identifies which version of Reader the recipient is using and activates the correct script name.
So far so good.
However, it now appears that version 8 of Adobe Reader has a higher level of security built in, so that javascript is security restricted and isn’t allowed to run!
This of course means that the button I’ve included in the PDF to bring up the dynamic zoom tool doesn’t work at all for end-users using Adobe Reader v8.
Getting the users to adjust their security permissions in the preferences is problematic and less than ideal. I really want the PDF to work ‘out of the box’ so to speak, without the users having to perform somersaults to get every element of the PDF to function fully as designed.
And seeing as the end-users are part of a public organisation and will not necessarily have the authority to update their software from v8 to v9 themselves, I am a little stuck.
So what’s my query? I’ve got more than one:
• Is there a more detailed script I can assign using the button tool to get the dynamic zoom tool to work as outlined above in v8?
• Can I raise the security level of the dynamic zoom tool from within the PDF (that is, so that the dynamic zoom tool activates automatically and without end-user intervention, e.g. without downloading bits of code to place in file directories)?
• If I were to assign a digital ID/certificate to the PDF, would this allow the javascript to run unhindered?
If you guys can shed some light on all this, that would be awesome. Many thanks for reading.
Posted by: MacBozo

Re: Can you help fix an Acrobat/javascript conundrum?? - 04/14/10 08:10 AM

I have Acrobat Javascript disabled in Reader 9.3.2 as a security measure, but I know how to change that setting rather easily if I had a need to do that. As I recall, there were severe security issues related to Javascript in Acrobat Reader which is why I have it disabled. Also, as I recall, Reader 8 was riddled with security flaws as well. I'm not sure that you'd want to open up a can of worms for your end users.
Posted by: HughieW

Re: Can you help fix an Acrobat/javascript conundrum?? - 04/15/10 04:58 AM

Shoot! That sounds like bad news, Michael. Thanks for the reply, tho'. Any ideas on how best to proceed??
Posted by: MacBozo

Re: Can you help fix an Acrobat/javascript conundrum?? - 04/15/10 06:13 AM

Not sure about how to proceed. I just wanted to point out the security issues that you could encounter. Why the need to have it open full screen?
Posted by: HughieW

Re: Can you help fix an Acrobat/javascript conundrum?? - 04/22/10 02:43 AM

Simply because it looks cleaner (the document is meant to be read on-screen. There's another 'printer-friendly' version available of each PDF). Plus it's at the client's request.