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

How do I make a hyperlink to a website open in a new window?

kathy_g
Registered: Mar 18 2009
Posts: 9

Hi,

I have a PDF that will be viewed via a client's website. The PDF contains hyperlinks to other websites. I'd like to set the link to open the website in a new browser window. And ideally also set the size of the new window.

I've searched for this and find lots of info about opening a pdf in a new window - which seems to require javascript. I just want to open a website in a new browser window. Do I need to use javascript?

I thought this would be simple. Can anyone help?

Kathy

My Product Information:
Acrobat Standard 8.1, Windows
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
Calling a hyperlink in a new window

Although Acrobat doesn't have a link code that will force a Weblink to open in a new window, here's how you can make it happen without worrying whether your users have selected "Open Cross-Doc Links In Same Window."

Rather than linking directly to the URL you want to open, create a link to an HTML document that contains no text. The HTML document immediately opens a new window itself, using HTML code rather than Acrobat's syntax, and opens the desired URL in that window.

The Acrobat Weblink will be a normal link to an HTML page that has nothing in its body and includes the following line in its head:

< META HTTP-EQUIV="Refresh" CONTENT="x; URL=zzz" >For x, substitute the number of seconds that should elapse before the new link opens (in this case, probably zero), and for zzz, substitute the URL that should open in the new window.

;-)
kathy_g
Registered: Mar 18 2009
Posts: 9
Merlin,

Thank you for your reply. I understand your response to be saying that I can force a PAGE (www.mysite.com/mypage.php) to open in a new window, but I cannot force a SITE (www.mysite.com) to open in a new window. Is that correct?

Kathy
kathy_g
Registered: Mar 18 2009
Posts: 9
Merlin,

I tried you suggestion. I must be doing something wrong. The "blank" document loads into the window containing my PDF. Which means the redirects load into this window as well. The end result is the same as before. I want to the window with the PDF to staff open and then load the website into a different, new window. And ideally I'd like to set the size for the new window.

Any suggestions?

Thanks,

Kathy
lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
Kathy,

Would the technique that Ted outlines in his [url=http://www.acrobatusers.com/blogs/tedpadova/opening-pdfs-new-browser-windows]blog[/url] work for you?

The web address doesn't need to be a PDF -- it can be a URL to a website.

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

kathy_g
Registered: Mar 18 2009
Posts: 9
Thank you! That works. I had read that post (or a similar one), but assumed it only worked for opening a PDF....

Now, can I specify the size of the new window?

I've never tried this Javascript stuff before, so this is all new to me.

Thanks

Kathy
lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
You can't control the size of the new window with this command -- this control is managed by the browser user. It's best not to set it because you don't know who your audience is and what their browser experience may be.

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

Larshart
Registered: Feb 25 2010
Posts: 1
http://acrobatusers.com/blogs/tedpadova/opening-pdfs-new-browser-windows