8 Replies Latest reply on Dec 31, 2010 12:27 PM by FrancisFukuyama

    How to make bookmarks programmatically ?

    FrancisFukuyama Level 1

      How to make bookmarks programmatically ?

      This question has never be adequately answered as I searched these forums.

       

      I have examined bookmark properties and they are atleast of three implementation styles.

       

      1. The one made on UI have no javascript and no named destination.

       

      2. The one made using this script are

      this.bookmarkRoot.createChild("chapter 1: Making a Javascript Bookmark", "this.pageNum=15");

       

      3. There are also some which have no javascript but use a named destination.

       

       

      I want to make the style 1 programmatically as the style 2 require javascript turned ON, which is a security risk as its now common info that there are hackers who know how to exploit and are unfortunately smarter than adobe's security brains, certainly smarter than simpletons and newbies like us.

       

      I can right click on a type 2 and reset its destination and it becomes type 1.

       

      How to make type 1 bookmark programmatically ... a very reasonable question ? And if you know this, perhaps shed light on how to make type 3 also.

       

      Thanks,

      Francis Fukuyama

        • 1. Re: How to make bookmarks programmatically ?
          try67 MVP & Adobe Community Professional

          Bookmarks created in what you call method 2 don't need to have any JS in them. You can certainly add a script to them by using the setAction method, but if you don't do so they are identical to bookmarks created in any other way.

          Beyond that I don't really follow what you're trying to achieve, and how you expect to do it automatically if you don't want to use JavaScript.

           

          As to your remark about security, I think is it highly questionable. As far as I know, 99.9999% of PDF files are totally secure. Of course there are security threats from time to time, but those are extremely rare and are usually dealt with by the security patches. I think it's much more dangerous to open an email than to open a PDF file. Disabling JavaScript will leave your PDF files very limited indeed. In fact, many of Adobe's own calculations and actions are based on JavaScript.

          • 2. Re: How to make bookmarks programmatically ?
            FrancisFukuyama Level 1

            > Bookmarks created in what you call method 2 don't need to have any JS in them.

             

            LOL, In that case they wont have any action like "Go To a Page View" and will be dead.

             

            > You can certainly add a script to them by using the setAction
            > method, but if you don't do so they are identical to bookmarks created
            > in any other way.

             

            You have not presented any script by which I can see a solution to my problem

             

            > Beyond that I don't really follow what you're trying to achieve, and
            > how you expect to do it automatically if you don't want to use
            > JavaScript.

             

            I intend to use javascript to occasionally create bookmarks of type 1 and then turn it off. Operating such bookmarks of type 1 does not require the javascript to be ON.

             

            > As to your remark about security, I think is it highly
            > questionable. As far as I know, 99.9999% of PDF files are totally
            > secure. Of course there are security threats from time to time, but
            > those are extremely rare and are usually dealt with by the security
            > patches. I think it's much more dangerous to open an email than to
            > open a PDF file. Disabling JavaScript will leave your PDF files very
            > limited indeed. In fact, many of Adobe's own calculations and actions
            > are based on JavaScript.

             

            For the ebooks reading and annotationg, javascript is never needed. Comparative argument is a useless quarrel.

            • 3. Re: How to make bookmarks programmatically ?
              dying veteran Level 1

              Have a look at this thread where someone posts an image

              of the windows

               

              http://forums.adobe.com/message/2595278#2595278

               

              This should help you a little, if not completely ... and do not forget to give some points if it helped.

              1 person found this helpful
              • 4. Re: How to make bookmarks programmatically ?
                FrancisFukuyama Level 1

                GO TO A PAGE IN THIS DOCUMENT  <---- the second image is the type of action i want.

                 

                How to get this ?

                • 5. Re: How to make bookmarks programmatically ?
                  try67 MVP & Adobe Community Professional

                  Like is says in that thread, this can't be achieved using JavaScript.

                  You can post in the SDK forum for information about plugins.

                  • 6. Re: How to make bookmarks programmatically ?
                    FrancisFukuyama Level 1

                    try67> Like is says in that thread, this  can't be achieved using JavaScript.

                    You can post in the SDK forum  for information about plugins.

                     

                    I must have missed this in your first reply and still cant find it. Can you please show where you said it in the first reply so that I can improve my reading skills.

                     

                    FF

                    • 7. Re: How to make bookmarks programmatically ?
                      try67 MVP & Adobe Community Professional

                      I meant the replies of Bernd Alheit in the thread linked to by Roger Mason, aka "dying veteran".

                      • 8. Re: How to make bookmarks programmatically ?
                        FrancisFukuyama Level 1

                        try67 wrote:
                        I meant the replies of Bernd Alheit in the thread linked to by Roger
                        Mason, aka "dying veteran".

                         


                        But you and Bernd Alheit are different individuals with different
                        style of helpfulness .. ?