Results 1 to 7 of 7

Thread: Adobe Acrobat - Javascript Console

  1. #1
    Join Date
    Mar 2010
    Posts
    360

    Adobe Acrobat - Javascript Console

    Hello,
    I developed the PDF-management program "Document Manager". The program will read the PDF files of the complete structure of bookmarks. Until recently, everything ran perfectly, now I have the PDF component which I have firmly integrated into the program updated to a later version (PDF xChange Viewer). The problem is that the page numbers no longer be read correctly. The reading will speak on Javascript. From what a console is because the speech? Is there such a menu of the Acrobat Reader Console, I can find nothing in any case. Or is this to be a supplementary tool. I've certainly read through the help of Acrobat Reader times, but could I find anything unusual, so it should work properly. Any help regarding this topic is appreciated. Thank you.

  2. #2
    Join Date
    Nov 2009
    Posts
    359

    Re: Adobe Acrobat - Javascript Console

    In Adobe Reader, the console is normally displayed only if JavaScript errors occur. With JavaScript, but you can also activate the console and issue reports. Example:
    Code:
    console.show ();
    (Console.println "Entering function: myFunction");

  3. #3
    Join Date
    Mar 2010
    Posts
    360

    Re: Adobe Acrobat - Javascript Console

    Hello
    Where exactly is the
    Code:
    console.show ();
    entered to display the console? I do not know whether I have entered at the right place, at least when I got only the message
    Code:
    javascript: console not defined

  4. #4
    Join Date
    Dec 2009
    Posts
    211

    Re: Adobe Acrobat - Javascript Console

    Hello,
    See if this code can help you

    Code:
       "All Bookmarks are read      
         jcd = "function DumpBookmark (bkm, nLevel)"
        jcd = jcd & "("
        jcd jcd & = "var s ='';"
        jcd = jcd & "for (var i = 0; i <nLevel; i + +) s + = '';"
        jcd jcd & = "s + ='+-';"
        jcd = jcd & "bkm.execute (this.gotoNamedDest (bkm.name)); "
        jcd jcd & = "s + = bkm.name;"
        jcd jcd = & "+ s + ='=====' this.pageNum;"
        jcd jcd & = "s + = '\ n';"
        jcd = jcd & "bkm.chd if (! = null)"
        jcd = jcd & "("
        jcd = jcd & "for (var i = 0; i <bkm.chd.length; i + +)"
        jcd jcd & = "s + = DumpBookmark (bkm.chd [i], nLevel + 1);"
        jcd jcd & = ")"
        jcd = jcd & return "s";
        jcd jcd & = ")"
        jcd = jcd & "DumpBookmark (this.bookmarkRoot, 0);"

  5. #5
    Join Date
    Dec 2009
    Posts
    178

    Re: Adobe Acrobat - Javascript Console

    I am surprised that this has ever worked before. The execute method has no parameters are provided. It should read:
    Code:
    jsCode = jsCode & "bkm.execute ();"
    Which Version of Adobe Reader or Adobe Acrobat is used for?

  6. #6
    Join Date
    Mar 2010
    Posts
    330

    Re: Adobe Acrobat - Javascript Console

    In the program the PDF Viewer PDF Viewer is used xChange. If I add new PDF documents The program will, then the selected documents are scanned in succession, with the entire structure of bookmarks can be read including the corresponding page numbers. Read this, the PDF document must be opened first and then is passed to the JavaScript code for this component PDF in the PDF component. The manufacturer of this PDF component then refers me every time it comes to this JavaScript code to the Acrobat Reference.
    So it probably needs to run 1:1. Before, it was also very good, but then I have updated the component to a higher version and then it was broken. So I do not know if that is not more of them. The read out the bookmarks still work, but not the output the page numbers. How would under Acrobat, then probably look the code so that it jumps to the corresponding page of the bookmark?
    Only bkm.execute () it does not, I have him actually say what exactly should he run.

  7. #7
    Join Date
    Nov 2009
    Posts
    356

    Re: Adobe Acrobat - Javascript Console

    With bkm.execute () the action is executed, the the bookmark was assigned. That is, the function does what would happen if the user clicks Adobe Reader or Adobe Acrobat with the mouse on the bookmark. If a product used by Adobe, but this discussion is a forum of Adobe meaningless.

Similar Threads

  1. Adobe Acrobat 9 not able to PDF from Network
    By Jahnavi6 in forum Windows Software
    Replies: 5
    Last Post: 09-07-2010, 01:05 PM
  2. Adobe Acrobat 9 not able to work with Mac OS X
    By Jaimenacho in forum Windows Software
    Replies: 6
    Last Post: 09-07-2010, 12:08 PM
  3. Adobe acrobat 8 pro vs adobe acrobat 9 pro
    By geokilla in forum Windows Software
    Replies: 3
    Last Post: 15-12-2009, 01:48 PM
  4. problem with Adobe acrobat 7 plus adobe reader 8.12
    By Jackie B in forum Vista Help
    Replies: 9
    Last Post: 25-05-2008, 05:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •