These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

JavaScript Support in PDF - MAC - Firefox combo,

talk2percy
Registered: Sep 8 2010
Posts: 5
Answered

Dear All,

I faced the following issue while using MAC - FF3.6 - Adobe 9 and 'FF PDF Plugin for MAC OS'

• When I first open the PDF in FireFox on a MAC machine, it always opened outside the browser irrespective of the settings on Adobe Reader. When the PDF opens outside browser, javascripts inside PDF work well.
• To fix this I installed "FireFox PDF Plugin for MAC OS 1.1.3" - after this the PDF started opening in FF browser but the none of the PDF scripts are working any more. I have a number of scripts inside the PDF which have never failed on any of the combinations till now. Any help will be greatly appreciated.

Thanks!

~ Prashant

My Product Information:
Reader 9.1.2, Macintosh
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
The problem is that plug-in does not load Reader, it used the OS's built-in PDF viewing capabilities to display the PDF. Since it doesn't support JavaScript in PDF, (and has lousy support for form fields), it cannot work.

According to this, you may be in trouble: http://support.mozilla.com/en-US/kb/Opening+PDF+files+within+Firefox
talk2percy
Registered: Sep 8 2010
Posts: 5
Thanks George, I am trying to validate your statement 'Since it doesn't support JavaScript in PDF' but I did not find it in the link mentioned in your post. However I'll try out the exact steps given there. Can you point me to a link or something which conclusively says that though I can open a editable PDF in FF-MAC combination in browser, I cannot have JavaScripts inside it?

Prashant!

~ Prashant

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
The page linked to says in part:

"Adobe does not yet maintain a plugin for viewing PDF files within Firefox for computers with Mac OS X."

It is well known that Preview on the Mac does not support JavaScript. Just try opening your form in Preview and you'll see JavaScript does not work.
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
talk2percy wrote:
Can you point me to a link or something which conclusively says that though I can open a editable PDF in FF-MAC combination in browser
Hi,

you need to install Adobe Reader 9 and you must use Safari.

About the poor Apple PDF support see that PDF (using Reader, not Preview): http://blogs.adobe.com/loridefurio/applePDF02.pdf

;-)
talk2percy
Registered: Sep 8 2010
Posts: 5
Thanks George and Merlin, I do see the limitation now so I am trying to approach the problem differently. Is it possible to ensure that the PDF opens outside the browser in Adobe reader so that I can have scripts running. I know about the setting on Adobe reader but I cannot really enforce that on my users and I need to do it pro-grammatically.

Thanks!
Prashant

~ Prashant

Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
You should do as portfolios does: put an alert message on the first page of the PDF to enjoin users to use only Adobe Reader to read the document.
And put a document-level JavaScript (or page-level) that goes to the 2nd page each time the first page is displayed.

So, PDF readers with JavaScript enabled will never display the first page, and other will display the alert message directly.

;-)
talk2percy
Registered: Sep 8 2010
Posts: 5
I see, you are indeed _Expert_ :-), I am going to do almost the same thing but for the fact that I'll simply put the message on top of first page and hide it by JS :-)

~ Prashant

Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
[img]http://www.ruedusmiley.com/smileys/respect%20(4).gif[/img]