TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Re: Use target="_blank" in embedded PDF links? From:Chris Morton <salt -dot- morton -at- gmail -dot- com> To:"techwr-l -at- lists -dot- techwr-l -dot- com" <techwr-l -at- lists -dot- techwr-l -dot- com> Date:Thu, 24 Aug 2017 08:56:21 -0400
Acrobat Pro includes a JavaScript editor, and this code is supposed to open
every link in a new window:
function externalLinks()
{ for(var c = document.getElementsByTagName("a"), a = 0;a
< c.length;a++) { var b = c[a]; b.getAttribute("href")
&& b.hostname !== location.hostname && (b.target = "_blank") } } ;
externalLinks();
When I use the JavaScipt Editor, it displays this by default:
//-------------------------------------------------------------
//-----------------Do not edit the XML tags--------------------
//-------------------------------------------------------------
So I'm guessing this is how it goes together:
//-------------------------------------------------------------
//-----------------Do not edit the XML tags--------------------
//-------------------------------------------------------------
<script>
function externalLinks()
{ for(var c = document.getElementsByTagName("a"), a = 0;a
< c.length;a++) { var b = c[a]; b.getAttribute("href")
&& b.hostname !== location.hostname && (b.target = "_blank") } } ;
externalLinks();
</script>
But when I click *[OK]*, the JS Editor complains about the <c.length;a++
syntax.
On Thu, Aug 24, 2017 at 8:16 AM, Chris Morton <salt -dot- morton -at- gmail -dot- com> wrote:
> Apparently the AutoBookmark plug-in lets me do this, but it's $189.... WAY
> too expensive for the single page I want to perform this single operation
> on.
>
> Another person has a different tool, but it requires every viewer to have
> Java installed; that's too much of a restriction.
>
> Chris Morton
> (click logo â for details)
> <http://www.the-efa.org/dir/memberinfo.php?mid=15271>
> â Substantive Editing â Technical Writing â Proofreading
> â B2B/B2C â Marketing Expertise â Mentoring
>
>
>
> On Thu, Aug 24, 2017 at 7:59 AM, Chris Morton <salt -dot- morton -at- gmail -dot- com>
> wrote:
>
>> I'm using Acrobat Pro DC.
>>
>> I'm required to use its Edit mode, then create a sort of bounding box
>> around the item I want to link. From there, Acrobat offers few options.
>>
>> I have no trouble inserting the URLs to create each link, but simply
>> tacking on a *target="_blank"* does not yield the desired result when I
>> open the resulting PDF in a browser.
>>
>> Chris Morton
>> (click logo â for details)
>> <http://www.the-efa.org/dir/memberinfo.php?mid=15271>
>> â Substantive Editing â Technical Writing â Proofreading
>> â B2B/B2C â Marketing Expertise â Mentoring
>>
>>
>>
>> On Wed, Aug 23, 2017 at 3:48 PM, Chris Morton <salt -dot- morton -at- gmail -dot- com>
>> wrote:
>>
>>> If so, how can I do this?
>>>
>>> Thanks
>>>
>>> Chris Morton (click logo â)
>>>
>>> <http://t.sidekickopen68.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XYgdnqQxW7fsH3H4XrddKW1pNgV-56dMhqf2Q-c6C02?t=http%3A%2F%2Fwww.the-efa.org%2Fdir%2Fmemberinfo.php%3Fmid%3D15271&si=6020636811198464&pi=74057096-fb97-48e7-c59d-70bfe6671665>
>>> â Substantive Editing â Technical Writing â Proofreading
>>> â B2B/B2C â Marketing Expertise â Mentoring
>>>
>>>
>>>
>>
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Visit TechWhirl for the latest on content technology, content strategy and content development | http://techwhirl.com