MyThinkPond

On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

  • Recent Posts

    November 2009
    M T W T F S S
        Jan »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    30  
  • Subscribe Options

  • Awards

    JavaCodeGeeks
  • Most Valuable Blogger @ DZone
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 175 other followers

  • Follow MyThinkPond on WordPress.com
  • Blog Stats

    • 366,804 hits
  • General Options

Opening a link in a PDF document in a new window

Posted by Venkatt Guhesan on November 4, 2009

Adobe Acrobat

Open Link In PDF In New Window

Sometimes you like to link out to other URL’s or other PDF’s from within a PDF document. And you will notice that this replaces the existing HTML frame (if you had served the original PDF from a website) or window with the new document making it hard to navigate. In these cases, you would prefer to open the link in the PDF onto it’s own new window.

Well here how you do it…

So within Acrobat Professional (not Acrobat Reader), you will have options to add a URL or link. Instead, you can add a “Javascript” code as the action item on a link. And enter the following as the code that you use:


app.launchURL("https://mythinkpond.wordpress.com/", true);

where the a “true” in the second attribute tells Acrobat reader to open the link in a new window and a “false” will open it up in the existing window.

To learn more about the Javascript API supported in the Acrobat Reader try this link:
http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf

Or this link: Acrobat Developer Center

Happy Coding!

Advertisements

8 Responses to “Opening a link in a PDF document in a new window”

  1. Michelle Spinks said

    Hi there

    Thank you so much for this.
    Just to push it, do you have a code to open a link in a PDF in a new tab rather than window?
    Same deal, added in Acrobat Professional or if possible… InDesign.

    Cheers

    Michelle

  2. This Site said

    Have you ever thought about publishing an e-book or guest authoring on other
    sites? I have a blog based on the same ideas you discuss and would love to have you share some
    stories/information. I know my viewers would appreciate your work.
    If you’re even remotely interested, feel free to send me an email.

  3. Hello there, There’s no doubt that your blog could possibly be having internet browser compatibility issues. When I look at your blog in Safari, it looks fine however when opening in I.E., it has some overlapping issues. I simply wanted to give you a quick heads up! Other than that, fantastic site!

  4. I tend not to comment, but after reading through some of the comments on this page Opening a link in a PDF document in
    a new window MyThinkPond. I do have a couple of questions for you if you don’t mind. Could it be just me or does it give the impression like a few of these responses appear like they are written by brain dead folks? 😛 And, if you are posting at additional online sites, I would like to keep up with anything new you have to post. Could you list of all of all your shared pages like your linkedin profile, Facebook page or twitter feed?

  5. Great blog here! Also your website loads up very fast!
    What web host are you using? Can I get your affiliate link to your host?

    I wish my site loaded up as fast as yours lol

  6. Hey There. I found your blog using msn. This is an estremely well
    written article. I will be sure to bookmark it and return to read more off your useful information.
    Thanks for the post. I’ll certainly return.

  7. Great post! We will be linking to this particularly great post on our site.

    Keep up the great writing.

  8. Anand Kadiwal said

    Thank you so much!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: