4 Replies Latest reply on Jul 18, 2008 7:10 AM by DimitriM

    Pop-up upon opening

      Acrobat 8

      It was suggested in the main Adobe forum that I may find an answer to my question here, in the scripting forum...

      I want my readers to view a pop-up window upon opening PDF (it would contain document copyright information). Maybe I'm searching for the wrong terminology becauase I find nothing that addresses this. Is it possible -- FYI, I am not a programmer, but may be able to find assistance, if necessary.

      TIA,

      Karen
        • 1. Re: Pop-up upon opening
          MarkWalsh Level 4
          the following code will show a simple dialog box.

          app.alert ('Your message here.')

          If you put this into the document script for your PDF (in version 7 go to 'Advanced:Javascript:Document Javascripts'), it will show each time the document is opened (provided Javascript is enabled on the computer it is opening on).
          • 2. Re: Pop-up upon opening
            DimitriM Level 3
            Hi Karen,

            The app.alert dialog will work fine if you have a very limited amount of information (text) to display. If you have more than one line of text or wish to add other features such as images, links, etc, you may want to look into creating a custom dialog with JavaScript. My company has an example of a license agreement dialog on this page. Scroll doown to the Document License Dialog Example. It was created with AcroDialogs, a commercial plug-in for Acrobat, but custom dialogs can be hand coded if you have someone with JavaScript expertise to help. As Mark said, these dialogs only work if the user has JavaScript turned on. In the example from the link above, if JavaScript is turned off the user will only see a coversheet that includes an explanation that JavaScript must be tunred on the see the rest of the document.

            Hope this helps,

            Dimitri
            WindJack Solutions
            www.windjack.com
            • 3. Re: Pop-up upon opening
              Level 1
              Just so you know and no offense to Dimitri or the lovely product AcroDialogs really is, but you can create your own dialogs with JSADM. If you are experienced with JavaScript you can open up the sample document that is in the Acrobat SDK and use it to build your own dialog.
              However, if you are not experienced with JavaScript, I think that Dimitri's suggestion would be the appropriate option.

              Sabian
              • 4. Re: Pop-up upon opening
                DimitriM Level 3
                Hi Sabian,

                No offense taken- but I did in fact mention in my post this could be done without the use of a third-party tool-

                "It was created with AcroDialogs, a commercial plug-in for Acrobat, but custom dialogs can be hand coded if you have someone with JavaScript expertise to help."

                Reclarification nevers hurts though :)

                Dimitri