App.openDoc issue

In prior versions of Acrobat, calling "app.openDoc({cPath:pathToPDF, bHidden:false})" would open the desired document in Acrobat with all tools available.  However, in Acrobat X, the first time I call this method Acrobat opens with a menu bar, but only a subset of the tools.  Form tools are completely unavailable and can't be accessed unless I close Acrobat and re-open the document manually.  The second time I call the method Acrobat opens with no menu bar at all.  I don't understand why the behavior is different from one call to another or why the tools are limited.  Is there a work-around for this problem?  Also, I noticed the same behavior when launching documents inside a browser window.  Any insight is appreciated.

That sounded like a reasonable assumption, however in Read mode you have no tool/menu bars.  When the document opens, I actually have a menu bar (the first time I call the method), but "Tools" is missing and can't be added back.  I can press control+H to enter and exit reading mode, but the Tools are still not available.

Similar Messages

  • App.opendoc does not display security warning window like e.g. "open a file" function?

    When I link from one PDF to the other via "open a file" function (both PDFs are located in %userprofile%/mydocuments directory), Reader X and XI open a security warning box. If I agree to open the target file, this specific file always opens without displaying the warning again.
    When I link to the same file via app.opendoc, the security warning box does not open. So I do not get a chance to add the target file to the list of trusted files.
    Is there any way to motivate app.opendoc to display security warning boxes due to the new sandboxing technology in Reader >= X? So that I get a chance to add the target PDF to the trusted PDFs?

    Is there any chance that the application is being run from Developer Suite? In other words, is Developer Suite installed on the client machine and hosting the app?
    Regardless, although anything is possible, I have never heard of what you are describing. In all cases, the dialog box should be the java dialog which is a grayish/purple color. The exact color will vary depending on the JRE version you are using.
    If my first point is not the case, I would recommend that you consider using WebUtil 10.1.2.2 and also patch the AS environment to the same version. To get WebUtil to 10.1.2.2, you will need to patch a Developer Suite home and copy frmwebutil.jar to the AS home. After patching, I believe you will also find an updated webutil.pll in the DevSuite \forms directory which will also need to be copied then compiled on the deployment server.
    Also, ensure that you are using Jinitiator 1.3.1.26 or newer. If you are using the Sun JRE, be sure you are using a certified/supported version. For example, you can use the latest 1.5.x Sun JRE with Forms 10.1.2.2, which is 1.5.0_15

  • Problem with checking file existence by using app.openDoc

    Hi Folks,
    I have to create a script for a big project with many PDF's. (Just like Ingrimm - it's the same company http://forums.adobe.com/thread/747022?tstart=0) This PDF's are made of scanned images. I need to rename the files to names that are extracted from within the file. This is working without problems.
    Now there could be the case, that a filename exists already. I don't want the files to be overwritten, so the idea is, that already existing filenames are saved as filename_1, filename_2, etc... (Before I merged them, but this isn't what is wanted.)
    For this reason I need to use app.openDoc to check, if a file exists. Yesterday my script worked fine, but after starting it today, I discovered that it started again to overwrite files which are already existing.
    I added an app.alert to my catch method to see what error is thrown. The message is: 'NotAllowedError: Security settings prevent access to this property or method.'.
    After using google, I found out, that Acrobat is not finding any files. But I checked and there are files which should be doubled.
    I have no idea how to fix that problem. Anybody here who can help me?
    Regards,
    Steffi
    * regular expression for search
    var idNumber = /08\d\d\d\d\-\d\d\d\-\d\d\d\d\d-\d\d\d/g;
    * if possible this function extracts the searched number as string
    * @param rematch string which should be searched in document
    * @return null if rematch is not found or string if rematch is found
    function ExtractFromDocument(reMatch) {
      try {
             var Out = new Object();
             for (var i = 0; i < 1; i++)
              numWords = this.getPageNumWords(i);
              var PageText = "";
              for (var j = 0; j < 30;j++) {
                  var word = this.getPageNthWord(i,j,false);
                  PageText += word;
              var strMatches = PageText.match(reMatch);
              if (strMatches == null) continue;
          return strMatches;
      } catch(e)
          app.alert("Processing error: "+e)
    * tries to load given filename (extracted number)
    * @param filename string of file which should be checked
    * @param n number to iterate while checking for files
    * @return true if file exists or false if not
    function checkIfFileExists(filename, n) {
        var existingDoc = false;
        try {
            if( n == 0) {
                var checkDoc = app.openDoc({cPath : "../GAG-out/"+filename+"-001.pdf"});
            } else { 
                var checkDoc = app.openDoc({cPath : "../GAG-out/"+filename+"-001_"+n+".pdf"});
            checkDoc.closeDoc();
            existingDoc = true;
        } catch (e) {  
             app.alert("Processing error: "+e)
        if( existingDoc == true ) {
            n = n+1;
            n = checkIfFileExists(filename, n);
        return n;
    var filename = ExtractFromDocument(idNumber);
    if(filename == null || filename == undefined) {
      filename = Math.round(Math.random()*999999999999);
      this.extractPages({nEnd:(this.numPages-1), cPath : "../GAG-out/n_"+filename+".pdf"});
    } else {
        fileExistence = checkIfFileExists(filename, 0);
        if(fileExistence != 0) {
            this.extractPages({nEnd:(this.numPages-1), cPath : "../GAG-out/"+filename+"-001_"+fileExistence+".pdf"}); 
        } else {
            this.extractPages({nEnd:(this.numPages-1), cPath : "../GAG-out/"+filename+"-001.pdf"});

    Sorry, I marked it as bold text but unfortunately it happens to be unformatted
    It's the app.openDoc within my function checlIfFileExists:
    try {
            if( n == 0) {
               var checkDoc = app.openDoc({cPath :  "../GAG-out/"+filename+"-001.pdf"});
            } else  { 
               var checkDoc = app.openDoc({cPath :  "../GAG-out/"+filename+"-001_"+n+".pdf"});
             checkDoc.closeDoc();
            existingDoc = true;
         } catch (e) {  
             app.alert("Processing  error: "+e)

  • App.openDoc works in Acrobat, not in Reader

    In a folder-level script I'm using app.openDoc to open an existing PDF and extract an icon from it. The following code works in Acrobat 11 but in Reader X I get a NotAllowedError: Security settings prevent access to this property or method error.
    this.disclosed = true;
    myIcon = app.trustedFunction(function (oArgs) {
         app.beginPriv();
         var pluginPath = app.getPath({ cCategory: "app", cFolder: "javascript" });
         var myDoc = app.openDoc({ cPath: pluginPath + "/MyImages.pdf", bHidden: true });     // <----- error happens on this line
         var oIcon = util.iconStreamFromIcon(myDoc.getIcon("myIcon"));
         app.endPriv();
         return oIcon;
    The MyImages.pdf exists in the same Javascripts folder as the javascript file. I created MyImages.pdf manually via the console and set disclosed=true before saving it.
    I've also tried modifying the call to app.openDoc to set oDoc:this (as recommended in other discussions) but that only caused the same NotAllowedError in both Acrobat and Reader.
    Any ideas?

    It gets called from the top level of the javascript file. Here's an example -- the exact contents of my javascript file -- where I simply load the icon and display the width in a pop up alert. If I open a PDF from the file system then this generates the same NotAllowedError during the call to app.openDoc(). But, if I launch Reader and wait before opening the PDF, the code runs fine and the correct icon width gets alerted to me.
    var myIcon = app.trustedFunction(function () {
          app.beginPriv();
         var pluginPath = app.getPath({ cCategory: "app", cFolder: "javascript" });
         var myDoc = app.openDoc({ cPath: pluginPath + "/MyImages.pdf", bHidden: true });     // <----- error happens on this line
         var oIcon = util.iconStreamFromIcon(myDoc.getIcon("myIcon"));
          myDoc.closeDoc(true);
          app.endPriv();
         return oIcon;
    app.alert(myIcon.width);

  • App.openDoc error in browser

    I have created a javascript that I use to add links to a pdf that opens another pdf file. The script works fine in Acrobat and Reader, but not when the pdf is displayed through a web site using Internet Explorer. I set the disclosed attribute and have gone over the reference and forums. I attached the code, below. Does anybody have any ideas? Thank you.
    app.addMenuItem( { cName: "LinkBatch",
    cUser: "Process Multiple Links ...",
    cParent: "Document",
    cEnable: "event.rc = (event.target != null);",
    cExec: "LinkBatch();" });
    function LinkBatch()
    console.show();
    app.trustedFunction(UpdLinks("12", "a3.cl.1_fac_7.pdf", this));
    function UpdLinks(lnam, lloc, doc)
    app.beginPriv();
    try
    console.println("processing " + lnam);
    doc.removeField(lnam);
    for (var p = 0; p < doc.numPages; p++)
    var numWords = doc.getPageNumWords(p);
    for (var i=0; i<numWords; i++)
    var ckWord = doc.getPageNthWord(p, i, true);
    if (ckWord == lnam)
    var q = doc.getPageNthWordQuads(p, i);
    m = (new Matrix2D).fromRotated(doc,p);
    mInv = m.invert()
    r = mInv.transform(q)
    r=r.toString()
    r = r.split(",");
    l = doc.addLink(p, [r[4], r[5], r[2], r[3]]);
    l.borderColor = color.blue
    l.borderWidth = 1
    l.setAction("app.openDoc('" + lloc + "')", doc);
    catch (e) { app.alert(e) };
    app.endPriv();

    Have you looked at the contents of the URI address for the link?
    Is the URI address available to the user on the web?
    Have you carefully read the JS Api Example 5 for the "app.openDoc()" method?
    Example 5 (Acrobat 7.0)
    Open a file from a WebDAV server. The app.openDoc method requires the path to the file to be escaped.
    var myURL = encodeURI("http://www.example.com/My Folder/ComDoc.pdf");
    app.openDoc({cPath: myURL, cFS: "CHTTP" });

  • Using app.openDoc with LC field as path

    Using LC ES2, Acrobat X.
    I was hoping someone might be able to point me in the right direction.  Synopsis:  I have a LC form that I use to import parent/child XML data. This form is a report, but it is basically a summary of a group of PDFs that I send off to my clients (on CD).  Each child record has a field containing the name of its corresponding PDF file.  I have been trying my best to make a link that will open the child file in a new Acrobat window.  I've used app.openDoc, but cannot seem to pass my field into the cPath. I've even tried using the "address" of the field containing the path. Example:
    app.openDoc({cPath:TextField1.rawvalue,oDoc: this});
    I've tried the device independent paths as well as just "filename.pdf", where both source and targets were in the same folder.
    I thought one of my attempts was going to work, but I got the "NotAllowedError: Security settings prevent access to this property or method." message in the debugger.
    This brings me to disclosed=true.  Is is still the case that all of the target PDFs that I am linking to need to have this property set?  Or, am I missing something alltogether here?

    Sorry, I marked it as bold text but unfortunately it happens to be unformatted
    It's the app.openDoc within my function checlIfFileExists:
    try {
            if( n == 0) {
               var checkDoc = app.openDoc({cPath :  "../GAG-out/"+filename+"-001.pdf"});
            } else  { 
               var checkDoc = app.openDoc({cPath :  "../GAG-out/"+filename+"-001_"+n+".pdf"});
             checkDoc.closeDoc();
            existingDoc = true;
         } catch (e) {  
             app.alert("Processing  error: "+e)

  • App.openDoc unpredictable results

    Hi
    I'm trying to create a simple button that opens a PDF attachment (one of several). I use the following code:
    app.openDoc("my.pdf");
    This worked for one PDF but not others, all of which I have created in the same way. I tried inserting this.disclosed = true in the attachment doc scripts, (and tried app.this.disclosed). But this makes no difference. Strangely, I found that opening the attached file from the Attachments panel, running the PDF optimiser on it as far as saving, and saving the file in a new location then cancelling the optimiser, caused the attached files to load once I returned to the main PDF. However, on saving and closing the main PDF and reopening it, I'm back to square one, but no files open now, not even the original attachment. And now I can't use the optimiser workaround to make the others work. I've tried creating new files from scratch and reading the Acrobat scripting resources, but can find nothing to help me.
    Many thanks
    Kev

    Hi
    I think I've solved it.
    This works:
    this.exportDataObject({ cName: "Untitled Object 3", nLaunch: 2 });
    Attachments made via the UI are automatically given the names "Untitled Object"; "Untitled Object 1"; and so on. As long as the attachment list is not re-sorted, these names match the order in the attachment list, which is the order in which the files were attached.
    This script helped me see in the JS debugger what attachment names were in use:
    var d = this.dataObjects;
    for (var i = 0; i < d.length; i++)
    console.println("Data Object[" + i + "]=" + d[i].name);
    However, I'm not sure how to work out which is which if you have multiple attachments that have been re-sorted other than by trial and error.
    Thanks for the help that pointed me to this solution.
    Kevin

  • How To app.openDoc & file exists

    I'm creating a pdf named "ABC.pdf"....
    Open ABC.pdf. It include JavaScript
    var otherDoc = app.openDoc("DEF.pdf", this);
    And, if file doesn't exist. false....
    var otherDoc = app.openDoc("GHI.pdf", this);
    I do not understand how to write this divergence order.
    Would you teach who it is?

    It's not that easy... First of all, the files you're trying to open have to be disclosed. Is that the case?
    Also, you can't use openDoc in the Doc Open event of another document, as is specfied in the JS API Reference.
    What you can do, though, is place the code somewhere similar, like in the Page Open action of the first page. Of course, then you'll need to make sure that it doesn't get launched each time someone scrolls to that page.
    openDoc itself can either return null or throw an Exception if the file doesn't exist (or exists but is not not disclosed), so you will need to account for both possibilities.

  • Current app compatibility issues on iPod Touch!

    I have a 2nd Generation iPod Touch which I've had for a couple of years and I've never experienced any problems with it until the most recent update on the version of software it's running. Since the 4.2.1 update I am no longer able to run some apps on my device and I can't understand why. The two apps in question that won't run are...
    djay for iPhone & iPod touch (Version 1.2)
    The 7th Guest (Version 7.2)
    Everytime I attempt to sync either of these two apps it comes up with an error message stating "The app was not installed on the iPod because it is not compatible with this iPod". Now I've looked around at other problems with app compatibility issues and most people say that you should simply update the iPod. My device is currently up to date so I can't understand why these apps aren't working. Is it because the hardware itself on the 2nd Gen iPod is simply out of date? Any help or insight into this matter would be greatly appreciated.
    Cheers.

    Your iPod's hardware is insufficient. djay for iPhone & iPod touch requires an iPod touch 3rd generation or later (per the developer's web site), and The 7th Guest requires iOS 4.3 or later which will only run on a 3rd-gen iPod touch. If you want to run these two apps, you'll need to get a new, or at least newer, iPod.
    Regards.

  • Any charge for free app and issues at Apple Store?

    In case we need to create free issues or even apps for iPad (from a non-profit organization), what will the incurred costs be through the whole process?
    i.e. From the time of development of issues and the app in which the issues may work - is there any registration or license fees involved, till it reaches all customers - provided the package is for free?
    Any charge for free app and issues at Apple Store for iOS apps for iPad?

    You must pay the USD$99 fee to join the Individual Developer Program.
    After that, there is no fee to put free apps into the iOS App Store.

  • More about app.openDoc

    Hi,
    being a bit further with my work on app.openDoc thanks to the help of this forum, I'm a bit puzzled about the following problem:
    var mainDoc = app.openDoc(mainDocPath);
    //var mainDoc = app.openDoc("/C/myDoc.pdf");
    app.alert(mainDoc);
    In this example "mainDocPath" is a valid path and the document opens. Anyway mainDoc is being evaluated as "undefined".
    When I use the commented line instead, the alert displays "[Doc_Object]" as I would expect.
    What is going wrong here?
    Thanks for any help.

    I have been breaking down complexity a bit further.
    Two documents: C:\Control.pdf and C:\Main.pdf.
    The control document has a document level javascript "TestCall" with content:
    function TestCall() {
        mainDoc = app.openDoc("/C/Main.pdf");
        //this.closeDoc();
    TestCall();
    The main document has a javascript "SetDisclosed" with content:
    function SetDisclosed()
        this.disclosed = true;
    When I run the control javascript while the document is open, everything is fine and it opens the main document. If the javascript runs on document initialization, I get the "NotAllowedError".
    If I change the line "mainDoc = app.openDoc("/C/Main.pdf");" to "mainDoc = trustedOpenDoc("/C/Main.pdf");", i.e. running the folder level script
    trustedOpenDoc = app.trustedFunction(
         function(pPath) {
              app.beginPriv();
              var trustedDoc = app.openDoc({
                   cPath: pPath,
                   bUseConv: true
              app.endPriv();
              return(trustedDoc);
    everything is still fine when run from the opened control document.
    When it runs at document initialization, I get an error dialog stating that an error occurred when opening the document because of an "invalid action object" (this is in german language and I don't know the exact words that it will show in an english language version).
    That can't be the intended way of functionality, can it? When reading through the forums, I get a feeling like many people do what I want to do and there is only one more little hint missing and there will be prospering landscapes for my programming efforts if this could be solved. Unfortunately I can't find the point myself and can't see sense and meaning in that ugly behaviour.
    I already had the idea that the folder level scrips might not already be loaded when the trusted function is called at document initialization and tried it in a loop with a try/catch construction, but it was never working at document initialization.
    Any more hints?

  • Opendoc issues

    I created a URL iview with the following details:
    http://<server>:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=1059&sOutputFormat=P
    When I use my PC, I can access it without any issues after inputting username and password. When using another PC, It redirects to the following URL:
    http://<server>:8080/PlatformServices/service/app/error.do
    An error has occurred: An error occured while trying to view the document 
    Is there a reason why is that happening? Also is there a way I can pass a service user (e.g. crystal) to be the default login to be used in connecting to the mentioned URL iview from EP?

    Hi Ken,
    The post you're referring to talks about a misdeclaration of parameter iDocID which in our case, it is defined correctly. As for the other suggestion:
    Also try and see if you can execute the OpenDoc URL directly via Internet Explorer. Lastly, make sure the hostname is recognisable with your other PC. Use IP address as a test instead.
    Using my PC, I can access OpenDoc URL via IE without issues. Using the test PC, I can't access it. I can verify though that the test PC can ping and connect to hostname and IP without issues. I can even login to InfoView from test PC so I see no issues with the connection from test PC to CMS server. The only one with issues is the OpenDoc which is really weird. Will appreciate if someone has an idea on this and how to solve or at least what to check.

  • Adobe AIR app installation issue due to certificate problem on mac 10.9.5

    Im trying to upgrade and then reinstall an Adobe Air application but get the error message failing to install due to a certificate issue.
    The developer says the fix is to uninstall the app and install again but this also fails.
    Checked my machine clock - saved but that didnt work
    The adobe AIR uninstaller simply says I have the latest version? Cant seem to delete and reinstall although other adobe air apps work so I dont think this is the issue
    I have gone through the troubleshooting guide: Troubleshoot AIR installation | Mac OS but still have the issue?
    Any ideas would be great.

    I suspect your Mac OS install was an in place upgrade from an earlier version. This is something I would never even consider with a production machine.

  • Remote app, firewall issue?

    I can't connect my iphone with my computer using the Remote app. I've tried all the help I can find, and it is not working. Here is my issue.
    When I go to connect the "remote" app with my computer, it says that it can't connect due to either my wifi network or my firewall. I can tell you know that it is my firewall. I'm using the same wifi network for both the computer and the iphone, I have also check the IP addresses, they are the same. And it is strickly my computer, both me and my girlfriend have laptops, and it will work on her computer, and not mine (they are both connected on the same wifi network). So next would be to check my firewall settings...In firewall settings the "don't allow exceptions" box is NOT checked. Under the "exceptions" tab, the following boxes are checked: "Bonjour", "iTunes", "Remote Assistance", "File and printer sharing", Network diagonstics for windows XP", and "windows messenger".
    I'm not understanding what the issue is. My iphone will show up under devices and allow me to enter the 4-digit code to connect each other, but after that it says that it is my firewall or network. Hope you can help, thanks.

    Out of curiosity, I did some logging of my network to see what communication took place between my iPhone and iTunes:
    When I turned on my iPhone, there were a 2 of packets on port 5353 (Bonjour) sent by iPhone, sent to 224.0.0.251 (mDNS).
    When I fired up the Remote app, there were a 14 more packets on port 5353 sent by iPhone to 224.0.0.251, with a little more info in it. At this point, iTunes on my PC recognized the iPhone and prompted me for the PIN.
    When I entered in the PIN, it looks like iTunes opens connection to iPhone in order to validate the PIN number, originating the conversation from a port number of its choosing, and using a destination port number that the iPhone advertised in it's last Bonjour packet. There were a dozen packets involved in this little handshake, originated by the PC.
    Finally, the iPhone initiates a communication to iTunes on the PC, opening a connection to port 3689 on the computer. It looks like this is where the bulk of the "remote" app functions.
    All this tells me that if you saw the screen to enter the PIN, then your PC successfully noticed the Bonjour advertisement the iPhone broadcasted on UDP port 5353. But the fact that it ceased to communicate after the PIN was entered tells me that most likely there is a problem with the PC accepting communications on TCP port 3689 (iTunes sharing). I guess it's possible that the firewall is preventing the computer from confirming the PIN with the iPhone, but that's a communication originated by iTunes, and usually firewalls are fairly permissive about what ports apps open going out, just really strict about what ports it accepts communications into.

  • Remote app upgrade issues..question. help!!!

    I have been using my iPad with the remote app to control my iTunes music that is on my Mac mini in my living room. I have had the same app on my iPod and Iphone where all 3 units could request, communicate and interact with iTunes dj...and we could all promote songs by using the vote feature..which would put the hearts next to a song if folks voted to move the song up the list....well with the Remote app upgrade ..the interface is totally different on the iPad now...than it is on the iPod or phone...much more robust...but what has changed ...or maybe I just can't find it.... Is the ability to vote for songs on my iPad to move the, up the list in iTunes dj...all I can do is delete or play it immediately... Abiltiy to vote is enabled in iTunes... Anybody know how to do this in remote app upgrade?
    Any help?

    Ok, problem not solved.  I don't understand why my ATV3 disappears when sleeping.  I wonder if it has to do with the ethernet only.  I am going to try wi-fi only again and see if this resolves the issue.  Other thoughts are that whenever my iMac is doing a back-up ill behavior occurs - which is the only activity I see that has transpired since all was well.

Maybe you are looking for

  • Double sided printing on the 2605dn in Windows 8.1

    I have a Color HP laserjet 2605 that has printed on both sides using windows XP.  How can I get it to print on both sides in my new HP 8.1 computer?  There is no where in the "prefereances" menu to do so. Thanks

  • Issue with user mapping and SAP reference system

    Hello Gurus, I have this strange system behaviour when preparing my system for single sign-on using user mapping. Case 1. In the user management property category, I have the following defined. Authentication Ticket Type - SAP Logon Ticket Logon Meth

  • Is it safe to uninstall Adobe Photoshop Elements 10 after installing Adobe Photoshop Elements 12?

    Is it safe to uninstall Adobe Photoshop Elements 10 after installing Adobe Photoshop Elements 12?  I just upgraded from 10 to 12 and wanted to know if it is safe or if there would be any issues with uninstalling and removing Adobe Photoshop Elements

  • In-apps items purchased problem.

    Purchased an in-game item for over 100$ but i didn't receive the item, i reported a problem with my order for over 48hrs, but no-one care, they even go ahead email me the bill. What is going on with the customer service ? What i should do now?

  • Problem with gtk themes display

    I am running Gnome on my new Arch box and I encounter some strange problems. In Debian, I was able to compile and use some gtk engines like gflat, rezlooks or murrina. Now I tried to compile them on Arch and they do compile okay, but they do not work