Q:
How do I open a PDF link (a URL hypelink) in a new browser window?
----
A:
Executing a hyperlink is built into Adobe's Acrobat Reader and it
cannot be changed. Unfortunately, Acrobat Reader does not support
'_blank' or '_target' directive similar to HTML and there are no PDF
link properties or Acrobat JavaScript methods (such as "window.open",
"newWindow" etc) that can affect this behavior. So, there is no way to
instruct the browser to open a new window from within Adobe's Acrobat
Reader.
However, there is a workaround that will work when the PDF file is
loaded from the browser.
You can force the browser to open the PDF in a new window using an
intermediate HTML redirect page. So the PDF link would point to an HTML
page and this web page would instantly open the new browser window with
the final destination link.
<html>
<head>
<meta http-equiv="refresh" content="1;URL=JavaScript:history.go(-1)">
<script type="text/javascript">
winname='MY' + Math.round(Math.random() * 1024) + 1; if (document.all)
{
MY =window.open('target.html', winname,
'status=no,resizable=no,toolbar=no,hotkeys=no,scrollbars=no,width=790,height=590');
}
else {
MY =window.open('target.html', winname,
'status=no,resizable=no,toolbar=no,hotkeys=no,scrollbars=no,width=790,height=590');
MY.moveTo((screen.width-790)/2,(screen.height-590)/5);
}
MY.focus()
</script>
</head>
<body onload="load()">
</body>
So activating the link in PDF will open intermediate HTML which will
pop-up a new window then automatically move back to the original PDF
file. I believe that we could also pass the final link target to the
intermediate HTML as a parameter so that the same HTML page could be
used to handle all PDF links.