3 Replies Latest reply on Mar 6, 2013 11:26 AM by George_Johnson

    adobe javascript include "this.saveas" into the pdf document level

    Antonio_Rossi

      Hello,

      in some posts i read that if i certify a pdf, i would be able to include doc.saveas into the pdf document level. 

      Can anybody tell me what kind of cerify i'd need and how to have it done to make the saveas work from client side?

       

      thanks alot

        • 1. Re: adobe javascript include "this.saveas" into the pdf document level
          George_Johnson MVP & Adobe Community Professional

          Certifying the document is the easy part. The exact steps you take depend on which version of Acrobat you have. More info is in the help doc.

           

          The next obstacle is convincing your users to trust your documents and allow them to execute privileged JavaScript. This is a specific step they have to take and involves adding your certificate to their list of trusted certificates and setting the trust level. I would be a good idea to develop instructions for doing this in Reader so you can provide them to your users.

          • 2. Re: adobe javascript include "this.saveas" into the pdf document level
            Antonio_Rossi Level 1

            Ok this sounds good, and i already heard of this. But i don't even get it working on my own computer, i mean after i certify the pdf with my selfmade certification through adobe steps too, when i open it, it doesn't get saved on the directory that i choice..

            if i put it in trusted function inside folder level js, it works but if i follow this procedure, i create the trusted function into the document level right? and call it in there too. After doing this, i certify the document. but instead of working i still get the security prevent ect. exacly as im not certifying it..

            Can you explain exacly what i would have to do?

            the clients will accept the pdf js alert, for sure. Because i already will tell them to do since they are partners from different companies

            Hopefully u can help me..

            • 3. Re: adobe javascript include "this.saveas" into the pdf document level
              George_Johnson MVP & Adobe Community Professional

              When you use the saveAs method with code inside the PDF, do not place it in a trusted function or use app.beginPriv/app.EndPriv. You have to confirm that the certificate is in your list of trusted certificates and that it is trusted to allow execution of high privilege JavaScript. Be sure to test the document with Reader and validate the signature before attempting to execute the code. There is a preference that controls whether signatures are validated when a document is opened. I would recommend setting this preference.

               

              certJS.png

               

              I would suggest testing it with Reader.