Skip navigation
jred33
Currently Being Moderated

Problem using app.launchURL with Adobe Reader X

Jan 27, 2011 5:30 AM

Hello -

  Have an application that is going live in a couple of days.  In many of our fillable PDF forms we use:

app.launchURL("http://www.yoursitehere.com", true);

 

This worked fine until our company pushed out Adobe Reader X to all of our employees.  Now the above function does nothing.

 

Is anyone experiencing similar?   When I say the function does nothing, you click on button that runs the above function, and no new window opens with specified URL.

 


 
Replies
  • Currently Being Moderated
    Jan 27, 2011 7:03 AM   in reply to jred33

    Make sure you're not in Protected Mode, since JS is disabled in that  mode.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 27, 2011 1:18 PM   in reply to jred33

    If Protected Mode is enabled no script will work. You must instruct your users to disable it. It's not that complicated.

     
    |
    Mark as:
  • George Johnson
    11,661 posts
    Aug 11, 2002
    Currently Being Moderated
    Jan 27, 2011 1:36 PM   in reply to Gilad D (try67)

    try67 wrote:

     

    If Protected Mode is enabled no script will work. You must instruct your users to disable it. It's not that complicated.

     

    Can you clarify that? Do you mean the script in question, or any JavaScript? JavaScript generally works fine for me in Reader 10 when protected mode is enabled.

     
    |
    Mark as:
  • George Johnson
    11,661 posts
    Aug 11, 2002
    Currently Being Moderated
    Jan 27, 2011 1:45 PM   in reply to jred33

    I just tried app.launchURL with Reader 10 with protected mode enabled, and it worked just fine. It did pop-up a confirmation dialog, giving the opportunity to block it, so you may want to check the Trust Manager settings: Edit > Preferences > Trust manager

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 27, 2011 3:34 PM   in reply to jred33

    Make sure you're not in Protected Mode, since JS is disabled in that mode.

     
    |
    Mark as:
  • George Johnson
    11,661 posts
    Aug 11, 2002
    Currently Being Moderated
    Jan 27, 2011 3:59 PM   in reply to jred33

    You're right, my first test was with the file opened outside of a browser. When I tested the file on a web server, it worked, but not in a new window if protected mode was enabled, just as you've found. I was a bit confused because you initially said it did nothing.

     

    This is probably the intended behavior. I recall thinking when they first added this method years ago that it should be restricted somehow, otherwise a rogue PDF could attempt to open an unlimited number of new browser windows, which can (and did) crash the users machine.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 28, 2011 12:32 AM   in reply to George Johnson

    Sorry, I take it back. I thought I read that in one of the technical blogs

    about Protected Mode, but it seems I misread.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2011 12:20 AM   in reply to jred33

    Got the same problem, any insights will be greatly appreciated.

     

    Not exactly professional for me to tell thousands of clients (and potential clients) to check their acrobat settings.

     

    Any workarounds? Can we code this straight from InDesign (my source application)?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2011 12:31 AM   in reply to caupolican10

    Why is it unprofessional? And no, you can't change the protected mode from

    an external source.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2011 12:34 AM   in reply to Gilad D (try67)

    By unprofessional, I meant to say that some users can access the links whilst others experience nothing. It would be unprofessional to have a disclaimer for users to check their security settings (not a valid work-around) or something like that.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 19, 2011 7:33 AM   in reply to jred33

    I determined when this happens.

     

    I have several forms that use "app.launcURL (...)", several years and just the installation of Adobe Reader X users have begun to have different problems.

     

    Some say they are redirected to a page in Adobe, others just the browser opens but is blank, is not going to any page and in other cases non-existent open url like "http://xn--h5a9807h/" or "http://xn--tp-vxc5603s" ... Reader and all with X.

     

    The problem is the length of the URL ... if it exceeds 255 characters failure occurs (which does not happen with earlier versions of Reader).

     

    The following link will leave a form on which you can verify this:  http://www.nartexsoft.com/downloads_nartex/adobe/launchUrl-Issue.pdf

     

    Greetings.    

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 28, 2011 2:41 AM   in reply to jpadron_uy

    For those interested, I've just published a new (free) tool on my web-site that will convert all launchURL() JS-actions to "real" web-links, so it might help solve this problem. Be aware, though, that if you have other code in your link, it will be lost.

    You can get the tool here: http://try67.blogspot.com/2011/09/convert-javascript-links-to-real-web .html

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 22, 2012 11:38 AM   in reply to jred33

    We're having a similar problem.

     

    First, an overview of our application. We have a (Java) web application where users can select documents to print. Upon a request, iText generates a PDF (displayed in the web browser with the Adobe Reader plug-in) with 1) an open action to print ("this.print(true);") and 2) a DID_PRINT action to redirect back to the application using launchURL ("app.launchURL();"). This all occurs in the same window; there are no pop-ups.

     

    When we deployed the application, we were using Adobe Reader 9, and everything worked perfectly. Subsequently, we upgraded to X, and now this functionality works sporadically. Sometimes it works fine several times in a row, while other times it doesn't work several times, then suddenly does. Reloading the same PDF may change the behavior from broken to working or vice versa.

     

    To verify this is an Adobe Reader issue and not an iText issue, I've saved off PDFs that initially exhibit the correct behavior. When loading those static PDFs, sometimes they work, and sometimes they don't. That is, the PDF doesn't change, but the behavior in the browser/plug-in does.

     

    Some further notes:

     

    - It seems that launchURL() never works in IE when loading a PDF from the local filesystem. In addition, it seems that if it is working (via a PDF from the server), opening a PDF from the local filesystem in another tab stops it from working in all tabs.

     

    - For debugging purposes, I've tried replacing launchURL() with alert(). From what I can see, this always works, regardless of where the PDF resides. This, in addition to the fact that the initial printing (this.print(true)) always works indicates that JavaScript is not being blocked in general (regarding the Protected Mode/JS disabled reference in this thread).

     

    - As far as I can see, launchURL() always works correctly in Firefox, even from the local filesystem. Unfortunately, our users only have IE on their PCs.

     

    I'm hedging a bit above ("It seems") as, because of the sporadic nature of this, it is hard to say for certain what always/never works and what usually/rarely works.

     

    Any ideas? The random nature of this has made it very frustrating to diagnose. Some sort of security setting comes to mind, but one would assume the behavior would be consistent. That is, if a policy was blocking launchURL(), it should always block it, which isn't the case.

     

    Version details:

     

    IE 8.0.6001.18702CO

    Adobe Reader plug-in: 10.0.1.434

     

    Firefox 3.6.28

    Adobe Reader plug-in: 10.0.1.434

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 27, 2012 11:24 AM   in reply to lukpac

    Bump.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 7:48 AM   in reply to lukpac

    FYI, I updated to Adobe Reader 10.1.4.38, and the behavior is the same. That is, in IE sometimes launchURL() works, sometimes it doesn't.

     

    Anyone?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2012 9:58 AM   in reply to jred33

    Disable the protected Mode N try

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 30, 2012 12:20 PM   in reply to Mandeep5062

    "Enable Protected Mode at startup" is greyed out for me. It doesn't appear to be checked, but I'm not sure how to confirm that.

     

    Nevertheless, even if it is enabled, it doesn't make sense that sometimes it would work and sometimes it wouldn't.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 11, 2012 8:32 AM   in reply to lukpac

    Bump.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (1)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points