Home
 
The page you are viewing is part of our 160,000 page PDF discussion forum archive spanning 1999-2011.
Go to the new Planet PDF forum to join the PDF community.
 

Search
 Advanced   
Sign up for a WebBoard account Archive Forum Home


PLATINUM
SPONSOR

GOLD
SPONSORS



Topic  
Go to previous topicPrev TopicGo to next topicNext Topic
Author Message
chrscote
chrscote

Total Messages 4

Subject:Calling external javascript function from embedded PDF

I have an HTML page with an embedded PDF file in it in which I've placed a couple of hotspots that have links to other HTML pages. However, I have a javascript function in the page called linkOpen which will load a given page in a popup window and does a couple of other things as well. Is there a way to call this function (perhaps using something similar to window.parent) when I click the hotspot? Chris Cote


Posted: 06 Apr 2010 02:09 AM
Originally Posted: 06 Apr 2010 01:48 AM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
prodok
prodok

Total Messages 3218

Subject:Re: Calling external javascript function from embedded PDF

It may be possible, but be aware that Acrobat JavaScript and web
browser JavaScript are not the same, and they work in a completely
different environment. Also, considering that web browser JavaScript
is a open barn door, when it comes to secuirity, you really have to
think about it. It is also likely that Acrobat/Reader does not allow
the execution of web browser JavaScript, even when run under a browser
(this may depend on the Acrobat version you are using).

In any case, it is very worthwile to read the security implementation
documentation by Adobe.

Now, how to do it. It is essentially calling an URL (using getURL() or
launchURL() ), as you would do from a link on a HTML page. And the
rest is up to you to test...

Hope this can help.



Max Wyss
PRODOK Engineering
Low Paper workflows, Smart documents, PDF forms
CH-8906 Bonstetten, Switzerland

mailto:max@prodok.com
http://www.prodok.com



[ Building Bridges for Information ]
[ Getting organized with PDFfolio ]



______________________





> I have an HTML page with an embedded PDF file in it in which I've placed
a couple of hotspots that have links to other HTML pages.  However, inste
ad of simply going directly to the new page, I want to have the link call a
javascript function that is in the HTML page.  If it's possible, how do
I call this javascript that is external to the PDF file?


Posted: 06 Apr 2010 02:08 AM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
chrscote
chrscote

Total Messages 4

Subject:Re: Calling external javascript function from embedded PDF

Thank you for such a quick reply. I've never used Acrobat for anything like this which is why I had this question. Since I probably can't access the external javascript, is there an internal javascript function I can use like window.open?


Chris


Posted: 06 Apr 2010 02:20 AM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
   
Go to previous topicPrev TopicGo to next topicNext Topic

go




Top | News | Developer | Find PDF Tools | Sponsorship | Tips | Home



Debenu's Planet PDF - a comprehensive site exclusively focused on Adobe Acrobat/PDF users and uses. Debenu's Planet PDF - Resources for Adobe Acrobat and PDF users

Please post PDF-related questions to our Planet PDF Forum forums.planetpdf.com. To send comments about this site please visit our contact page.
Planet PDF, Planet PDF Forum, PDF SDK - Debenu Quick PDF Library and Debenu are all copyright
© 2011 Debenu Pty Ltd.. All Rights Reserved. Privacy policy.