4 Replies Latest reply on Jul 28, 2016 4:23 PM by brianc49423945

    open link in new tab within browser

    brianc49423945 Level 1

      Our PDFs open within a browser (IE11). (or downloaded)

       

      All our catalogue numbers are linked to a URL in the PDF that takes the reader to where it is on our online portal when they click the catalogue number.

      My problem is getting the browser to open the URL in a new TAB (or WINDOW). They currently want to open in the same tab in IE11 as the PDF was opened in.

       

      Is app.launchURL the way to do it?

      My next question would be if that's the case, how do I batch sequence rename the "Action" from a URL to a JavaScript action?

       

      Or is there some obscure way to achieve this that I can not visibly see?

      One other totally out-there option I may have to explore is to look at using something like viewerjs.

      Any pointers or advice would be very welcome.

       

       

        • 1. Re: open link in new tab within browser
          TheBCMan Adobe Community Professional

          I'm assuming you are opening these from an HTML page. If you use a target="_blank" in the href (to open the PDF) it should work, you might have issue with some popup blockers.

          • 2. Re: open link in new tab within browser
            try67 MVP & Adobe Community Professional

            If you're referring to links inside a PDF file, then yes, using app.launchURL in a script is the only way of doing it.

             

            And if you want to do it in batch to all of the links in your file(s) then you will need to use a plugin or a stand-alone tool, like this one I've developed: Custom-made Adobe Scripts: Convert all links in a PDF to Open In New Window

            1 person found this helpful
            • 3. Re: open link in new tab within browser
              JR_Boulay Adobe Community Professional

              Hi.

               

              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.

               

              .

              • 4. Re: open link in new tab within browser
                brianc49423945 Level 1

                Thanks for the help guys.

                 

                With the inconsistent behaviour of PDF viewers in all the browsers, I think we will be looking at getting people to download the PDF and use it through Adobe Reader and not encouraging the use of it through the browsers at all. We simply can not afford to have something change and 16,000 links go silent.