5 Replies Latest reply on Oct 8, 2008 5:49 AM by (satheeshrishi)

    How to disable save Icon?

    Level 1
      We have a legal requirement in our bank that in our intranet site whatever document we show it should have save icon disabled? [thought there are lot if ways we can capture the contents of it even with save icon disabled]

      Is there any way of implementing the save icon disabled...I spent almost three hours with no result.... My coding will look like this

      int permissions = ~(PdfWriter.AllowPrinting | PdfWriter.AllowCopy | PdfWriter.AllowModifyAnnotations | PdfWriter.AllowFillIn | PdfWriter.AllowAssembly | PdfWriter.AllowModifyContents | PdfWriter.AllowScreenReaders);

      PdfEncryptor.encrypt(reader,fos,true,"","",permissions);
        • 1. Re: How to disable save Icon?
          (Aandi_Inston) Level 1
          No idea what your code applies to, it doesn't seem to be Create PDF
          Online. But I am guessing these are setting PDF permission bits. The
          save icon is always available, and nothing to do with PDF permissions.

          It is strange, though not unprecendented, to have a legal requirement
          that is impossible...

          Aandi Inston
          • 2. Re: How to disable save Icon?
            Level 1
            I have pasted my code below
            We are creating a new pdf and applying permissions for that....
            I searched for more than two hours and couldn't find a way to disable save icon in the API we use

            com.lowagie.text.pdf.PdfEncryptor;
            com.lowagie.text.pdf.PdfReader;
            com.lowagie.text.pdf.PdfWriter; [you can paste this in google which will explain this API]

            I thought this as a constraint with this API, hence searching for other API's which has this feature...in most of the forums I saw implementing this as not possible....hence thought of checking in Adobe forum where people might suggest some other API...Please let me know whether this feature [if it is really a programmable feature] is available in API's you have used...Thanks Aandi Inston!

            byte[] documentBytes = document.getContentBytes(); //which will get the content of a pdf
            File newFile = File.createTempFile("tempPdfFile", ".tmp");
            FileOutputStream fos = new FileOutputStream(newFile);

            reader = new PdfReader(documentBytes);
            int permissions = ~(PdfWriter.AllowPrinting | PdfWriter.AllowCopy | PdfWriter.AllowModifyAnnotations | PdfWriter.AllowFillIn | PdfWriter.AllowAssembly | PdfWriter.AllowModifyContents | PdfWriter.AllowScreenReaders);
            PdfEncryptor.encrypt(reader,fos,true,"","",permissions);
            • 3. Re: How to disable save Icon?
              (Aandi_Inston) Level 1
              >I have pasted my code below

              Looks like you are using iText. This is the forum for Adobe's Create
              PDF Online service.

              >...in most of the forums I saw implementing this as not possible....

              This is not possible at a PDF level. Because it is not possible, there
              is no API to do it, anywhere.

              Aandi Inston
              • 4. Re: How to disable save Icon?
                (Aandi_Inston) Level 1
                If you want to double check the situation at least try a technical
                forum. Try the Acrobat SDK forum, but don't try posting lines of code
                belonging to a different non-Adobe product, it won't help you to get
                help.

                Aandi Inston
                • 5. Re: How to disable save Icon?
                  Level 1
                  Thanks Aandi Inston...I will post in Adobe SDK forum!