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

Opening a pop-up window

aremac
Registered: Jul 22 2009
Posts: 9

Hi,

I'm using Adobe Acrobat 9 Pro Extended and I would like to place a link in the PDF to a pop-up window. I just wondered if anyone knew how to do it? Or if it was even possible? Is there a way of doing this without using Javascript? I've been playing with this for a while now and I need expert advice! :)

Kind regards,

Heather

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Pop-up windows need to be scripted and associated with some event.

For a pop-up widow upon opening a PDF you need to create a document level script, see [url=http://www.acrobatusers.com/tutorials/2007/07/js_document_scripts]Entering Document Scripts[/url] by Thom Parker for instructions. You code could be:
// create opening message// application var sMsg = 'You are using ' + app.viewerType;// version of applicaitonsMsg += '\nVersion: ' + app.viewerVersion;// OS platformsMsg += '\nYour OS is: ' + app.platform;// using a web browserif ( this.external ){sMsg += '\nYour are viewing this PDF from within a web browser';}else{sMsg += '\nYour are not viewing this PDF from within a web browser';}// display the message as an alert pop-upapp.alert(sMsg, 3, 0);

George Kaiser

aremac
Registered: Jul 22 2009
Posts: 9
Hi!

I was actually hoping to either create a link to the pop-up window or link it to a button rather than on document opening. Is that possible?

Thanks,

Heather
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
You can open URL's from a popup menu.

Here's an example from the JavaScript API Reference Manual
// Declare pop-up menu properties as an array.var aParams = [{cName: "Adobe Web Page", cReturn: "www.adobe.com"},{cName: "-"},{cName: "The Adobe Acrobat family",cReturn: "http://www.adobe.com/products/Acrobat/main.php"},{cName: "Adobe Reader",cReturn: "http://www.adobe.com/products/Acrobat/readstep2.php"}];// Apply the function app.popUpMenuEx to the app object, with an array// of parameters aParamsvar cChoice = app.popUpMenuEx.apply( app, aParams );if ( cChoice != null ) app.launchURL(cChoice);

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

aremac
Registered: Jul 22 2009
Posts: 9
Hi radzmar,

Thanks for your reply but I don't have a pop-up menu. It's a webpage that I need to open inside the PDF but open at a pre-set size.

Cheers,

Heather
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
I don't think there is a way to open a URL for a popup like a hyperlink.
But you can prompt a message and let the users select if they want to download the website to Acrobat.
They can choose between Yes and Abort.

var nButton = app.alert({cMsg: "Do you want to launch Acrobat.com?",cTitle: "Open URL",nIcon: 2, nType: 2});if ( nButton == 4 ) this.getURL("http://www.acrobat.com/", false);

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs